Last Comment Bug 746787 - If the browser is minimized at the time of a start of downloading, "Download door hanger panel" never pop up.
: If the browser is minimized at the time of a start of downloading, "Download ...
Product: Firefox
Classification: Client Software
Component: Downloads Panel (show other bugs)
: 14 Branch
: x86 Windows 7
-- normal (vote)
: Firefox 15
Assigned To: :Paolo Amadini
: :Paolo Amadini
Depends on:
Blocks: DownloadsPanel 726444
  Show dependency treegraph
Reported: 2012-04-18 16:19 PDT by Alice0775 White
Modified: 2012-07-10 08:27 PDT (History)
5 users (show)
ryanvm: in‑testsuite?
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

The patch (1.31 KB, patch)
2012-04-23 12:30 PDT, :Paolo Amadini
mak77: feedback+
Details | Diff | Splinter Review
Updated patch (9.81 KB, patch)
2012-04-23 15:29 PDT, :Paolo Amadini
mak77: review+
Details | Diff | Splinter Review

Description User image Alice0775 White 2012-04-18 16:19:51 PDT
Build Identifier:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120418 Firefox/14.0a1 ID:20120418052015

When the browser is minimized at the time of a start of downloading,
"Download door hanger panel" never pop up.

Reproducible: Always

Steps to Reproduce:
1. Start Firefox with clean profile

2. Try to download a file
2-1. Open
2-2. Right click
2-3. Execue "Save Link as..."
2-4. Chose Folder and Save

3. Before Download progress panel pops up, you should minimize the Browser window quickly

4. Wait to complete to download

5. Restore the Browser window size
6. Keypress Ctrl+J or Click "Download UI Icon" in the left side of toolbar

Actual Results:
  Nothing happens.
  No "Download door hanger panel" pops up

Expected Results:  
  "Download door hanger panel" should pop up
Comment 1 User image Alice0775 White 2012-04-18 16:41:54 PDT

6. Keypress Ctrl+J or Click "Download UI Icon" in the right side of toolbar
Comment 2 User image :Paolo Amadini 2012-04-23 12:30:01 PDT
Created attachment 617599 [details] [diff] [review]
The patch

I suppose you are hitting a bug that happens when the panel is shown while the
most recent browser window is minimized. I was able to trigger it by following
the steps you provided and also clicking the link in the screen-level
notification that appears when all the downloads are finished.

This patch should fix the issue.
Comment 3 User image Marco Bonardo [::mak] 2012-04-23 14:02:53 PDT
Comment on attachment 617599 [details] [diff] [review]
The patch

Review of attachment 617599 [details] [diff] [review]:

As we discussed, we should rename _panelState to just _state in this file, cause it's not actually representing the current state of the panel, thus it's confusing and error-prone to future changes.
Also, since showPanel is async, when we reach the actual call to openPopup in _openPopupIfDataReady, the state of the window may have been changed and we'd re-enter this bug.  Would be better to add a safety check there and bail out in case the window is in an unexpected state.
I'll take a quick look at the next version.
Comment 4 User image :Paolo Amadini 2012-04-23 15:29:41 PDT
Created attachment 617674 [details] [diff] [review]
Updated patch

Added the more thorough fix for the race condition and updated the state
variable names.
Comment 5 User image Marco Bonardo [::mak] 2012-04-24 08:27:22 PDT
Comment on attachment 617674 [details] [diff] [review]
Updated patch

Review of attachment 617674 [details] [diff] [review]:

::: browser/components/downloads/content/downloads.js
@@ +55,5 @@
>    //////////////////////////////////////////////////////////////////////////////
>    //// Initialization and termination
>    /**
> +   * State of the downloads panel, based on one of the kState constants.

please add a small note that this doesn't always represent the current state of the panel element
Comment 7 User image Ryan VanderMeulen [:RyanVM] 2012-04-29 14:04:22 PDT
Comment 8 User image Simona B [:simonab ] 2012-07-10 08:27:53 PDT
Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/16.0 Firefox/16.0
Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20120710 Firefox/15.0a2

Verified on the latest Nightly that the "Download panel" pops up (after pressing Ctrl+J or clicking on the  "Download UI Icon") if the browser is minimized at the time a download starts.

Verified also on the latest Aurora - after previously enabling the new Download manager by toggling the pref in about:config.

Setting status of this bug to VERIFIED FIXED.

Note You need to log in before you can comment on or make changes to this bug.