Bug 1257242 - Improve RTL checks to actually check for RTL instead of using a hardcoded list. r=jimm a=lizzard

MozReview-Commit-ID: 5uBNCMooB6o
This commit is contained in:
Felipe Gomes 2016-03-16 17:31:31 -03:00
parent 42f4042d38
commit e5850e1705

View File

@ -4735,23 +4735,10 @@ MultiprocessBlockPolicy() {
*/
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) {
@ -4759,6 +4746,7 @@ MultiprocessBlockPolicy() {
return gMultiprocessBlockPolicy;
}
#if defined(XP_MACOSX)
// If for any reason we suspect acceleration will be disabled, disable
// e10s auto start on mac.