Bug 1499686 - Remove _supportsFrameHighlight; r=ochameau
authoryulia <ystartsev@mozilla.com>
Thu, 18 Oct 2018 14:10:29 +0000
changeset 441934 88aa6ae72305247b0520e0d698e751749fb8d60b
parent 441933 f95e8040037226253522aea53a8b24dee6b75098
child 441935 665fecc387403fd9336daaaa6bfa619dc5b7baed
push id34880
push usercsabou@mozilla.com
push dateThu, 18 Oct 2018 21:53:44 +0000
treeherdermozilla-central@7b0a8e47d256 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1499686
milestone64.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 1499686 - Remove _supportsFrameHighlight; r=ochameau Depends on D8988 Differential Revision: https://phabricator.services.mozilla.com/D8989
devtools/client/framework/toolbox.js
--- a/devtools/client/framework/toolbox.js
+++ b/devtools/client/framework/toolbox.js
@@ -2340,17 +2340,17 @@ Toolbox.prototype = {
    * Highlight a frame in the page
    */
   onHighlightFrame: async function(frameId) {
     // Need to initInspector to check presence of getNodeActorFromWindowID
     // and use the highlighter later
     await this.initInspector();
 
     // Only enable frame highlighting when the top level document is targeted
-    if (this._supportsFrameHighlight && this.rootFrameSelected) {
+    if (this.rootFrameSelected) {
       const frameActor = await this.walker.getNodeActorFromWindowID(frameId);
       this.highlighterUtils.highlightNodeFront(frameActor);
     }
   },
 
   /**
    * A handler for 'frameUpdate' packets received from the backend.
    * Following properties might be set on the packet:
@@ -2680,21 +2680,16 @@ Toolbox.prototype = {
         this._selection = new Selection(this._walker);
         this._selection.on("new-node-front", this._onNewSelectedNodeFront);
 
         this.walker.on("highlighter-ready", this._highlighterReady);
         this.walker.on("highlighter-hide", this._highlighterHidden);
 
         const autohide = !flags.testing;
         this._highlighter = await this._inspector.getHighlighter(autohide);
-        if (!("_supportsFrameHighlight" in this)) {
-          // Only works with FF58+ targets
-          this._supportsFrameHighlight =
-            await this.target.actorHasMethod("domwalker", "getNodeActorFromWindowID");
-        }
       }.bind(this))();
     }
     return this._initInspector;
   },
 
   _onNewSelectedNodeFront: function() {
     // Emit a "selection-changed" event when the toolbox.selection has been set
     // to a new node (or cleared). Currently used in the WebExtensions APIs (to