nsIFilePicker.filterIndex always returns 0

VERIFIED FIXED in Firefox 11

Status

()

Core
Widget: Win32
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: Wladimir Palant, Assigned: jimm)

Tracking

(Blocks: 1 bug, {regression})

Trunk
mozilla12
x86_64
Windows 7
regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox11+ verified)

Details

(Whiteboard: [qa!])

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
Created attachment 583418 [details]
Restartless extension for testing

nsIFilePicker.filterIndex always returns 0 in the current nightly builds regardless of the filter selected by the user. This breaks backup&restore UI in Adblock Plus. Steps to reproduce:

1. Install the attached extension.
2. The file picker dialog will open immediately - select the "Filter2" file filter.
3. Select any file and click "Open".

Expected result:

A message shows up saying: "File filter selected: Filter2". This is what I see in Firefox 8.

Actual result:

A message shows up saying: "File filter selected: Filter1". Reproduced in:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0a1) Gecko/20111220 Firefox/11.0a1)

This is a recent regression, it was working correctly in the nightlies just recently. I suspect bug 661991 as the reason, will check.
(Reporter)

Comment 1

5 years ago
As expected, regression range is http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=fd6ab19f312c&tochange=beac16509534. So this is mostly certain a regression from bug 661991.
Blocks: 661991
(Assignee)

Comment 2

5 years ago
Created attachment 583531 [details] [diff] [review]
fix

Sorry about that. Here's the fix.
Assignee: nobody → jmathies
Attachment #583531 - Flags: review?(neil)
(Assignee)

Comment 3

5 years ago
Comment on attachment 583531 [details] [diff] [review]
fix

Review of attachment 583531 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/src/windows/nsFilePicker.cpp
@@ +973,5 @@
>  
>    // results
>  
> +  // Remember what filter type the user selected
> +  UINT filterIdxResult = 1;

I really didn't need this assignment, will remove it in the patch I land.

Updated

5 years ago
Attachment #583531 - Flags: review?(neil) → review+
(Assignee)

Comment 4

5 years ago
Comment on attachment 583531 [details] [diff] [review]
fix

https://hg.mozilla.org/integration/mozilla-inbound/rev/dd08f68dce1b

Requesting aurora approval for this regression fix. Very safe patch.
Attachment #583531 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/dd08f68dce1b
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12

Comment 6

5 years ago
[Triage Comment]
Holding in the queue to have this first bake a day on m-c.

Comment 7

5 years ago
Comment on attachment 583531 [details] [diff] [review]
fix

[Triage Comment]
Regression in 11, now had time to bake on m-c. Approving for Aurora.
Attachment #583531 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(Assignee)

Comment 8

5 years ago
https://hg.mozilla.org/releases/mozilla-aurora/rev/98f2d68d7829
status-firefox11: --- → fixed
tracking-firefox11: --- → ?

Updated

5 years ago
tracking-firefox11: ? → +
Whiteboard: [qa+]

Comment 9

5 years ago
Verified as fixed on:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0

The message shows up saying: "File filter selected: Filter2".
Status: RESOLVED → VERIFIED
status-firefox11: fixed → verified
Whiteboard: [qa+] → [qa!]
You need to log in before you can comment on or make changes to this bug.