Bug 1354679 - tweak pause overlay. r=gl
authorJason Laster <jlaster@mozilla.com>
Thu, 11 Jul 2019 16:29:10 +0000
changeset 482448 fa44f47160b2371069652b9ae763345d811bce32
parent 482447 3d07024e39d94ee2a1e52acdb88b6b8ac1bb1a8b
child 482449 16bc2f5a8e199244beca4c28b93c0084e333d323
push id89779
push userjlaster@mozilla.com
push dateThu, 11 Jul 2019 20:51:50 +0000
treeherderautoland@fa44f47160b2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1354679
milestone70.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 1354679 - tweak pause overlay. r=gl Differential Revision: https://phabricator.services.mozilla.com/D37496
devtools/client/preferences/debugger.js
devtools/server/actors/highlighters.js
devtools/server/actors/highlighters/paused-debugger.js
devtools/server/actors/thread.js
devtools/server/tests/mochitest/test_highlighter_paused_debugger.html
--- a/devtools/client/preferences/debugger.js
+++ b/devtools/client/preferences/debugger.js
@@ -71,9 +71,9 @@ pref("devtools.debugger.features.async-s
 pref("devtools.debugger.features.skip-pausing", true);
 pref("devtools.debugger.features.autocomplete-expressions", false);
 pref("devtools.debugger.features.map-expression-bindings", true);
 pref("devtools.debugger.features.xhr-breakpoints", true);
 pref("devtools.debugger.features.original-blackbox", true);
 pref("devtools.debugger.features.windowless-workers", true);
 pref("devtools.debugger.features.event-listeners-breakpoints", true);
 pref("devtools.debugger.features.log-points", true);
-pref("devtools.debugger.features.overlay-step-buttons", false);
\ No newline at end of file
+pref("devtools.debugger.features.overlay-step-buttons", false);
--- a/devtools/server/actors/highlighters.js
+++ b/devtools/server/actors/highlighters.js
@@ -486,16 +486,17 @@ exports.HighlighterActor = protocol.Acto
   _highlighterHidden: function() {
     this._inspector.walker.emit("highlighter-hide");
   },
 
   cancelPick: function() {
     if (this._targetActor.threadActor) {
       this._targetActor.threadActor.showOverlay();
     }
+
     if (this._isPicking) {
       this._highlighter.hide();
       this._stopPickerListeners();
       this._isPicking = false;
       this._hoveredNode = null;
     }
   },
 });
--- a/devtools/server/actors/highlighters/paused-debugger.js
+++ b/devtools/server/actors/highlighters/paused-debugger.js
@@ -15,17 +15,17 @@ const L10N = new LocalizationHelper(STRI
 
 /**
  * The PausedDebuggerOverlay is a class that displays a semi-transparent mask on top of
  * the whole page and a toolbar at the top of the page.
  * This is used to signal to users that script execution is current paused.
  * The toolbar is used to display the reason for the pause in script execution as well as
  * buttons to resume or step through the program.
  */
-function PausedDebuggerOverlay(highlighterEnv, options) {
+function PausedDebuggerOverlay(highlighterEnv, options = {}) {
   this.env = highlighterEnv;
   this.showOverlayStepButtons = options.showOverlayStepButtons;
   this.resume = options.resume;
   this.stepOver = options.stepOver;
 
   this.markup = new CanvasFrameAnonymousContentHelper(
     highlighterEnv,
     this._buildMarkup.bind(this)
@@ -122,28 +122,26 @@ PausedDebuggerOverlay.prototype = {
     } else if (target.id == "paused-dbg-resume-button") {
       this.resume();
     }
   },
 
   handleEvent(e) {
     switch (e.type) {
       case "click":
-      case "mouseup":
         this.onClick(e.target);
         break;
       case "DOMMouseScroll":
         // Prevent scrolling. That's because we only took a screenshot of the viewport, so
         // scrolling out of the viewport wouldn't draw the expected things. In the future
         // we can take the screenshot again on scroll, but for now it doesn't seem
         // important.
         e.preventDefault();
         break;
       case "mouseover":
-        console.log(`> mouse over ${e.target.id}`);
         break;
     }
   },
 
   getElement(id) {
     return this.markup.getElement(this.ID_CLASS_PREFIX + id);
   },
 
--- a/devtools/server/actors/thread.js
+++ b/devtools/server/actors/thread.js
@@ -47,17 +47,16 @@ loader.lazyRequireGetter(
 );
 loader.lazyRequireGetter(
   this,
   "FrameActor",
   "devtools/server/actors/frame",
   true
 );
 loader.lazyRequireGetter(this, "throttle", "devtools/shared/throttle", true);
-
 loader.lazyRequireGetter(
   this,
   "HighlighterEnvironment",
   "devtools/server/actors/highlighters",
   true
 );
 loader.lazyRequireGetter(
   this,
--- a/devtools/server/tests/mochitest/test_highlighter_paused_debugger.html
+++ b/devtools/server/tests/mochitest/test_highlighter_paused_debugger.html
@@ -20,17 +20,17 @@ window.onload = function() {
   const {require} = ChromeUtils.import("resource://devtools/shared/Loader.jsm");
   require("devtools/server/actors/inspector/inspector");
   const {HighlighterEnvironment} = require("devtools/server/actors/highlighters");
   const {PausedDebuggerOverlay} = require("devtools/server/actors/highlighters/paused-debugger");
 
   const env = new HighlighterEnvironment();
   env.initFromWindow(window);
 
-  const highlighter = new PausedDebuggerOverlay(env, {});
+  const highlighter = new PausedDebuggerOverlay(env);
   const anonymousContent = highlighter.markup.content;
 
   const id = elementID => `${highlighter.ID_CLASS_PREFIX}${elementID}`;
 
   function isHidden(elementID) {
     const attr = anonymousContent.getAttributeForElement(id(elementID), "hidden");
     return typeof attr === "string" && attr == "true";
   }