Bug 1177346 - Make highlighter work while the debugger is paused. r=pbro draft
authorAlexandre Poirot <poirot.alex@gmail.com>
Wed, 16 Nov 2016 01:28:48 -0800
changeset 442521 6382432b8cc42877d82b8318bd7fa09746f42f2c
parent 442520 c647daead3c0378eb77df86e858e5c8cad869cae
child 443455 3259ea1716536d4f73a036c0a83bc8b95032b2b2
push id36714
push userbmo:poirot.alex@gmail.com
push dateTue, 22 Nov 2016 16:58:11 +0000
reviewerspbro
bugs1177346
milestone53.0a1
Bug 1177346 - Make highlighter work while the debugger is paused. r=pbro MozReview-Commit-ID: GUL6SXhUIIm
devtools/server/actors/highlighters.js
devtools/server/actors/webbrowser.js
--- a/devtools/server/actors/highlighters.js
+++ b/devtools/server/actors/highlighters.js
@@ -257,17 +257,17 @@ var HighlighterActor = exports.Highlight
       if (event.shiftKey) {
         events.emit(this._walker, "picker-node-previewed", this._findAndAttachElement(event));
         return;
       }
 
       this._stopPickerListeners();
       this._isPicking = false;
       if (this._autohide) {
-        this._tabActor.window.setTimeout(() => {
+        setTimeout(() => {
           this._highlighter.hide();
         }, HIGHLIGHTER_PICKED_TIMER);
       }
       if (!this._currentNode) {
         this._currentNode = this._findAndAttachElement(event);
       }
       events.emit(this._walker, "picker-node-picked", this._currentNode);
     };
--- a/devtools/server/actors/webbrowser.js
+++ b/devtools/server/actors/webbrowser.js
@@ -1781,33 +1781,33 @@ TabActor.prototype = {
   preNest() {
     if (!this.window) {
       // The tab is already closed.
       return;
     }
     let windowUtils = this.window
                           .QueryInterface(Ci.nsIInterfaceRequestor)
                           .getInterface(Ci.nsIDOMWindowUtils);
-    windowUtils.suppressEventHandling(true);
+    windowUtils.eventHandlingOnlyChrome(true);
     windowUtils.suspendTimeouts();
   },
 
   /**
    * Prepare to exit a nested event loop by enabling debuggee events.
    */
   postNest(nestData) {
     if (!this.window) {
       // The tab is already closed.
       return;
     }
     let windowUtils = this.window
                           .QueryInterface(Ci.nsIInterfaceRequestor)
                           .getInterface(Ci.nsIDOMWindowUtils);
     windowUtils.resumeTimeouts();
-    windowUtils.suppressEventHandling(false);
+    windowUtils.eventHandlingOnlyChrome(false);
   },
 
   _changeTopLevelDocument(window) {
     // Fake a will-navigate on the previous document
     // to let a chance to unregister it
     this._willNavigate(this.window, window.location.href, null, true);
 
     this._windowDestroyed(this.window, null, true);