Bug 1310788: Modify ContentParent to initialize Windows a11y on e10s; r?jimm
MozReview-Commit-ID: Kz92scZsbh2
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -31,16 +31,17 @@
#include "DeviceStorageStatics.h"
#include "GMPServiceParent.h"
#include "HandlerServiceParent.h"
#include "IHistory.h"
#include "imgIContainer.h"
#include "mozIApplication.h"
#if defined(XP_WIN) && defined(ACCESSIBILITY)
#include "mozilla/a11y/AccessibleWrap.h"
+#include "mozilla/WindowsVersion.h"
#endif
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/StyleSheetInlines.h"
#include "mozilla/DataStorage.h"
#include "mozilla/devtools/HeapSnapshotTempFileHelperParent.h"
#include "mozilla/docshell/OfflineCacheUpdateParent.h"
#include "mozilla/dom/DataTransfer.h"
#include "mozilla/dom/DOMStorageIPC.h"
@@ -1356,24 +1357,22 @@ ContentParent::Init()
cpId.AppendInt(static_cast<uint64_t>(this->ChildID()));
obs->NotifyObservers(static_cast<nsIObserver*>(this), "ipc:content-created", cpId.get());
}
#ifdef ACCESSIBILITY
// If accessibility is running in chrome process then start it in content
// process.
if (nsIPresShell::IsAccessibilityActive()) {
-#if !defined(XP_WIN)
- Unused << SendActivateA11y();
-#else
- // On Windows we currently only enable a11y in the content process
- // for testing purposes.
- if (Preferences::GetBool(kForceEnableE10sPref, false)) {
+#if defined(XP_WIN)
+ if (IsVistaOrLater()) {
Unused << SendActivateA11y();
}
+#else
+ Unused << SendActivateA11y();
#endif
}
#endif
#ifdef MOZ_ENABLE_PROFILER_SPS
nsCOMPtr<nsIProfiler> profiler(do_GetService("@mozilla.org/tools/profiler;1"));
bool profilerActive = false;
DebugOnly<nsresult> rv = profiler->IsActive(&profilerActive);
@@ -2787,24 +2786,22 @@ ContentParent::Observe(nsISupports* aSub
Unused << SendVolumeRemoved(volName);
}
#endif
#ifdef ACCESSIBILITY
else if (aData && !strcmp(aTopic, "a11y-init-or-shutdown")) {
if (*aData == '1') {
// Make sure accessibility is running in content process when
// accessibility gets initiated in chrome process.
-#if !defined(XP_WIN)
- Unused << SendActivateA11y();
-#else
- // On Windows we currently only enable a11y in the content process
- // for testing purposes.
- if (Preferences::GetBool(kForceEnableE10sPref, false)) {
+#if defined(XP_WIN)
+ if (IsVistaOrLater()) {
Unused << SendActivateA11y();
}
+#else
+ Unused << SendActivateA11y();
#endif
} else {
// If possible, shut down accessibility in content process when
// accessibility gets shutdown in chrome process.
Unused << SendShutdownA11y();
}
}
#endif