Bug 1485324 - (Part 1) Remove pref for Font Editor and obsolete conditionals; r=gl
authorRazvan Caliman <rcaliman@mozilla.com>
Tue, 13 Nov 2018 18:55:30 +0000
changeset 446563 dd1eadadbeeb6dd8268a4d23b515493877b1eddf
parent 446562 4bf8c65381d07cb8ebf78cc9fc34c5218a97badd
child 446564 13a15cc93107cbe2a17a332ba364f79c4e04c5ce
push id35043
push userebalazs@mozilla.com
push dateThu, 15 Nov 2018 16:12:36 +0000
treeherdermozilla-central@59026ada59bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1485324
milestone65.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 1485324 - (Part 1) Remove pref for Font Editor and obsolete conditionals; r=gl This patch removes the `devtools.inspector.fonteditor.enabled` pref and all its uses in the Fonts panel. Obsolete actions for the case when the pref was off are also removed. This is mostly old Font Inspector code. One test is temporarily disabled because it tests the old Font Inspector. It will be removed along with other pieces on the next part of this commit series. Differential Revision: https://phabricator.services.mozilla.com/D11505
devtools/client/inspector/fonts/components/FontList.js
devtools/client/inspector/fonts/components/FontOverview.js
devtools/client/inspector/fonts/components/FontsApp.js
devtools/client/inspector/fonts/fonts.js
devtools/client/inspector/fonts/test/browser.ini
devtools/client/inspector/fonts/test/browser_fontinspector.js
devtools/client/inspector/fonts/test/browser_fontinspector_all-fonts.js
devtools/client/inspector/fonts/test/browser_fontinspector_copy-URL.js
devtools/client/inspector/fonts/test/browser_fontinspector_edit-previews.js
devtools/client/inspector/fonts/test/browser_fontinspector_editor-font-size-conversion.js
devtools/client/inspector/fonts/test/browser_fontinspector_editor-keywords.js
devtools/client/inspector/fonts/test/browser_fontinspector_editor-values.js
devtools/client/inspector/fonts/test/browser_fontinspector_expand-css-code.js
devtools/client/inspector/fonts/test/browser_fontinspector_no-fonts.js
devtools/client/inspector/fonts/test/browser_fontinspector_reveal-in-page.js
devtools/client/inspector/fonts/test/browser_fontinspector_text-node.js
devtools/client/inspector/fonts/test/browser_fontinspector_theme-change.js
devtools/client/inspector/fonts/test/head.js
devtools/client/locales/en-US/font-inspector.properties
devtools/client/preferences/devtools-client.js
--- a/devtools/client/inspector/fonts/components/FontList.js
+++ b/devtools/client/inspector/fonts/components/FontList.js
@@ -1,32 +1,29 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-const Services = require("Services");
 const {
   createElement,
   createFactory,
   createRef,
   Fragment,
   PureComponent,
 } = require("devtools/client/shared/vendor/react");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 
 const Font = createFactory(require("./Font"));
 const FontPreviewInput = createFactory(require("./FontPreviewInput"));
 
 const Types = require("../types");
 
-const PREF_FONT_EDITOR = "devtools.inspector.fonteditor.enabled";
-
 class FontList extends PureComponent {
   static get propTypes() {
     return {
       fontOptions: PropTypes.shape(Types.fontOptions).isRequired,
       fonts: PropTypes.arrayOf(PropTypes.shape(Types.font)).isRequired,
       onPreviewTextChange: PropTypes.func.isRequired,
       onToggleFontHighlight: PropTypes.func.isRequired,
     };
@@ -65,23 +62,19 @@ class FontList extends PureComponent {
       fonts.map((font, i) => Font({
         key: i,
         font,
         onPreviewClick,
         onToggleFontHighlight,
       }))
     );
 
-    // Show the font preview input only when the font editor is enabled.
-    const previewInput = Services.prefs.getBoolPref(PREF_FONT_EDITOR) ?
-      FontPreviewInput({
-        ref: this.previewInputRef,
-        onPreviewTextChange,
-        previewText,
-      })
-      :
-      null;
+    const previewInput = FontPreviewInput({
+      ref: this.previewInputRef,
+      onPreviewTextChange,
+      previewText,
+    });
 
     return createElement(Fragment, null, previewInput, list);
   }
 }
 
 module.exports = FontList;
--- a/devtools/client/inspector/fonts/components/FontOverview.js
+++ b/devtools/client/inspector/fonts/components/FontOverview.js
@@ -2,26 +2,23 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const { createFactory, PureComponent } = require("devtools/client/shared/vendor/react");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
-const Services = require("Services");
 
 const Accordion = createFactory(require("devtools/client/inspector/layout/components/Accordion"));
 const FontList = createFactory(require("./FontList"));
 
 const { getStr } = require("../utils/l10n");
 const Types = require("../types");
 
-const PREF_FONT_EDITOR = "devtools.inspector.fonteditor.enabled";
-
 class FontOverview extends PureComponent {
   static get propTypes() {
     return {
       fontData: PropTypes.shape(Types.fontData).isRequired,
       fontOptions: PropTypes.shape(Types.fontOptions).isRequired,
       onPreviewTextChange: PropTypes.func.isRequired,
       onToggleFontHighlight: PropTypes.func.isRequired,
     };
@@ -29,64 +26,33 @@ class FontOverview extends PureComponent
 
   constructor(props) {
     super(props);
     this.onToggleFontHighlightGlobal = (font, show) => {
       this.props.onToggleFontHighlight(font, show, false);
     };
   }
 
-  renderElementFonts() {
-    const {
-      fontData,
-      fontOptions,
-      onPreviewTextChange,
-      onToggleFontHighlight,
-    } = this.props;
-    const { fonts } = fontData;
-
-    return fonts.length ?
-      FontList({
-        fonts,
-        fontOptions,
-        onPreviewTextChange,
-        onToggleFontHighlight,
-      })
-      :
-      dom.div(
-        {
-          className: "devtools-sidepanel-no-result",
-        },
-        getStr("fontinspector.noFontsUsedOnCurrentElement")
-      );
-  }
-
   renderFonts() {
     const {
       fontData,
       fontOptions,
       onPreviewTextChange,
     } = this.props;
 
-    const header = Services.prefs.getBoolPref(PREF_FONT_EDITOR)
-      ? getStr("fontinspector.allFontsOnPageHeader")
-      : getStr("fontinspector.otherFontsInPageHeader");
-
-    const fonts = Services.prefs.getBoolPref(PREF_FONT_EDITOR)
-      ? fontData.allFonts
-      : fontData.otherFonts;
+    const fonts = fontData.allFonts;
 
     if (!fonts.length) {
       return null;
     }
 
     return Accordion({
       items: [
         {
-          header,
+          header: getStr("fontinspector.allFontsOnPageHeader"),
           component: FontList,
           componentProps: {
             fontOptions,
             fonts,
             onPreviewTextChange,
             onToggleFontHighlight: this.onToggleFontHighlightGlobal,
           },
           opened: false,
@@ -95,16 +61,14 @@ class FontOverview extends PureComponent
     });
   }
 
   render() {
     return dom.div(
       {
         id: "font-container",
       },
-      // Render element fonts only when the Font Editor is not enabled.
-      !Services.prefs.getBoolPref(PREF_FONT_EDITOR) && this.renderElementFonts(),
       this.renderFonts()
     );
   }
 }
 
 module.exports = FontOverview;
--- a/devtools/client/inspector/fonts/components/FontsApp.js
+++ b/devtools/client/inspector/fonts/components/FontsApp.js
@@ -14,43 +14,41 @@ const FontOverview = createFactory(requi
 
 const Types = require("../types");
 
 class FontsApp extends PureComponent {
   static get propTypes() {
     return {
       fontData: PropTypes.shape(Types.fontData).isRequired,
       fontEditor: PropTypes.shape(Types.fontEditor).isRequired,
-      fontEditorEnabled: PropTypes.bool.isRequired,
       fontOptions: PropTypes.shape(Types.fontOptions).isRequired,
       onInstanceChange: PropTypes.func.isRequired,
       onPreviewTextChange: PropTypes.func.isRequired,
       onPropertyChange: PropTypes.func.isRequired,
       onToggleFontHighlight: PropTypes.func.isRequired,
     };
   }
 
   render() {
     const {
       fontData,
       fontEditor,
-      fontEditorEnabled,
       fontOptions,
       onInstanceChange,
       onPreviewTextChange,
       onPropertyChange,
       onToggleFontHighlight,
     } = this.props;
 
     return dom.div(
       {
         className: "theme-sidebar inspector-tabpanel",
         id: "sidebar-panel-fontinspector",
       },
-      fontEditorEnabled && FontEditor({
+      FontEditor({
         fontEditor,
         onInstanceChange,
         onPropertyChange,
         onToggleFontHighlight,
       }),
       FontOverview({
         fontData,
         fontOptions,
--- a/devtools/client/inspector/fonts/fonts.js
+++ b/devtools/client/inspector/fonts/fonts.js
@@ -1,17 +1,16 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-const Services = require("Services");
 const { gDevTools } = require("devtools/client/framework/devtools");
 const { getColor } = require("devtools/client/shared/theme");
 const { createFactory, createElement } = require("devtools/client/shared/vendor/react");
 const { Provider } = require("devtools/client/shared/vendor/react-redux");
 const { debounce } = require("devtools/shared/debounce");
 const { ELEMENT_STYLE } = require("devtools/shared/specs/styles");
 
 const FontsApp = createFactory(require("./components/FontsApp"));
@@ -40,17 +39,16 @@ const FONT_PROPERTIES = [
   "font-optical-sizing",
   "font-size",
   "font-stretch",
   "font-style",
   "font-variation-settings",
   "font-weight",
   "line-height",
 ];
-const PREF_FONT_EDITOR = "devtools.inspector.fonteditor.enabled";
 const REGISTERED_AXES_TO_FONT_PROPERTIES = {
   "ital": "font-style",
   "opsz": "font-optical-sizing",
   "slnt": "font-style",
   "wdth": "font-stretch",
   "wght": "font-weight",
 };
 const REGISTERED_AXES = Object.keys(REGISTERED_AXES_TO_FONT_PROPERTIES);
@@ -94,17 +92,16 @@ class FontInspector {
   }
 
   init() {
     if (!this.inspector) {
       return;
     }
 
     const fontsApp = FontsApp({
-      fontEditorEnabled: Services.prefs.getBoolPref(PREF_FONT_EDITOR),
       onInstanceChange: this.onInstanceChange,
       onToggleFontHighlight: this.onToggleFontHighlight,
       onPreviewTextChange: this.onPreviewTextChange,
       onPropertyChange: this.onPropertyChange,
     });
 
     const provider = createElement(Provider, {
       id: "fontinspector",
@@ -802,21 +799,16 @@ class FontInspector {
    * This method is called:
    * - during initial setup;
    * - when a new node is selected;
    * - when any property is changed in the Rule view.
    * For the latter case, we compare between the latest computed style font properties
    * and the ones already in the store to decide if to update the font editor state.
    */
   async refreshFontEditor() {
-    // Early return if pref for font editor is not enabled.
-    if (!Services.prefs.getBoolPref(PREF_FONT_EDITOR)) {
-      return;
-    }
-
     if (!this.store || !this.isSelectedNodeValid()) {
       if (this.inspector.selection.isPseudoElementNode()) {
         const noPseudoWarning = getStr("fontinspector.noPseduoWarning");
         this.store.dispatch(resetFontEditor());
         this.store.dispatch(updateWarningMessage(noPseudoWarning));
         return;
       }
 
--- a/devtools/client/inspector/fonts/test/browser.ini
+++ b/devtools/client/inspector/fonts/test/browser.ini
@@ -23,11 +23,12 @@ subsuite = clipboard
 [browser_fontinspector_edit-previews.js]
 [browser_fontinspector_editor-font-size-conversion.js]
 [browser_fontinspector_editor-values.js]
 [browser_fontinspector_editor-keywords.js]
 [browser_fontinspector_expand-css-code.js]
 [browser_fontinspector_input-element-used-font.js]
 [browser_fontinspector_no-fonts.js]
 [browser_fontinspector_other-fonts.js]
+skip-if = true # Note to reviewer: this test will be removed in next part of this series.
 [browser_fontinspector_reveal-in-page.js]
 [browser_fontinspector_text-node.js]
 [browser_fontinspector_theme-change.js]
--- a/devtools/client/inspector/fonts/test/browser_fontinspector.js
+++ b/devtools/client/inspector/fonts/test/browser_fontinspector.js
@@ -3,17 +3,16 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 "use strict";
 
 requestLongerTimeout(2);
 
 const TEST_URI = URL_ROOT + "doc_browser_fontinspector.html";
 
 add_task(async function() {
-  await pushPref("devtools.inspector.fonteditor.enabled", true);
   const { inspector, view } = await openFontInspectorForURL(TEST_URI);
   ok(!!view, "Font inspector document is alive.");
 
   const viewDoc = view.document;
 
   await testBodyFonts(inspector, viewDoc);
   await testDivFonts(inspector, viewDoc);
 });
--- a/devtools/client/inspector/fonts/test/browser_fontinspector_all-fonts.js
+++ b/devtools/client/inspector/fonts/test/browser_fontinspector_all-fonts.js
@@ -4,17 +4,16 @@
 "use strict";
 
 // Check that the font editor has a section for "All fonts" which shows all fonts
 // used on the page.
 
 const TEST_URI = URL_ROOT + "doc_browser_fontinspector.html";
 
 add_task(async function() {
-  await pushPref("devtools.inspector.fonteditor.enabled", true);
   const { view } = await openFontInspectorForURL(TEST_URI);
   const viewDoc = view.document;
 
   const allFontsAccordion = getFontsAccordion(viewDoc);
   ok(allFontsAccordion, "There's an accordion in the panel");
   is(allFontsAccordion.textContent, "All fonts on page", "It has the right title");
 
   await expandAccordion(allFontsAccordion);
--- a/devtools/client/inspector/fonts/test/browser_fontinspector_copy-URL.js
+++ b/devtools/client/inspector/fonts/test/browser_fontinspector_copy-URL.js
@@ -5,17 +5,16 @@
 "use strict";
 
 // Test that an icon appears next to web font URLs, and that clicking it copies the URL
 // to the clipboard thanks to it.
 
 const TEST_URI = URL_ROOT + "doc_browser_fontinspector.html";
 
 add_task(async function() {
-  await pushPref("devtools.inspector.fonteditor.enabled", true);
   const { view, inspector } = await openFontInspectorForURL(TEST_URI);
   const viewDoc = view.document;
   await selectNode("div", inspector);
   await expandFontsAccordion(viewDoc);
   const allFontsEls = getAllFontsEls(viewDoc);
   const fontEl = allFontsEls[0];
 
   const linkEl = fontEl.querySelector(".font-origin");
--- a/devtools/client/inspector/fonts/test/browser_fontinspector_edit-previews.js
+++ b/devtools/client/inspector/fonts/test/browser_fontinspector_edit-previews.js
@@ -5,17 +5,16 @@
 
 // Test that previews change when the preview text changes. It doesn't check the
 // exact preview images because they are drawn on a canvas causing them to vary
 // between systems, platforms and software versions.
 
 const TEST_URI = URL_ROOT + "doc_browser_fontinspector.html";
 
 add_task(async function() {
-  await pushPref("devtools.inspector.fonteditor.enabled", true);
   const { view, inspector } = await openFontInspectorForURL(TEST_URI);
   const viewDoc = view.document;
   await selectNode("div", inspector);
   await expandFontsAccordion(viewDoc);
 
   const previews = viewDoc.querySelectorAll("#font-container .font-preview");
   const initialPreviews = [...previews].map(p => p.src);
 
--- a/devtools/client/inspector/fonts/test/browser_fontinspector_editor-font-size-conversion.js
+++ b/devtools/client/inspector/fonts/test/browser_fontinspector_editor-font-size-conversion.js
@@ -7,17 +7,16 @@
 
 // Unit test for math behind conversion of units for font-size. A reference element is
 // needed for converting to and from relative units (rem, em, %). A controlled viewport
 // is needed (iframe) for converting to and from viewport units (vh, vw, vmax, vmin).
 
 const TEST_URI = URL_ROOT + "doc_browser_fontinspector_iframe.html";
 
 add_task(async function() {
-  await pushPref("devtools.inspector.fonteditor.enabled", true);
   const { inspector, view } = await openFontInspectorForURL(TEST_URI);
   const viewDoc = view.document;
   const property = "font-size";
   const selector = ".viewport-size";
   const UNITS = {
     "px": 50,
     "vw": 10,
     "vh": 20,
--- a/devtools/client/inspector/fonts/test/browser_fontinspector_editor-keywords.js
+++ b/devtools/client/inspector/fonts/test/browser_fontinspector_editor-keywords.js
@@ -6,17 +6,16 @@
 "use strict";
 
 // Test that keyword values for font properties don't show up in the font editor,
 // but their computed style values show up instead.
 
 const TEST_URI = URL_ROOT + "doc_browser_fontinspector.html";
 
 add_task(async function() {
-  await pushPref("devtools.inspector.fonteditor.enabled", true);
   const { inspector, view } = await openFontInspectorForURL(TEST_URI);
   const viewDoc = view.document;
 
   await testKeywordValues(inspector, viewDoc);
 });
 
 async function testKeywordValues(inspector, viewDoc) {
   await selectNode(".bold-text", inspector);
--- a/devtools/client/inspector/fonts/test/browser_fontinspector_editor-values.js
+++ b/devtools/client/inspector/fonts/test/browser_fontinspector_editor-values.js
@@ -1,17 +1,16 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 "use strict";
 
 const TEST_URI = URL_ROOT + "doc_browser_fontinspector.html";
 
 add_task(async function() {
-  await pushPref("devtools.inspector.fonteditor.enabled", true);
   const { inspector, view } = await openFontInspectorForURL(TEST_URI);
   const viewDoc = view.document;
 
   await testDiv(inspector, viewDoc);
   await testNestedSpan(inspector, viewDoc);
 });
 
 async function testDiv(inspector, viewDoc) {
--- a/devtools/client/inspector/fonts/test/browser_fontinspector_expand-css-code.js
+++ b/devtools/client/inspector/fonts/test/browser_fontinspector_expand-css-code.js
@@ -4,17 +4,16 @@
 
 "use strict";
 
 // Test that the font-face css rule code is collapsed by default, and can be expanded.
 
 const TEST_URI = URL_ROOT + "doc_browser_fontinspector.html";
 
 add_task(async function() {
-  await pushPref("devtools.inspector.fonteditor.enabled", true);
   const { view, inspector } = await openFontInspectorForURL(TEST_URI);
   const viewDoc = view.document;
   await selectNode("div", inspector);
 
   await expandFontsAccordion(viewDoc);
   info("Checking that the css font-face rule is collapsed by default");
   const fontEl = getAllFontsEls(viewDoc)[0];
   const codeEl = fontEl.querySelector(".font-css-code");
--- a/devtools/client/inspector/fonts/test/browser_fontinspector_no-fonts.js
+++ b/devtools/client/inspector/fonts/test/browser_fontinspector_no-fonts.js
@@ -5,17 +5,16 @@
 
 // Check that the warning message for no fonts found shows up when selecting a node
 // that does not have any used fonts.
 // Ensure that no used fonts are listed.
 
 const TEST_URI = URL_ROOT + "doc_browser_fontinspector.html";
 
 add_task(async function() {
-  await pushPref("devtools.inspector.fonteditor.enabled", true);
   const { view, inspector } = await openFontInspectorForURL(TEST_URI);
   const viewDoc = view.document;
   await selectNode(".empty", inspector);
 
   info("Test the warning message for no fonts found on empty element");
   const warning = viewDoc.querySelector("#font-editor .devtools-sidepanel-no-result");
   ok(warning, "The warning for no fonts found is shown for the empty element");
 
--- a/devtools/client/inspector/fonts/test/browser_fontinspector_reveal-in-page.js
+++ b/devtools/client/inspector/fonts/test/browser_fontinspector_reveal-in-page.js
@@ -3,20 +3,16 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 "use strict";
 
 // Test that fonts usage can be revealed in the page using the FontsHighlighter.
 
 const TEST_URI = URL_ROOT + "doc_browser_fontinspector.html";
 
 add_task(async function() {
-  await pushPref("devtools.inspector.fonteditor.enabled", true);
-  // Enable the feature, since it's off by default for now.
-  await pushPref("devtools.inspector.fonthighlighter.enabled", true);
-
   // Make sure the toolbox is tall enough to accomodate all fonts, otherwise mouseover
   // events simulation will fail.
   await pushPref("devtools.toolbox.footer.height", 500);
 
   const { tab, view } = await openFontInspectorForURL(TEST_URI);
   const viewDoc = view.document;
 
   const fontEls = getUsedFontsEls(viewDoc);
--- a/devtools/client/inspector/fonts/test/browser_fontinspector_text-node.js
+++ b/devtools/client/inspector/fonts/test/browser_fontinspector_text-node.js
@@ -4,17 +4,16 @@
 
 "use strict";
 
 // Test that selecting a text node invokes the font editor on its parent node.
 
 const TEST_URI = URL_ROOT + "doc_browser_fontinspector.html";
 
 add_task(async function() {
-  await pushPref("devtools.inspector.fonteditor.enabled", true);
   const { inspector, view } = await openFontInspectorForURL(TEST_URI);
   const viewDoc = view.document;
 
   info("Select the first text node of <body>");
   const bodyNode = await getNodeFront("body", inspector);
   const { nodes } = await inspector.walker.children(bodyNode);
   const onInspectorUpdated = inspector.once("fontinspector-updated");
   await selectNode(nodes[0], inspector);
--- a/devtools/client/inspector/fonts/test/browser_fontinspector_theme-change.js
+++ b/devtools/client/inspector/fonts/test/browser_fontinspector_theme-change.js
@@ -13,17 +13,16 @@ const TEST_URI = URL_ROOT + "doc_browser
 const originalTheme = getTheme();
 
 registerCleanupFunction(() => {
   info(`Restoring theme to '${originalTheme}.`);
   setTheme(originalTheme);
 });
 
 add_task(async function() {
-  await pushPref("devtools.inspector.fonteditor.enabled", true);
   const { inspector, view } = await openFontInspectorForURL(TEST_URI);
   const viewDoc = view.document;
 
   await selectNode(".normal-text", inspector);
   await expandFontsAccordion(viewDoc);
   const allFontsEls = getAllFontsEls(viewDoc);
   const fontEl = allFontsEls[0];
 
--- a/devtools/client/inspector/fonts/test/head.js
+++ b/devtools/client/inspector/fonts/test/head.js
@@ -23,23 +23,18 @@ registerCleanupFunction(() => {
  * updating. We also need to wait for the fontinspector-updated event.
  */
 var _selectNode = selectNode;
 selectNode = async function(node, inspector, reason) {
   const onInspectorUpdated = inspector.once("fontinspector-updated");
   const onEditorUpdated = inspector.once("fonteditor-updated");
   await _selectNode(node, inspector, reason);
 
-  if (Services.prefs.getBoolPref("devtools.inspector.fonteditor.enabled")) {
-    // Wait for both the font inspetor and font editor before proceeding.
-    await Promise.all([onInspectorUpdated, onEditorUpdated]);
-  } else {
-    // Wait just for the font inspector.
-    await onInspectorUpdated;
-  }
+  // Wait for both the font inspector and font editor before proceeding.
+  await Promise.all([onInspectorUpdated, onEditorUpdated]);
 };
 
 /**
  * Adds a new tab with the given URL, opens the inspector and selects the
  * font-inspector tab.
  * @return {Promise} resolves to a {toolbox, inspector, view} object
  */
 var openFontInspectorForURL = async function(url) {
--- a/devtools/client/locales/en-US/font-inspector.properties
+++ b/devtools/client/locales/en-US/font-inspector.properties
@@ -8,20 +8,16 @@
 # LOCALIZATION NOTE (fontinspector.system) This label indicates that the font is a local
 # system font.
 fontinspector.system=system
 
 # LOCALIZATION NOTE (fontinspector.noFontsUsedOnCurrentElement): This label is shown when
 # no fonts were used on the selected element.
 fontinspector.noFontsUsedOnCurrentElement=No fonts used on the current element.
 
-# LOCALIZATION NOTE (fontinspector.otherFontsInPageHeader): This is the text for the
-# header of a collapsible section containing other fonts used in the page.
-fontinspector.otherFontsInPageHeader=Other fonts in page
-
 # LOCALIZATION NOTE (fontinspector.copyURL): This is the text that appears in a tooltip
 # displayed when the user hovers over the copy icon next to the font URL.
 # Clicking the copy icon copies the full font URL to the user's clipboard
 fontinspector.copyURL=Copy URL
 
 # LOCALIZATION NOTE (fontinspector.customInstanceName): Think of instances as presets
 # (groups of settings that apply in bulk to a thing). Instances have names. When the user
 # creates a new instance, it doesn't have a name. This is the text that appears as the
--- a/devtools/client/preferences/devtools-client.js
+++ b/devtools/client/preferences/devtools-client.js
@@ -47,18 +47,16 @@ pref("devtools.inspector.imagePreviewToo
 // Enable user agent style inspection in rule-view
 pref("devtools.inspector.showUserAgentStyles", false);
 // Show all native anonymous content
 pref("devtools.inspector.showAllAnonymousContent", false);
 // Show user agent shadow roots
 pref("devtools.inspector.showUserAgentShadowRoots", false);
 // Enable the CSS shapes highlighter
 pref("devtools.inspector.shapesHighlighter.enabled", true);
-// Enable the Font Editor
-pref("devtools.inspector.fonteditor.enabled", true);
 // Enable the font highlight-on-hover feature
 pref("devtools.inspector.fonthighlighter.enabled", true);
 // Enable tracking of style changes and the Changes panel in the Inspector
 pref("devtools.inspector.changes.enabled", false);
 
 // Flexbox preferences
 // Enable the Flexbox highlighter and inspector panel in Nightly and DevEdition
 #if defined(NIGHTLY_BUILD) || defined(MOZ_DEV_EDITION)