зеркало из https://github.com/mozilla/gecko-dev.git
Bug 785047 - force disable oop when JAWS is running, r=joshmoz
This commit is contained in:
Родитель
cf01198f7d
Коммит
faae05f1a0
|
@ -66,6 +66,7 @@ EXPORTS_NAMESPACES = mozilla/a11y \
|
|||
|
||||
EXPORTS_mozilla/a11y = \
|
||||
AccessibleWrap.h \
|
||||
Compatibility.h \
|
||||
HyperTextAccessibleWrap.h \
|
||||
$(null)
|
||||
|
||||
|
|
|
@ -94,6 +94,9 @@ using mozilla::plugins::PluginModuleParent;
|
|||
#ifdef XP_WIN
|
||||
#include <windows.h>
|
||||
#include "nsWindowsHelpers.h"
|
||||
#ifdef ACCESSIBILITY
|
||||
#include "mozilla/a11y/Compatibility.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
|
@ -254,11 +257,24 @@ nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
// Certain assistive technologies don't want oop Flash, thus we have a special
|
||||
// pref for them to disable oop Flash (refer to bug 785047 for details).
|
||||
bool useA11yPref = false;
|
||||
#endif
|
||||
|
||||
#ifdef XP_WIN
|
||||
useA11yPref = a11y::Compatibility::IsJAWS();
|
||||
|
||||
// On Windows Vista+, we force Flash to run in OOPP mode because Adobe
|
||||
// doesn't test Flash in-process and there are known stability bugs.
|
||||
if (aPluginTag->mIsFlashPlugin && IsVistaOrLater()) {
|
||||
#ifdef ACCESSIBILITY
|
||||
if (!useA11yPref)
|
||||
return true;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -291,6 +307,11 @@ nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
|
|||
nsAutoCString prefGroupKey("dom.ipc.plugins.enabled.");
|
||||
#endif
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
if (useA11yPref)
|
||||
prefGroupKey.AssignLiteral("dom.ipc.plugins.enabled.a11y.");
|
||||
#endif
|
||||
|
||||
// Java plugins include a number of different file names,
|
||||
// so use the mime type (mIsJavaPlugin) and a special pref.
|
||||
if (aPluginTag->mIsJavaPlugin &&
|
||||
|
@ -345,6 +366,9 @@ nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
|
|||
Preferences::GetBool("dom.ipc.plugins.enabled.ppc", false);
|
||||
#endif
|
||||
#else
|
||||
#ifdef ACCESSIBILITY
|
||||
useA11yPref ? Preferences::GetBool("dom.ipc.plugins.enabled.a11y", false) :
|
||||
#endif
|
||||
Preferences::GetBool("dom.ipc.plugins.enabled", false);
|
||||
#endif
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче