Closed Bug 451232 Opened 16 years ago Closed 16 years ago

Setting ui.* color pref to empty string or removing pref doesn't immediately reset color to default

Categories

(Core :: Widget, defect)

defect
Not set
minor

Tracking

()

VERIFIED FIXED
mozilla1.9.1b1

People

(Reporter: martijn.martijn, Assigned: graememcc)

References

Details

(Keywords: testcase)

Attachments

(3 files)

See testcase.
When clicking on the first 2 buttons, you can see the find highlighted text selection go to green/blue, respectively.
However, with the 3rd and 4th button, I would expect the find highlighted text selection to go to the default color (which is yellow in my case).
This doesn't happen for me, it only happens for me after I have restarted my browser.

It's not a big deal, but extension writers might find this annoying.
This doesn't appear to be unique to ui.textHighlightBackground.

The above testcase exhibits the same behavior for ui.textSelectBackground
OS: Windows XP → All
Hardware: PC → All
Attached patch Patch v1Splinter Review
So, this is definitely not unique to the ui.textHighlightBackground pref: it is in fact the same for for all ui.* color preferences.

nsXPLookAndFeel observes the various color prefs it cares about, and if the pref is set or changed to a color string, nsXPLookAndFeel will cache the new value for future lookups. However, if the value is cleared, there's currently no mechanism to say "stop using the cached value, and look up the default".

Not sure how to test this...
Assignee: nobody → graememcc_firefox
Status: NEW → ASSIGNED
Attachment #334679 - Flags: superreview?(roc)
Attachment #334679 - Flags: review?(roc)
Assignee: graememcc_firefox → nobody
Status: ASSIGNED → NEW
Component: Find Toolbar → Widget
Product: Toolkit → Core
QA Contact: fast.find → general
Comment on attachment 334679 [details] [diff] [review]
Patch v1

Excellent, thanks!
Attachment #334679 - Flags: superreview?(roc)
Attachment #334679 - Flags: superreview+
Attachment #334679 - Flags: review?(roc)
Attachment #334679 - Flags: review+
Status: NEW → ASSIGNED
Keywords: checkin-needed
Assignee: nobody → graememcc_firefox
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Summary: Setting ui.textHighlightBackground pref to empty string or removing pref doesn't reset directly default highlight → Setting ui.* color pref to empty string or removing pref doesn't immediately reset color to default
http://hg.mozilla.org/mozilla-central/rev/6a6a0717bbfd
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
Verified fixed, using:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b1pre) Gecko/20080908091724 Minefield/3.1b1pre
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: