mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 837637 - data-reporting notification shouldn't create its own notification box. r=gavin
This commit is contained in:
parent
9553ec8b64
commit
d576eeae5d
@ -13,7 +13,10 @@ let gDataNotificationInfoBar = {
|
||||
|
||||
_DATA_REPORTING_NOTIFICATION: "data-reporting",
|
||||
|
||||
_notificationBox: null,
|
||||
get _notificationBox() {
|
||||
delete this._notificationBox;
|
||||
return this._notificationBox = document.getElementById("global-notificationbox");
|
||||
},
|
||||
|
||||
get _log() {
|
||||
let log4moz = Cu.import("resource://services-common/log4moz.js", {}).Log4Moz;
|
||||
@ -35,34 +38,11 @@ let gDataNotificationInfoBar = {
|
||||
}
|
||||
},
|
||||
|
||||
_ensureNotificationBox: function () {
|
||||
if (this._notificationBox) {
|
||||
return;
|
||||
}
|
||||
|
||||
let nb = document.createElementNS(
|
||||
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
|
||||
"notificationbox"
|
||||
);
|
||||
nb.id = "data-notification-notify-bar";
|
||||
nb.setAttribute("flex", "1");
|
||||
|
||||
let bottombox = document.getElementById("browser-bottombox");
|
||||
bottombox.insertBefore(nb, bottombox.firstChild);
|
||||
|
||||
this._notificationBox = nb;
|
||||
},
|
||||
|
||||
_getDataReportingNotification: function (name=this._DATA_REPORTING_NOTIFICATION) {
|
||||
if (!this._notificationBox) {
|
||||
return undefined;
|
||||
}
|
||||
return this._notificationBox.getNotificationWithValue(name);
|
||||
},
|
||||
|
||||
_displayDataPolicyInfoBar: function (request) {
|
||||
this._ensureNotificationBox();
|
||||
|
||||
if (this._getDataReportingNotification()) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user