mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 821170 - expose a reshow method in PopupNotifications and use it r=jaws
This commit is contained in:
parent
0afdefa66f
commit
ff24715913
@ -280,8 +280,7 @@ var gPluginHandler = {
|
||||
|
||||
let notification = PopupNotifications.getNotification("click-to-play-plugins", aBrowser);
|
||||
if (notification && plugins.length > 0 && !haveVisibleCTPPlugin && !this._notificationDisplayedOnce) {
|
||||
notification.dismissed = false;
|
||||
PopupNotifications._update(notification.anchorElement);
|
||||
notification.reshow();
|
||||
this._notificationDisplayedOnce = true;
|
||||
}
|
||||
|
||||
|
@ -827,9 +827,8 @@ function test21a() {
|
||||
}
|
||||
|
||||
// we have to actually show the panel to get the bindings to instantiate
|
||||
notification.options.dismissed = false;
|
||||
notification.options.eventCallback = test21b;
|
||||
PopupNotifications._showPanel([notification], notification.anchorElement);
|
||||
notification.reshow();
|
||||
}
|
||||
|
||||
function test21b() {
|
||||
@ -887,9 +886,8 @@ function test21c() {
|
||||
}
|
||||
|
||||
// we have to actually show the panel to get the bindings to instantiate
|
||||
notification.options.dismissed = false;
|
||||
notification.options.eventCallback = test21d;
|
||||
PopupNotifications._showPanel([notification], notification.anchorElement);
|
||||
notification.reshow();
|
||||
}
|
||||
|
||||
function test21d() {
|
||||
|
@ -68,6 +68,10 @@ Notification.prototype = {
|
||||
iconBox;
|
||||
|
||||
return anchorElement;
|
||||
},
|
||||
|
||||
reshow: function() {
|
||||
this.owner.reshow(this.anchorElement);
|
||||
}
|
||||
};
|
||||
|
||||
@ -625,6 +629,10 @@ PopupNotifications.prototype = {
|
||||
while (anchor && anchor.parentNode != this.iconBox)
|
||||
anchor = anchor.parentNode;
|
||||
|
||||
this.reshow(anchor);
|
||||
},
|
||||
|
||||
reshow: function PopupNotifications_reshow(anchor) {
|
||||
// Mark notifications anchored to this anchor as un-dismissed
|
||||
this._currentNotifications.forEach(function (n) {
|
||||
if (n.anchorElement == anchor)
|
||||
|
Loading…
Reference in New Issue
Block a user