Bug 1347272 - Move ChromeRegistry::IsLocaleRTL to LocaleService::IsAppLocaleRTL. r=jfkthame

MozReview-Commit-ID: BDhgIKNSOEL
This commit is contained in:
Zibi Braniecki
2017-03-14 12:35:06 -07:00
parent b1948055b6
commit f4aa49939d
11 changed files with 80 additions and 58 deletions

View File

@@ -31,7 +31,6 @@
#include "nsContentUtils.h"
#include "nsThreadUtils.h"
#include "nsISupportsPrimitives.h"
#include "nsIChromeRegistry.h"
#include "nsILoadContext.h"
#include "nsIWebNavigation.h"
#include "nsIWindowlessBrowser.h"
@@ -40,6 +39,7 @@
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
#include "mozilla/StartupTimeline.h"
#include "mozilla/intl/LocaleService.h"
#include "nsEmbedCID.h"
#include "nsIWebBrowser.h"
@@ -50,6 +50,7 @@
#endif
using namespace mozilla;
using mozilla::intl::LocaleService;
// Default URL for the hidden window, can be overridden by a pref on Mac
#define DEFAULT_HIDDENWINDOW_URL "resource://gre-resources/hiddenWindow.html"
@@ -720,15 +721,7 @@ nsAppShellService::JustCreateTopWindow(nsIXULWindow *aParent,
bool center = aChromeMask & nsIWebBrowserChrome::CHROME_CENTER_SCREEN;
nsCOMPtr<nsIXULChromeRegistry> reg =
mozilla::services::GetXULChromeRegistryService();
if (reg) {
nsAutoCString package;
package.AssignLiteral("global");
bool isRTL = false;
reg->IsLocaleRTL(package, &isRTL);
widgetInitData.mRTL = isRTL;
}
widgetInitData.mRTL = LocaleService::GetInstance()->IsAppLocaleRTL();
#ifdef MOZ_WIDGET_GONK
// B2G multi-screen support. Screen ID is for differentiating screens of