Backport Bug 1511112 - Remove remaining style flushes for getting the UI direction in browser/, except PlacesUIUtils.jsm. (#4586)
This commit is contained in:
Родитель
bea035f183
Коммит
7d7ee956dc
|
@ -244,7 +244,6 @@ class PageAction {
|
|||
// See https://searchfox.org/mozilla-central/rev/847b64cc28b74b44c379f9bff4f415b97da1c6d7/toolkit/modules/PopupNotifications.jsm#42
|
||||
browser.cfrpopupnotificationanchor = this.container;
|
||||
|
||||
const notification = this.window.document.getElementById("contextual-feature-recommendation-notification");
|
||||
const headerLabel = this.window.document.getElementById("cfr-notification-header-label");
|
||||
const headerLink = this.window.document.getElementById("cfr-notification-header-link");
|
||||
const headerImage = this.window.document.getElementById("cfr-notification-header-image");
|
||||
|
@ -258,9 +257,7 @@ class PageAction {
|
|||
|
||||
headerLabel.value = await this.getStrings(content.heading_text);
|
||||
headerLink.setAttribute("href", SUMO_BASE_URL + content.info_icon.sumo_path);
|
||||
const isRTL = this.window.getComputedStyle(notification).direction === "rtl";
|
||||
const attribute = isRTL ? "left" : "right";
|
||||
headerLink.setAttribute(attribute, 0);
|
||||
headerLink.setAttribute(this.window.RTL_UI ? "left" : "right", 0);
|
||||
headerImage.setAttribute("tooltiptext", await this.getStrings(content.info_icon.label, "tooltiptext"));
|
||||
headerLink.onclick = () => this._sendTelemetry({message_id: id, bucket_id: content.bucket_id, event: "RATIONALE"});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче