Bug 1257242 - Improve RTL checks to actually check for RTL instead of using a hardcoded list. r=jimm
This does the much more correct check instead of relying on the list proposed in
bug 1234673.
MozReview-Commit-ID: Kb4Tls3eZhb
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -4706,40 +4706,28 @@ MultiprocessBlockPolicy() {
}
/**
* Avoids enabling e10s for certain locales that require bidi selection,
* which currently doesn't work well with e10s.
*/
bool disabledForBidi = false;
- nsAutoCString locale;
nsCOMPtr<nsIXULChromeRegistry> registry =
mozilla::services::GetXULChromeRegistryService();
if (registry) {
- registry->GetSelectedLocale(NS_LITERAL_CSTRING("global"), locale);
- }
-
- int32_t index = locale.FindChar('-');
- if (index >= 0) {
- locale.Truncate(index);
- }
-
- if (locale.EqualsLiteral("ar") ||
- locale.EqualsLiteral("fa") ||
- locale.EqualsLiteral("he") ||
- locale.EqualsLiteral("ur")) {
- disabledForBidi = true;
+ disabledForBidi = registry->IsLocaleRTL(NS_LITERAL_CSTRING("global"));
}
if (disabledForBidi) {
gMultiprocessBlockPolicy = kE10sDisabledForBidi;
return gMultiprocessBlockPolicy;
}
+
#if defined(XP_MACOSX)
// If for any reason we suspect acceleration will be disabled, disable
// e10s auto start on mac.
// Check prefs
bool accelDisabled = gfxPrefs::GetSingleton().LayersAccelerationDisabled() &&
!gfxPrefs::LayersAccelerationForceEnabled();