Bug 1198459 - Prevent accessibility from initializing in content processes when e10s is running. r=tbsaunde

This commit is contained in:
Jim Mathies 2015-12-09 08:35:06 -05:00
parent b9f74ef190
commit 06f24062b9
4 changed files with 22 additions and 45 deletions

View File

@ -39,26 +39,6 @@ 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

@ -271,6 +271,11 @@ using namespace mozilla::system;
static NS_DEFINE_CID(kCClipboardCID, NS_CLIPBOARD_CID); 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::ChildPrivileges;
using base::KillProcess; using base::KillProcess;
#ifdef MOZ_ENABLE_PROFILER_SPS #ifdef MOZ_ENABLE_PROFILER_SPS
@ -1555,7 +1560,15 @@ ContentParent::Init()
// If accessibility is running in chrome process then start it in content // If accessibility is running in chrome process then start it in content
// process. // process.
if (nsIPresShell::IsAccessibilityActive()) { if (nsIPresShell::IsAccessibilityActive()) {
#if !defined(XP_WIN)
Unused << SendActivateA11y(); Unused << SendActivateA11y();
#else
// On Windows we currently only enable a11y in the content process
// for testing purposes.
if (Preferences::GetBool(kForceEnableE10sPref, false)) {
Unused << SendActivateA11y();
}
#endif
} }
#endif #endif
@ -3334,7 +3347,15 @@ ContentParent::Observe(nsISupports* aSubject,
// gets initiated in chrome process. // gets initiated in chrome process.
else if (aData && (*aData == '1') && else if (aData && (*aData == '1') &&
!strcmp(aTopic, "a11y-init-or-shutdown")) { !strcmp(aTopic, "a11y-init-or-shutdown")) {
#if !defined(XP_WIN)
Unused << SendActivateA11y(); Unused << SendActivateA11y();
#else
// On Windows we currently only enable a11y in the content process
// for testing purposes.
if (Preferences::GetBool(kForceEnableE10sPref, false)) {
Unused << SendActivateA11y();
}
#endif
} }
#endif #endif
else if (!strcmp(aTopic, "app-theme-changed")) { else if (!strcmp(aTopic, "app-theme-changed")) {

View File

@ -1023,24 +1023,6 @@ nsXULAppInfo::GetAccessibilityEnabled(bool* aResult)
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP
nsXULAppInfo::GetAccessibilityIsBlacklistedForE10S(bool* aResult)
{
*aResult = false;
#if defined(ACCESSIBILITY)
#if defined(XP_WIN)
if (GetAccService() && mozilla::a11y::Compatibility::IsBlacklistedForE10S()) {
*aResult = true;
}
#elif defined(XP_MACOSX)
if (GetAccService()) {
*aResult = true;
}
#endif
#endif // defined(ACCESSIBILITY)
return NS_OK;
}
NS_IMETHODIMP NS_IMETHODIMP
nsXULAppInfo::GetIs64Bit(bool* aResult) nsXULAppInfo::GetIs64Bit(bool* aResult)
{ {

View File

@ -23,7 +23,7 @@ bool BrowserTabsRemoteAutostart();
* stable/frozen, please contact Benjamin Smedberg. * stable/frozen, please contact Benjamin Smedberg.
*/ */
[scriptable, uuid(ce9d05f4-0c20-4f52-87e1-3a425e61e2f3)] [scriptable, uuid(a1b2e167-b748-42bf-ba85-996ec39062b9)]
interface nsIXULRuntime : nsISupports interface nsIXULRuntime : nsISupports
{ {
/** /**
@ -96,12 +96,6 @@ interface nsIXULRuntime : nsISupports
*/ */
readonly attribute boolean accessibilityEnabled; readonly attribute boolean accessibilityEnabled;
/**
* Indicates if the active accessibility client is blacklisted for e10s.
* DO NOT USE! This is temporary and will be removed.
*/
readonly attribute boolean accessibilityIsBlacklistedForE10S;
/** /**
* Indicates whether the current Firefox build is 64-bit. * Indicates whether the current Firefox build is 64-bit.
*/ */