Bug 1377326 - Don't assume targets are tabs in style-editor media sidebar; r=ntim draft
authorPatrick Brosset <pbrosset@mozilla.com>
Mon, 03 Jul 2017 17:38:02 +0200
changeset 606191 e5ab4ed89a2d34a8eedb0b921852d0fa7c8e55cb
parent 606190 a5636233955939edb3efe96acc65455e3331e56c
child 636700 5371a7c2c7e13750a4a7dd8de8cf1fdeb3261c8a
push id67631
push userbmo:pbrosset@mozilla.com
push dateMon, 10 Jul 2017 15:49:12 +0000
reviewersntim
bugs1377326
milestone56.0a1
Bug 1377326 - Don't assume targets are tabs in style-editor media sidebar; r=ntim MozReview-Commit-ID: KJczS4aEAUS
devtools/client/styleeditor/StyleEditorUI.jsm
--- a/devtools/client/styleeditor/StyleEditorUI.jsm
+++ b/devtools/client/styleeditor/StyleEditorUI.jsm
@@ -894,17 +894,17 @@ StyleEditorUI.prototype = {
         div.addEventListener("click",
                              this._jumpToLocation.bind(this, location));
 
         let cond = this._panelDoc.createElement("div");
         cond.className = "media-rule-condition";
         if (!rule.matches) {
           cond.classList.add("media-condition-unmatched");
         }
-        if (this._target.tab.tagName == "tab") {
+        if (this._target.isLocalTab) {
           this._setConditionContents(cond, rule.conditionText);
         } else {
           cond.textContent = rule.conditionText;
         }
         div.appendChild(cond);
 
         let link = this._panelDoc.createElement("div");
         link.className = "media-rule-line theme-link";