Bug 1510412 - Set RTL_UI based on Services.locale.isAppLocaleRTL. r=florian
authorDão Gottwald <dao@mozilla.com>
Wed, 28 Nov 2018 15:59:28 +0000
changeset 507750 81bf174016f60a3a2577239fc38c9d9d3cf6f519
parent 507749 58482700e9cbb377d02295c36fb9afc442d9b538
child 507751 848f4907fb07bec6d27700edd556d7e68e271eae
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1510412
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1510412 - Set RTL_UI based on Services.locale.isAppLocaleRTL. r=florian Differential Revision: https://phabricator.services.mozilla.com/D13121
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -156,17 +156,17 @@ XPCOMUtils.defineLazyServiceGetters(this
 
 if (AppConstants.MOZ_CRASHREPORTER) {
   XPCOMUtils.defineLazyServiceGetter(this, "gCrashReporter",
                                      "@mozilla.org/xre/app-info;1",
                                      "nsICrashReporter");
 }
 
 XPCOMUtils.defineLazyGetter(this, "RTL_UI", () => {
-  return document.documentElement.matches(":-moz-locale-dir(rtl)");
+  return Services.locale.isAppLocaleRTL;
 });
 
 XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() {
   return Services.strings.createBundle("chrome://browser/locale/browser.properties");
 });
 XPCOMUtils.defineLazyGetter(this, "gNavigatorBundle", function() {
   // This is a stringbundle-like interface to gBrowserBundle, formerly a getter for
   // the "bundle_browser" element.