Bug 1159327 - Enable accessibility more broadly with e10s and add an e10s a11y blacklist for clients with known issues. r=tbsaunde

This commit is contained in:
Jim Mathies 2015-04-30 16:43:19 -05:00
parent a1f973c5b0
commit e7d3315589
4 changed files with 36 additions and 11 deletions

View File

@ -39,6 +39,26 @@ public:
*/ */
static bool IsDolphin() { return !!(sConsumers & DOLPHIN); } static bool IsDolphin() { return !!(sConsumers & DOLPHIN); }
/**
* Return true if we should disable e10s due to a detected
* accessibility client.
*/
static bool IsBlacklistedForE10S()
{
// We currently blacklist everything except UNKNOWN and UIAUTOMATION
return !!(sConsumers &
(NVDA |
JAWS |
OLDJAWS |
WE |
DOLPHIN |
SEROTEK |
COBRA |
ZOOMTEXT |
KAZAGURU |
YOUDAO));
}
private: private:
Compatibility(); Compatibility();
Compatibility(const Compatibility&); Compatibility(const Compatibility&);

View File

@ -2811,8 +2811,7 @@ let E10SUINotification = {
// e10s doesn't work with accessibility, so we prompt to disable // e10s doesn't work with accessibility, so we prompt to disable
// e10s if a11y is enabled, now or in the future. // e10s if a11y is enabled, now or in the future.
Services.obs.addObserver(this, "a11y-init-or-shutdown", true); Services.obs.addObserver(this, "a11y-init-or-shutdown", true);
if (Services.appinfo.accessibilityEnabled && if (Services.appinfo.accessibilityIsBlacklistedForE10S) {
!Services.appinfo.accessibilityIsUIA) {
this._showE10sAccessibilityWarning(); this._showE10sAccessibilityWarning();
} }
} else { } else {

View File

@ -105,6 +105,9 @@
#ifdef ACCESSIBILITY #ifdef ACCESSIBILITY
#include "nsAccessibilityService.h" #include "nsAccessibilityService.h"
#if defined(XP_WIN)
#include "mozilla/a11y/Compatibility.h"
#endif
#endif #endif
#include "nsCRT.h" #include "nsCRT.h"
@ -859,17 +862,20 @@ nsXULAppInfo::GetAccessibilityEnabled(bool* aResult)
} }
NS_IMETHODIMP NS_IMETHODIMP
nsXULAppInfo::GetAccessibilityIsUIA(bool* aResult) nsXULAppInfo::GetAccessibilityIsBlacklistedForE10S(bool* aResult)
{ {
*aResult = false; *aResult = false;
#if defined(ACCESSIBILITY) && defined(XP_WIN) #if defined(ACCESSIBILITY)
// This is the same check the a11y service does to identify uia clients. #if defined(XP_WIN)
if (GetAccService() != nullptr && if (GetAccService() && mozilla::a11y::Compatibility::IsBlacklistedForE10S()) {
(::GetModuleHandleW(L"uiautomation") || *aResult = true;
::GetModuleHandleW(L"uiautomationcore"))) { }
#elif defined(XP_MACOSX)
if (GetAccService()) {
*aResult = true; *aResult = true;
} }
#endif #endif
#endif // defined(ACCESSIBILITY)
return NS_OK; return NS_OK;
} }

View File

@ -23,7 +23,7 @@ bool BrowserTabsRemoteAutostart();
* stable/frozen, please contact Benjamin Smedberg. * stable/frozen, please contact Benjamin Smedberg.
*/ */
[scriptable, uuid(c4cd11c4-6e8e-49da-85a8-dad3b7605bc3)] [scriptable, uuid(ce9d05f4-0c20-4f52-87e1-3a425e61e2f3)]
interface nsIXULRuntime : nsISupports interface nsIXULRuntime : nsISupports
{ {
/** /**
@ -97,10 +97,10 @@ interface nsIXULRuntime : nsISupports
readonly attribute boolean accessibilityEnabled; readonly attribute boolean accessibilityEnabled;
/** /**
* Indicates if the active accessibility client is UIA. * Indicates if the active accessibility client is blacklisted for e10s.
* DO NOT USE! This is temporary and will be removed. * DO NOT USE! This is temporary and will be removed.
*/ */
readonly attribute boolean accessibilityIsUIA; readonly attribute boolean accessibilityIsBlacklistedForE10S;
/** /**
* Indicates whether the current Firefox build is 64-bit. * Indicates whether the current Firefox build is 64-bit.