зеркало из https://github.com/mozilla/gecko-dev.git
Bug 963143 - Australis - fix nits for download finish notification patch, rs=mak
--HG-- extra : rebase_source : dec8b20839abdfccb9429d949b2e20709495ad9d
This commit is contained in:
Родитель
d5bfe77320
Коммит
820ad0464c
|
@ -334,15 +334,17 @@ const DownloadsIndicatorView = {
|
||||||
|
|
||||||
let anchor = DownloadsButton._placeholder;
|
let anchor = DownloadsButton._placeholder;
|
||||||
let widgetGroup = CustomizableUI.getWidget("downloads-button");
|
let widgetGroup = CustomizableUI.getWidget("downloads-button");
|
||||||
let widgetInWindow = widgetGroup.forWindow(window);
|
let widget = widgetGroup.forWindow(window);
|
||||||
if (widgetInWindow.overflowed || widgetGroup.areaType == CustomizableUI.TYPE_MENU_PANEL) {
|
if (widget.overflowed || widgetGroup.areaType == CustomizableUI.TYPE_MENU_PANEL) {
|
||||||
if (anchor && this._isAncestorPanelOpen(anchor)) {
|
if (anchor && this._isAncestorPanelOpen(anchor)) {
|
||||||
// If the containing panel is open, don't do anything:
|
// If the containing panel is open, don't do anything, because the
|
||||||
|
// notification would appear under the open panel. See
|
||||||
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=984023
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, try to use the anchor of the panel:
|
// Otherwise, try to use the anchor of the panel:
|
||||||
anchor = widgetInWindow.anchor;
|
anchor = widget.anchor;
|
||||||
}
|
}
|
||||||
if (!anchor || !isElementVisible(anchor.parentNode)) {
|
if (!anchor || !isElementVisible(anchor.parentNode)) {
|
||||||
// Our container isn't visible, so can't show the animation:
|
// Our container isn't visible, so can't show the animation:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче