From 2a7901349fd3784a824407f084eb1bd1a5dca3c8 Mon Sep 17 00:00:00 2001 From: Jim Mathies Date: Fri, 8 Sep 2017 09:31:06 -0500 Subject: [PATCH] Bug 1387507 - Remove a11y e10s checks and preferences. r=felipe --- browser/app/profile/firefox.js | 6 -- browser/components/nsBrowserGlue.js | 133 --------------------------- browser/themes/linux/jar.mn | 3 - browser/themes/osx/jar.mn | 3 - browser/themes/shared/e10s-64@2x.png | Bin 20737 -> 0 bytes browser/themes/windows/jar.mn | 4 - dom/ipc/ContentParent.cpp | 23 +---- toolkit/xre/nsAppRunner.cpp | 48 +--------- widget/nsBaseWidget.cpp | 22 ----- widget/nsBaseWidget.h | 3 - 10 files changed, 5 insertions(+), 240 deletions(-) delete mode 100644 browser/themes/shared/e10s-64@2x.png diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 5c394b96deb2..b352e9111d64 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -667,9 +667,6 @@ pref("accessibility.typeaheadfind.timeout", 5000); pref("accessibility.typeaheadfind.linksonly", false); pref("accessibility.typeaheadfind.flashBar", 1); -// Tracks when accessibility is loaded into the previous session. -pref("accessibility.loadedInLastSession", false); - pref("plugins.click_to_play", true); pref("plugins.testmode", false); @@ -980,9 +977,6 @@ pref("toolkit.crashreporter.infoURL", // base URL for web-based support pages pref("app.support.baseURL", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/"); -// a11y conflicts with e10s support page -pref("app.support.e10sAccessibilityUrl", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/accessibility-ppt"); - // base url for web-based feedback pages #ifdef MOZ_DEV_EDITION pref("app.feedback.baseURL", "https://input.mozilla.org/%LOCALE%/feedback/firefoxdev/%VERSION%/"); diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index e2d724ffc3cd..ed065b8fd561 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -528,13 +528,6 @@ BrowserGlue.prototype = { this._flashHangCount = 0; this._firstWindowReady = new Promise(resolve => this._firstWindowLoaded = resolve); - - if (AppConstants.platform == "macosx" || - (AppConstants.platform == "win" && AppConstants.RELEASE_OR_BETA)) { - // Handles prompting to inform about incompatibilites when accessibility - // and e10s are active together. - E10SAccessibilityCheck.init(); - } }, // cleanup (called on application shutdown) @@ -1009,10 +1002,7 @@ BrowserGlue.prototype = { } this._sanitizer.onStartup(); - E10SAccessibilityCheck.onWindowsRestored(); - this._scheduleStartupIdleTasks(); - this._lateTasksIdleObserver = (idleService, topic, data) => { if (topic == "idle") { idleService.removeIdleObserver(this._lateTasksIdleObserver, @@ -2787,132 +2777,9 @@ var DefaultBrowserCheck = { }, }; -var E10SAccessibilityCheck = { - // tracks when an a11y init observer fires prior to the - // first window being opening. - _wantsPrompt: false, - - init() { - Services.obs.addObserver(this, "a11y-init-or-shutdown", true); - Services.obs.addObserver(this, "quit-application-granted", true); - }, - - QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]), - - get forcedOn() { - try { - return Services.prefs.getBoolPref("browser.tabs.remote.force-enable"); - } catch (e) {} - return false; - }, - - observe(subject, topic, data) { - switch (topic) { - case "quit-application-granted": - // Tag the profile with a11y load state. We use this in nsAppRunner - // checks on the next start. - Services.prefs.setBoolPref("accessibility.loadedInLastSession", - Services.appinfo.accessibilityEnabled); - break; - case "a11y-init-or-shutdown": - if (data == "1") { - // Update this so users can check this while still running - Services.prefs.setBoolPref("accessibility.loadedInLastSession", true); - this._showE10sAccessibilityWarning(); - } - break; - } - }, - - onWindowsRestored() { - if (this._wantsPrompt) { - this._wantsPrompt = false; - this._showE10sAccessibilityWarning(); - } - }, - - _warnedAboutAccessibility: false, - - _showE10sAccessibilityWarning() { - // We don't prompt about a11y incompat if e10s is off. - if (!Services.appinfo.browserTabsRemoteAutostart) { - return; - } - - // If the user set the forced pref and it's true, ignore a11y init. - // If the pref doesn't exist or if it's false, prompt. - if (this.forcedOn) { - return; - } - - // Only prompt once per session - if (this._warnedAboutAccessibility) { - return; - } - this._warnedAboutAccessibility = true; - - let win = RecentWindow.getMostRecentBrowserWindow(); - if (!win || !win.gBrowser || !win.gBrowser.selectedBrowser) { - Services.console.logStringMessage( - "Accessibility support is partially disabled due to compatibility issues with new features."); - this._wantsPrompt = true; - this._warnedAboutAccessibility = false; - return; - } - let browser = win.gBrowser.selectedBrowser; - - // We disable a11y for content and prompt on the chrome side letting - // a11y users know they need to disable e10s and restart. - let promptMessage = win.gNavigatorBundle.getFormattedString( - "e10s.accessibilityNotice.mainMessage2", - [gBrandBundle.GetStringFromName("brandShortName")] - ); - let notification; - let restartCallback = function() { - let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool); - Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart"); - if (cancelQuit.data) { - return; // somebody canceled our quit request - } - // Restart the browser - Services.startup.quit(Services.startup.eAttemptQuit | Services.startup.eRestart); - }; - // main option: an Ok button, keeps running with content accessibility disabled - let mainAction = { - label: win.gNavigatorBundle.getString("e10s.accessibilityNotice.acceptButton.label"), - accessKey: win.gNavigatorBundle.getString("e10s.accessibilityNotice.acceptButton.accesskey"), - callback() { - // If the user invoked the button option remove the notification, - // otherwise keep the alert icon around in the address bar. - notification.remove(); - }, - dismiss: true - }; - // secondary option: a restart now button. When we restart e10s will be disabled due to - // accessibility having been loaded in the previous session. - let secondaryActions = [{ - label: win.gNavigatorBundle.getString("e10s.accessibilityNotice.enableAndRestart.label"), - accessKey: win.gNavigatorBundle.getString("e10s.accessibilityNotice.enableAndRestart.accesskey"), - callback: restartCallback, - }]; - let options = { - popupIconURL: "chrome://browser/skin/e10s-64@2x.png", - learnMoreURL: Services.urlFormatter.formatURLPref("app.support.e10sAccessibilityUrl"), - persistent: true, - persistWhileVisible: true, - }; - - notification = - win.PopupNotifications.show(browser, "a11y_enabled_with_e10s", - promptMessage, null, mainAction, - secondaryActions, options); - }, -}; - var components = [BrowserGlue, ContentPermissionPrompt]; this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components); - // Listen for UITour messages. // Do it here instead of the UITour module itself so that the UITour module is lazy loaded // when the first message is received. diff --git a/browser/themes/linux/jar.mn b/browser/themes/linux/jar.mn index 2adb9e9b52d0..dbc8f2b2188c 100644 --- a/browser/themes/linux/jar.mn +++ b/browser/themes/linux/jar.mn @@ -63,9 +63,6 @@ browser.jar: skin/classic/browser/sync-desktopIcon.svg (../shared/sync-desktopIcon.svg) skin/classic/browser/sync-mobileIcon.svg (../shared/sync-mobileIcon.svg) -#ifdef E10S_TESTING_ONLY - skin/classic/browser/e10s-64@2x.png (../shared/e10s-64@2x.png) -#endif [extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}] chrome.jar: % override chrome://browser/skin/feeds/audioFeedIcon.png chrome://browser/skin/feeds/feedIcon.png diff --git a/browser/themes/osx/jar.mn b/browser/themes/osx/jar.mn index a9118ce7c893..45c47e74069f 100644 --- a/browser/themes/osx/jar.mn +++ b/browser/themes/osx/jar.mn @@ -87,9 +87,6 @@ browser.jar: skin/classic/browser/yosemite/menuPanel-exit@2x.png (menuPanel-exit-yosemite@2x.png) skin/classic/browser/yosemite/menuPanel-help.png (menuPanel-help-yosemite.png) skin/classic/browser/yosemite/menuPanel-help@2x.png (menuPanel-help-yosemite@2x.png) -#ifdef E10S_TESTING_ONLY - skin/classic/browser/e10s-64@2x.png (../shared/e10s-64@2x.png) -#endif [extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}] chrome.jar: % override chrome://browser/skin/feeds/audioFeedIcon.png chrome://browser/skin/feeds/feedIcon.png diff --git a/browser/themes/shared/e10s-64@2x.png b/browser/themes/shared/e10s-64@2x.png deleted file mode 100644 index 1dc243865cfb412f03aa372d30fa769fd3fd5eac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20737 zcmeI4c|4Te+rV#23`vqS2@O#cW=4ZCWEo`1*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GVtNSo+}`68}prJVPVOnm2hIb{-O%Kk%~)r373o<~Tp6oki=_Q0g}Pb>nq^p< Gu>S#vBZtfY diff --git a/browser/themes/windows/jar.mn b/browser/themes/windows/jar.mn index e907eebc40f3..27625dd8661f 100644 --- a/browser/themes/windows/jar.mn +++ b/browser/themes/windows/jar.mn @@ -83,10 +83,6 @@ browser.jar: skin/classic/browser/window-controls/restore-highcontrast.svg (window-controls/restore-highcontrast.svg) skin/classic/browser/window-controls/restore-themes.svg (window-controls/restore-themes.svg) -#ifdef E10S_TESTING_ONLY - skin/classic/browser/e10s-64@2x.png (../shared/e10s-64@2x.png) -#endif - [extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}] chrome.jar: % override chrome://browser/skin/page-livemarks.png chrome://browser/skin/feeds/feedIcon16.png % override chrome://browser/skin/feeds/audioFeedIcon.png chrome://browser/skin/feeds/feedIcon.png diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 2459a16dd640..f0e36580736e 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -268,11 +268,6 @@ static NS_DEFINE_CID(kCClipboardCID, NS_CLIPBOARD_CID); -#if defined(XP_WIN) -// e10s forced enable pref, defined in nsAppRunner.cpp -extern const char* kForceEnableE10sPref; -#endif - using base::ChildPrivileges; using base::KillProcess; @@ -1311,13 +1306,8 @@ ContentParent::Init() // process. if (nsIPresShell::IsAccessibilityActive()) { #if defined(XP_WIN) -#if defined(RELEASE_OR_BETA) - // On Windows we currently only enable a11y in the content process - // for testing purposes. - if (Preferences::GetBool(kForceEnableE10sPref, false)) -#endif - Unused << SendActivateA11y(::GetCurrentThreadId(), - a11y::AccessibleWrap::GetContentProcessIdFor(ChildID())); + Unused << SendActivateA11y(::GetCurrentThreadId(), + a11y::AccessibleWrap::GetContentProcessIdFor(ChildID())); #else Unused << SendActivateA11y(0, 0); #endif @@ -2851,13 +2841,8 @@ ContentParent::Observe(nsISupports* aSubject, // Make sure accessibility is running in content process when // accessibility gets initiated in chrome process. #if defined(XP_WIN) -#if defined(RELEASE_OR_BETA) - // On Windows we currently only enable a11y in the content process - // for testing purposes. - if (Preferences::GetBool(kForceEnableE10sPref, false)) -#endif - Unused << SendActivateA11y(::GetCurrentThreadId(), - a11y::AccessibleWrap::GetContentProcessIdFor(ChildID())); + Unused << SendActivateA11y(::GetCurrentThreadId(), + a11y::AccessibleWrap::GetContentProcessIdFor(ChildID())); #else Unused << SendActivateA11y(0, 0); #endif diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index cb853d090c30..7f8f2e4503f2 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -5047,7 +5047,7 @@ enum { kE10sEnabledByDefault = 1, kE10sDisabledByUser = 2, // kE10sDisabledInSafeMode = 3, was removed in bug 1172491. - kE10sDisabledForAccessibility = 4, + // kE10sDisabledForAccessibility = 4, // kE10sDisabledForMacGfx = 5, was removed in bug 1068674. // kE10sDisabledForBidi = 6, removed in bug 1309599 kE10sDisabledForAddons = 7, @@ -5056,18 +5056,6 @@ enum { // kE10sDisabledForOperatingSystem = 10, removed due to xp-eol }; -const char* kAccessibilityLastRunDatePref = "accessibility.lastLoadDate"; -const char* kAccessibilityLoadedLastSessionPref = "accessibility.loadedInLastSession"; - -#if defined(XP_WIN) -static inline uint32_t -PRTimeToSeconds(PRTime t_usec) -{ - PRTime usec_per_sec = PR_USEC_PER_SEC; - return uint32_t(t_usec /= usec_per_sec); -} -#endif - const char* kForceEnableE10sPref = "browser.tabs.remote.force-enable"; const char* kForceDisableE10sPref = "browser.tabs.remote.force-disable"; @@ -5095,40 +5083,6 @@ MultiprocessBlockPolicy() return kE10sDisabledForAddons; } -#if defined(XP_WIN) && defined(RELEASE_OR_BETA) - bool disabledForA11y = false; - /** - * Avoids enabling e10s if accessibility has recently loaded. Performs the - * following checks: - * 1) Checks a pref indicating if a11y loaded in the last session. This pref - * is set in nsBrowserGlue.js. If a11y was loaded in the last session we - * do not enable e10s in this session. - * 2) Accessibility stores a last run date (PR_IntervalNow) when it is - * initialized (see nsBaseWidget.cpp). We check if this pref exists and - * compare it to now. If a11y hasn't run in an extended period of time or - * if the date pref does not exist we load e10s. - */ - disabledForA11y = Preferences::GetBool(kAccessibilityLoadedLastSessionPref, false); - if (!disabledForA11y && - Preferences::HasUserValue(kAccessibilityLastRunDatePref)) { - const uint32_t oneWeekInSeconds = 60 * 60 * 24 * 7; - uint32_t a11yRunDate = Preferences::GetInt(kAccessibilityLastRunDatePref, 0); - MOZ_ASSERT(0 != a11yRunDate); - // If a11y hasn't run for a period of time, clear the pref and load e10s - uint32_t now = PRTimeToSeconds(PR_Now()); - uint32_t difference = now - a11yRunDate; - if (difference > oneWeekInSeconds || !a11yRunDate) { - Preferences::ClearUser(kAccessibilityLastRunDatePref); - } else { - disabledForA11y = true; - } - } - - if (disabledForA11y) { - return kE10sDisabledForAccessibility; - } -#endif - /* * None of the blocking policies matched, so e10s is allowed to run. Return * 0, indicating success. diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp index b62cbc3d19bd..996409f45db1 100644 --- a/widget/nsBaseWidget.cpp +++ b/widget/nsBaseWidget.cpp @@ -176,9 +176,6 @@ nsBaseWidget::nsBaseWidget() , mUseAttachedEvents(false) , mIMEHasFocus(false) , mIsFullyOccluded(false) -#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK) -, mAccessibilityInUseFlag(false) -#endif { #ifdef NOISY_WIDGET_LEAKS gNumWidgets++; @@ -1891,18 +1888,6 @@ nsBaseWidget::ZoomToRect(const uint32_t& aPresShellId, #ifdef ACCESSIBILITY -#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK) -// defined in nsAppRunner.cpp -extern const char* kAccessibilityLastRunDatePref; - -static inline uint32_t -PRTimeToSeconds(PRTime t_usec) -{ - PRTime usec_per_sec = PR_USEC_PER_SEC; - return uint32_t(t_usec /= usec_per_sec); -} -#endif - a11y::Accessible* nsBaseWidget::GetRootAccessible() { @@ -1920,13 +1905,6 @@ nsBaseWidget::GetRootAccessible() // make sure it's not created at unsafe times. nsAccessibilityService* accService = GetOrCreateAccService(); if (accService) { -#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK) - if (!mAccessibilityInUseFlag) { - mAccessibilityInUseFlag = true; - uint32_t now = PRTimeToSeconds(PR_Now()); - Preferences::SetInt(kAccessibilityLastRunDatePref, now); - } -#endif return accService->GetRootDocumentAccessible(presShell, nsContentUtils::IsSafeToRunScript()); } diff --git a/widget/nsBaseWidget.h b/widget/nsBaseWidget.h index 110a7df69a0d..6d6b93ea73d6 100644 --- a/widget/nsBaseWidget.h +++ b/widget/nsBaseWidget.h @@ -696,9 +696,6 @@ protected: bool mUseAttachedEvents; bool mIMEHasFocus; bool mIsFullyOccluded; -#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK) - bool mAccessibilityInUseFlag; -#endif static nsIRollupListener* gRollupListener; struct InitialZoomConstraints {