Bug 1568860 - Part 3: Use the contextual WalkerFront in the fonts view. r=ochameau
authorGabriel Luong <gabriel.luong@gmail.com>
Fri, 18 Oct 2019 08:43:09 +0000
changeset 559619 5887f4095a87aca9cf4d9bdf81edcc7258b58cd2
parent 559618 a4ed297ed157ee0957ef59eb46092f059c8e504d
child 559620 21b88cef47e1e4aafb8450953739d3c15cffb766
push id12177
push usercsabou@mozilla.com
push dateMon, 21 Oct 2019 14:52:16 +0000
treeherdermozilla-beta@1918a9cd33bc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1568860
milestone71.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 1568860 - Part 3: Use the contextual WalkerFront in the fonts view. r=ochameau Depends on D49637 Differential Revision: https://phabricator.services.mozilla.com/D49639
devtools/client/inspector/fonts/fonts.js
--- a/devtools/client/inspector/fonts/fonts.js
+++ b/devtools/client/inspector/fonts/fonts.js
@@ -480,17 +480,17 @@ class FontInspector {
         break;
       default:
         node = this.node.parentNode();
     }
 
     switch (unit) {
       case "rem":
         // Regardless of CSS property, always use the root document element for "rem".
-        node = await this.inspector.walker.documentElement();
+        node = await this.node.walkerFront.documentElement();
         break;
     }
 
     return node;
   }
 
   /**
    * Get a reference to a TextProperty instance from the current selected rule for a
@@ -854,17 +854,17 @@ class FontInspector {
         return;
       }
     }
 
     try {
       if (show) {
         const node = isForCurrentElement
           ? this.node
-          : this.inspector.walker.rootNode;
+          : this.node.walkerFront.rootNode;
 
         await this.fontsHighlighter.show(node, {
           CSSFamilyName: font.CSSFamilyName,
           name: font.name,
         });
       } else {
         await this.fontsHighlighter.hide();
       }