Backed out changeset c0bf622859f6 (bug 1480798) for chrome failures at intl/l10n/test/dom/test_domloc.xul

This commit is contained in:
Coroiu Cristina 2018-08-03 23:55:25 +03:00
Родитель 51c6d96684
Коммит 83ac803dc6
1 изменённых файлов: 1 добавлений и 16 удалений

Просмотреть файл

@ -20,8 +20,6 @@
const { Localization } =
ChromeUtils.import("resource://gre/modules/Localization.jsm", {});
const { Services } =
ChromeUtils.import("resource://gre/modules/Services.jsm", {});
// Match the opening angle bracket (<) in HTML tags, and HTML entities like
// &amp;, &#0038;, &#x0026;.
@ -574,20 +572,7 @@ class DOMLocalization extends Localization {
translateRoots() {
const roots = Array.from(this.roots);
return Promise.all(
roots.map(async root => {
// We want to first retranslate the UI, and
// then (potentially) flip the directionality.
//
// This means that the DOM alternations and directionality
// are set in the same microtask.
await this.translateFragment(root);
let primaryLocale = Services.locale.getAppLocaleAsBCP47();
let direction = Services.locale.isAppLocaleRTL ? "rtl" : "ltr";
root.setAttribute("lang", primaryLocale);
root.setAttribute(root.namespaceURI ===
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
? "localedir" : "dir", direction);
})
roots.map(root => this.translateFragment(root))
);
}