Closed Bug 746787 Opened 12 years ago Closed 12 years ago

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

Categories

(Firefox :: Downloads Panel, defect)

14 Branch
x86
Windows 7
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 15

People

(Reporter: alice0775, Assigned: Paolo)

References

Details

Attachments

(1 file, 1 obsolete file)

Build Identifier:
http://hg.mozilla.org/mozilla-central/rev/28ebf87f14a9
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 http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/
2-2. Right click Firefox-14.0a1.en-US.win32.zip
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
Summary: When 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 door hanger panel" never pop up.
Blocks: 726444
Oops

6. Keypress Ctrl+J or Click "Download UI Icon" in the right side of toolbar
Component: General → Downloads Panel
QA Contact: general → downloads.panel
Attached patch The patch (obsolete) — Splinter Review
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.
Assignee: nobody → paolo.mozmail
Status: NEW → ASSIGNED
Attachment #617599 - Flags: review?(mak77)
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.
Attachment #617599 - Flags: review?(mak77) → feedback+
Attached patch Updated patchSplinter Review
Added the more thorough fix for the race condition and updated the state
variable names.
Attachment #617599 - Attachment is obsolete: true
Attachment #617674 - Flags: review?(mak77)
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
Attachment #617674 - Flags: review?(mak77) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/8bb94e02e4da
Target Milestone: --- → Firefox 15
http://hg.mozilla.org/mozilla-central/rev/8bb94e02e4da
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
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 browser.download.useToolkitUI in about:config.

Setting status of this bug to VERIFIED FIXED.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: