Bug 787952 - When switching back to an inspected tab, the outline is not visible anymore. r=jwalker
authorPaul Rouget <paul@mozilla.com>
Mon, 03 Sep 2012 17:52:37 +0200
changeset 104325 1362d353a30d55ec231afd43aa56a72c3809e7c6
parent 104324 01fba3ea3d130a1b2cf8061df6b9d24003fd75fa
child 104326 83ba44d1231cc6c86e8a80e827a1629e93739ca0
push id14464
push userryanvm@gmail.com
push dateWed, 05 Sep 2012 21:52:38 +0000
treeherdermozilla-inbound@013743bb609e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalker
bugs787952
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 787952 - When switching back to an inspected tab, the outline is not visible anymore. r=jwalker
browser/devtools/highlighter/highlighter.jsm
--- a/browser/devtools/highlighter/highlighter.jsm
+++ b/browser/devtools/highlighter/highlighter.jsm
@@ -145,26 +145,25 @@ Highlighter.prototype = {
     // elements of the highlighter (buttons, toolbars, ...).
     let controlsBox = this.chromeDoc.createElement("box");
     controlsBox.id = "highlighter-controls";
     this.highlighterContainer.appendChild(outlineContainer);
     this.highlighterContainer.appendChild(controlsBox);
 
     stack.appendChild(this.highlighterContainer);
 
-    this.showOutline();
-
     this.buildInfobar(controlsBox);
 
     this.transitionDisabler = null;
     this.pageEventsMuter = null;
 
-    this.computeZoomFactor();
     this.unlock();
-    this.hide();
+
+    this.hidden = true;
+    this.show();
   },
 
   /**
    * Destroy the nodes. Remove listeners.
    */
   destroy: function Highlighter_destroy()
   {
     this.detachMouseListeners();
@@ -215,16 +214,20 @@ Highlighter.prototype = {
     }
 
     if (oldNode !== this.node) {
       this.updateInfobar();
     }
 
     this.invalidateSize(!!aScroll);
 
+    if (this._highlighting) {
+      this.showOutline();
+    }
+
     if (oldNode !== this.node) {
       this.emitEvent("nodeselected");
     }
   },
 
   /**
    * Notify that a pseudo-class lock was toggled on the highlighted element
    *