Multi-case window id's breaks toolbar customizations

RESOLVED FIXED in Firefox 10

Status

()

Toolkit
Toolbars and Toolbar Customization
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: mconley, Assigned: mconley)

Tracking

({regression})

10 Branch
mozilla11
regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox10+ fixed)

Details

(Whiteboard: [qa+])

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

6 years ago
The Thunderbird team just noticed this one.

Our main window has id="messengerWindow", and when doing the comparison here:  http://mxr.mozilla.org/comm-central/source/mozilla/toolkit/content/customizeToolbar.js#760

...it appears that the window ID has been automatically lowercased, so the comparison fails, and customization is not possible.

This looks like fallout from bug 662173.
(Assignee)

Updated

6 years ago
Blocks: 662173, 701005
(Assignee)

Comment 1

6 years ago
Created attachment 573292 [details] [diff] [review]
Patch v1

This might be a bit heavy-handed, but this solution seems to work.  When getting the documentId, we lowercase it before doing any operations (either getting/setting to the Event.dataTransfer object).

Or is there a better way to go here?
Attachment #573292 - Flags: feedback?(enndeakin)
tracking-firefox10: --- → ?
You should only need the lowercasing for the 'contains' calls.

As an aside, this] seems like an inconsistent api here. DOMStringList.contains is, presumably, case sensitive yet data transfer apis do automatic lowercase conversion.
(Assignee)

Comment 3

6 years ago
Neil:

Hrm - so there are 3 instances in that diff where I add toLowerCase where a contains is not used.

Removing any combination of those 3 caused toolbar customization to break.

For example, removing it from onToolbarDragStart didn't let me start the process of dragging toolbar buttons. Removing it from onToolbarDragOver didn't show me the little drop location indicator while dragging the button around, and didn't let me drop.  Removing it from onPaletteDrop didn't let me drag buttons back into the toolbar palette.

Thoughts?
My testing doesn't show that. I got it to work with just changing the two 'contains' lines. Note that I used Firefox with an adjusted id of 'main-windowA'
(Assignee)

Comment 5

6 years ago
Strange.  Maybe you're going about it differently than I did.  Can you post your patch for me to try?
(Assignee)

Comment 6

6 years ago
Created attachment 573629 [details] [diff] [review]
Patch v2

Hm, alright, so I just sync'd up with m-c/c-c, and yeah, you're right - this simplified patch works now.  Thanks!
Assignee: nobody → mconley
Attachment #573292 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #573292 - Flags: feedback?(enndeakin)
Attachment #573629 - Flags: review?(enndeakin)
Attachment #573629 - Flags: review?(enndeakin) → review+
(Assignee)

Updated

6 years ago
Attachment #573629 - Flags: approval-mozilla-aurora?
(Assignee)

Updated

6 years ago
Keywords: checkin-needed

Updated

6 years ago
Component: XUL → Toolbars and Toolbar Customization
Keywords: regression
OS: Mac OS X → All
Product: Core → Toolkit
QA Contact: xptoolkit.widgets → toolbars
Hardware: x86 → All
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
(Assignee)

Comment 7

6 years ago
Checked into mozilla-inbound here:  https://hg.mozilla.org/integration/mozilla-inbound/rev/0ad06b88a36b

Comment 8

6 years ago
https://hg.mozilla.org/mozilla-central/rev/0ad06b88a36b
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11

Updated

6 years ago
Blocks: 702035
Note to drivers: the regressing bug landed hours before the last merge and hence we couldn't fix it in time, so the approval is to fix a regression on aurora which is also keeping the Thunderbird aurora tree orange at the moment.

Updated

6 years ago
Attachment #573629 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(Assignee)

Comment 10

6 years ago
Committed to mozilla-aurora as https://hg.mozilla.org/releases/mozilla-aurora/rev/81e7a0f84279
No longer blocks: 702035
Duplicate of this bug: 702035
Duplicate of this bug: 703520
(Assignee)

Updated

6 years ago
status-firefox10: --- → fixed
Does this affect Firefox as well? If so, is there something QA can do to verify the fix?

Comment 14

6 years ago
> Does this affect Firefox as well?
Fortunately the Firefox main window doesn't use camelcase or inicaps so isn't affected by this bug. But there is certainly some potential for extensions to trip over this.

> If so, is there something QA can do to verify the fix?
Er? How about testing with Thunderbird 10b?
Whiteboard: [qa+]
Are there any extensions/themes/customizations which were known to have displayed this bug?

Comment 16

6 years ago
Not that I know of. But then there are over 8000 active extensions and long gone are the days when I could manually track all of the extensions on AMO.
What is the end-user manifestation of this bug? Is there something that changes in the UI? We will have to track that down in a "broken" build before verification can be done.
This bug caused dragging items to and from the toolbar during toolbar customization to not always work in Thunderbird.
Thanks Neil.

Anyone verifying this fix, you will want to be sure you can reproduce this bug on a previous Thunderbird build (see comment 18).
(Assignee)

Comment 20

6 years ago
The relevant Thunderbird bug is bug 701005.  That bug states that our automated tests caught the problem on 2001/09/11 - so a nightly from around there should suffice.

Updated

6 years ago
tracking-firefox10: ? → +
Created attachment 588878 [details]
toolbar - restore default set

I can reproduce the issue on Thunderbird Nightly from 2011-11-09 (ftp://ftp.mozilla.org/pub/thunderbird/nightly/2011/11/2011-11-09-03-00-29-comm-central/thunderbird-11.0a1.en-US.win32.installer.exe) and cannot reproduce it on Thunderbird 10b3.
Dragging items during toolbar customization works fine on Firefox 10b4 on Win 7, XP, MacOS 10.7 and Ubuntu 11.10.
The only strange behavior I've noticed is when clicking first time on "Restore Default Set" button on the Toolbar Customization panel, a lot of items suddenly appear at the bottom of the list.
You need to log in before you can comment on or make changes to this bug.