Bug 963143 - Australis - fix nits for download finish notification patch, rs=mak
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Sat, 15 Mar 2014 19:21:36 +0100
changeset 173802 20a6cc189fddb01c1a7d94bb34c1e8c80e0f5a81
parent 173801 60da49f4d2004c20f47917fa3da2658ab9c81b4e
child 173803 7103e5ec9b114b320252436bc994de4ef2c6a327
push id26421
push userphilringnalda@gmail.com
push dateSun, 16 Mar 2014 04:20:13 +0000
treeherdermozilla-central@e3b76b155ca4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs963143
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 963143 - Australis - fix nits for download finish notification patch, rs=mak
browser/components/downloads/content/indicator.js
--- a/browser/components/downloads/content/indicator.js
+++ b/browser/components/downloads/content/indicator.js
@@ -329,25 +329,27 @@ const DownloadsIndicatorView = {
 
     // No need to show visual notification if the panel is visible.
     if (DownloadsPanel.isPanelShowing) {
       return;
     }
 
     let anchor = DownloadsButton._placeholder;
     let widgetGroup = CustomizableUI.getWidget("downloads-button");
-    let widgetInWindow = widgetGroup.forWindow(window);
-    if (widgetInWindow.overflowed || widgetGroup.areaType == CustomizableUI.TYPE_MENU_PANEL) {
+    let widget = widgetGroup.forWindow(window);
+    if (widget.overflowed || widgetGroup.areaType == CustomizableUI.TYPE_MENU_PANEL) {
       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;
       }
 
       // Otherwise, try to use the anchor of the panel:
-      anchor = widgetInWindow.anchor;
+      anchor = widget.anchor;
     }
     if (!anchor || !isElementVisible(anchor.parentNode)) {
       // Our container isn't visible, so can't show the animation:
       return;
     }
 
     if (this._notificationTimeout) {
       clearTimeout(this._notificationTimeout);