Bug 1482454 - enabled accessibility panel by default. r=gl
☠☠ backed out by 7800cf98a6e7 ☠ ☠
authorYura Zenevich <yura.zenevich@gmail.com>
Fri, 10 Aug 2018 13:40:10 -0400
changeset 432120 f06260e3db1c62e7e24845fb4d92a6d7c6093427
parent 432119 3fbca6f83bebebd4e70cedf950d0090a67512067
child 432121 1cdd772dae68706d8359c4aae5b5316981f6ce44
push id106638
push useryura.zenevich@gmail.com
push dateFri, 17 Aug 2018 14:33:55 +0000
treeherdermozilla-inbound@3ada76566234 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1482454
milestone63.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 1482454 - enabled accessibility panel by default. r=gl MozReview-Commit-ID: K18YgGgmxOV
devtools/client/framework/toolbox-process-window.js
devtools/client/inspector/inspector.js
devtools/client/preferences/devtools-client.js
--- a/devtools/client/framework/toolbox-process-window.js
+++ b/devtools/client/framework/toolbox-process-window.js
@@ -99,17 +99,16 @@ function setPrefDefaults() {
   Services.prefs.setBoolPref("browser.dom.window.dump.enabled", true);
   Services.prefs.setBoolPref("devtools.command-button-noautohide.enabled", true);
   // Bug 1225160 - Using source maps with browser debugging can lead to a crash
   Services.prefs.setBoolPref("devtools.debugger.source-maps-enabled", false);
   Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", true);
   Services.prefs.setBoolPref("devtools.preference.new-panel-enabled", false);
   Services.prefs.setBoolPref("layout.css.emulate-moz-box-with-flex", false);
 
-  Services.prefs.setBoolPref("devtools.accessibility.enabled", true);
   Services.prefs.setBoolPref("devtools.performance.enabled", false);
 }
 
 window.addEventListener("load", async function() {
   const cmdClose = document.getElementById("toolbox-cmd-close");
   cmdClose.addEventListener("command", onCloseCommand);
   setPrefDefaults();
   // Reveal status message if connecting is slow or if an error occurs.
--- a/devtools/client/inspector/inspector.js
+++ b/devtools/client/inspector/inspector.js
@@ -1692,17 +1692,23 @@ Inspector.prototype = {
     }
 
     const showA11YPropsItem = new MenuItem({
       id: "node-menu-showaccessibilityproperties",
       label: INSPECTOR_L10N.getStr("inspectorShowAccessibilityProperties.label"),
       click: () => this.showAccessibilityProperties(),
       disabled: true
     });
-    this._updateA11YMenuItem(showA11YPropsItem);
+    // Accessibility startup component maintains accessibilityFront that is up-to-date
+    // with the state of the accessibility service on the server side.
+    const startup = this._toolbox.getToolStartup("accessibility");
+    if (startup && startup.accessibility.enabled) {
+      this._updateA11YMenuItem(showA11YPropsItem);
+    }
+
     menu.append(showA11YPropsItem);
   },
 
   _updateA11YMenuItem: async function(menuItem) {
     const hasMethod = await this.target.actorHasMethod("domwalker",
                                                        "hasAccessibilityProperties");
     if (!hasMethod) {
       return;
--- a/devtools/client/preferences/devtools-client.js
+++ b/devtools/client/preferences/devtools-client.js
@@ -223,17 +223,17 @@ pref("devtools.webaudioeditor.enabled", 
 
 // Enable Scratchpad
 pref("devtools.scratchpad.enabled", false);
 
 // Make sure the DOM panel is hidden by default
 pref("devtools.dom.enabled", false);
 
 // Make sure the Accessibility panel is hidden by default
-pref("devtools.accessibility.enabled", false);
+pref("devtools.accessibility.enabled", true);
 
 // Web Audio Editor Inspector Width should be a preference
 pref("devtools.webaudioeditor.inspectorWidth", 300);
 
 // Web console filters
 pref("devtools.webconsole.filter.error", true);
 pref("devtools.webconsole.filter.warn", true);
 pref("devtools.webconsole.filter.info", true);