mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 23:23:33 +00:00
Bug 352456, notification flashes before sliding in, r=enndeakin
This commit is contained in:
parent
aec66aac79
commit
5e109dd899
@ -86,6 +86,10 @@
|
||||
newitem.setAttribute("label", aLabel);
|
||||
newitem.setAttribute("value", aValue);
|
||||
newitem.setAttribute("image", aImage);
|
||||
if (!insertPos) {
|
||||
newitem.style.position = "fixed";
|
||||
newitem.style.top = "100%";
|
||||
}
|
||||
this.insertBefore(newitem, insertPos);
|
||||
|
||||
if (aButtons) {
|
||||
@ -179,10 +183,16 @@
|
||||
var height = aNotification.boxObject.height;
|
||||
var change = height / this.slideSteps;
|
||||
if (aSlideIn) {
|
||||
aNotification.style.marginTop = -height + "px";
|
||||
aNotification.style.opacity = 0;
|
||||
if (this.currentNotification &&
|
||||
this.currentNotification.boxObject.height > height)
|
||||
height = this.currentNotification.boxObject.height;
|
||||
|
||||
this.currentNotification = aNotification;
|
||||
this._closedNotification = null;
|
||||
aNotification.style.removeProperty("position");
|
||||
aNotification.style.removeProperty("top");
|
||||
aNotification.style.marginTop = -height + "px";
|
||||
aNotification.style.opacity = 0;
|
||||
}
|
||||
else {
|
||||
change = -change;
|
||||
|
Loading…
x
Reference in New Issue
Block a user