Bug 963143 - Australis - fix nits for download finish notification patch, rs=mak a=Sylvestre
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Sat, 15 Mar 2014 19:21:36 +0100
changeset 183400 c9353d92a4f95b0b7397e001e4fbdd6227e2c755
parent 183399 d67c25e96c390e5a3d95e2fba92f2de8c8ed545a
child 183401 0405ceeff5ab8c6831f7540819bf6f8857c6cb02
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, Sylvestre
bugs963143
milestone29.0a2
Bug 963143 - Australis - fix nits for download finish notification patch, rs=mak a=Sylvestre
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);