Bug 1257242 - Improve RTL checks to actually check for RTL instead of using a hardcoded list. r=jimm a=lizzard
authorFelipe Gomes <felipc@gmail.com>
Wed, 16 Mar 2016 17:31:31 -0300
changeset 323531 04a77624807ac4866687e5d07848dfcb5788b95c
parent 323530 cd896a92fe69c7430cdf9c08086c2aa06a4abe29
child 323532 3fc13868be73dc37be1b8164540467fd554631a1
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm, lizzard
bugs1257242
milestone47.0a2
Bug 1257242 - Improve RTL checks to actually check for RTL instead of using a hardcoded list. r=jimm a=lizzard MozReview-Commit-ID: 5uBNCMooB6o
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -4730,40 +4730,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;
+     registry->IsLocaleRTL(NS_LITERAL_CSTRING("global"), &disabledForBidi);
   }
 
   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();