Bug 1590195 - Remove actorHasMethodCheck r=gl
authorAnujan M <anujanmurugesu@gmail.com>
Sat, 16 Nov 2019 20:26:27 +0000
changeset 502325 449f5545954f8bde849fcc372b4b87a6338739c1
parent 502324 e6bc09bed1cf8e008b4b67a562154d53251812b8
child 502326 8921129925a8621b6a6ce593be136c8a98aac421
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1590195
milestone72.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 1590195 - Remove actorHasMethodCheck r=gl Refactor and Remove the actorHasMethod check Differential Revision: https://phabricator.services.mozilla.com/D53272
devtools/client/inspector/boxmodel/box-model.js
--- a/devtools/client/inspector/boxmodel/box-model.js
+++ b/devtools/client/inspector/boxmodel/box-model.js
@@ -188,28 +188,21 @@ BoxModel.prototype = {
       // Update the layout properties with whether or not the element's position is
       // editable with the geometry editor.
       const isPositionEditable = await pageStyle.isPositionEditable(nodeFront);
 
       layout = Object.assign({}, layout, {
         isPositionEditable,
       });
 
-      const actorCanGetOffSetParent = await nodeFront.targetFront.actorHasMethod(
-        "domwalker",
-        "getOffsetParent"
+      // Update the redux store with the latest offset parent DOM node
+      const offsetParent = await inspectorFront.walker.getOffsetParent(
+        nodeFront
       );
-
-      if (actorCanGetOffSetParent) {
-        // Update the redux store with the latest offset parent DOM node
-        const offsetParent = await inspectorFront.walker.getOffsetParent(
-          nodeFront
-        );
-        this.store.dispatch(updateOffsetParent(offsetParent));
-      }
+      this.store.dispatch(updateOffsetParent(offsetParent));
 
       // Update the redux store with the latest layout properties and update the box
       // model view.
       this.store.dispatch(updateLayout(layout));
 
       // If a subsequent request has been made, wait for that one instead.
       if (this._lastRequest != lastRequest) {
         return this._lastRequest;