Closed Bug 558585 Opened 15 years ago Closed 14 years ago

Window flashes white when a new tab is made, despite settings

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set
trivial

Tracking

()

VERIFIED FIXED
Firefox 6

People

(Reporter: danthau, Assigned: dao)

References

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a5pre) Gecko/20100410 Minefield/3.7a5pre Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a5pre) Gecko/20100410 Minefield/3.7a5pre I have both browser.display.background_color and browser.display.focus_background_color set to '#000000'. Additionally, I have 'When Minefield starts' set to 'Show a blank page'. Despite all this, when a new tab is made the window flashes white then turns black. It should never flash white with these settings. Reproducible: Always Steps to Reproduce: 1. Set browser.display.focus_background_color and browser.display.background_color to something dark (such as #000000) 2. Make a new tab 3. Notice the split-second white flash Actual Results: The main window flashed white for a short period of time Expected Results: The window should have remained the set background color I use this black-background setup along with a dark GTK theme and 'use system colors' when in a low-light environment. The sudden bright flashes in an otherwise dark environment are unpleasant and hurt my eyes after a while. With previous versions of Firefox which did not flash white when making a new tab this was not the case.
Component: Preferences → General
QA Contact: preferences → general
Version: unspecified → Trunk
OS: Linux → All
Hardware: x86 → All
I tried it in Windows XP x86 and Windows 7 x86_64, and found another bug report with the same problem on Windows XP x86_64: https://bugzilla.mozilla.org/show_bug.cgi?id=576495 So I updated "Platform" to reflect that this is not specific to Linux or x86 as I had it previously.
This bug is a serious problem for me. I have a circadian rhythm disorder, and I must not expose myself to bright lights in the evening, or I will have trouble falling asleep. Therefore, in the evening I turn off the lights in my room and I enable a Windows theme in which all backgrounds are black, and the text is dark green. I use Firefox's accessibility features to force it to adopt this theme, by going to Options / Content / Colors, checking "Use system colors," and unchecking "Allow pages to choose their own colors, instead of my selections above." Every time a new tab opens, I am momentarily blinded by a bright white background in the tab. This did not happen in Firefox 3. The expected behavior is that as soon as the tab opens, it should have the correct background color. If you try to reproduce this bug and think that the bright white background flashes by really quickly, then consider this: on single-core PC that has been running 10 Firefox tabs for several hours, nothing happens quickly. Sure, when I first launch Firefox, it is very quick and the flashing background is not very noticeable. But after running several tabs for several hours, Firefox is much slower and these "flashing white tabs" will now take up to half a second to turn black. Build identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0b9pre) Gecko/20110108 Firefox/4.0b9pre
I've found a line which, when thrown into userChrome.css, seems to resolve the issue. tabbrowser tabpanels { background-color: black !important; } (feel free to change black to whichever color you would like) Found here: http://forums.mozillazine.org/viewtopic.php?f=23&t=2138435 While this is adequate for my purposes (and hence, I'm resolving the ticket), Firefox should chose this value from other settings (such as the Windows or GTK theme, if set to use those) rather than defaulting to white.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
It's good that there's a work-around, but that doesn't make this less of a bug. I think you should reopen.
I wasn't sure about the policy for such things, but you're probably correct. Re-opened. Firefox should chose the tabpanels background color based on other settings (such as the Windows or GTK theme, if set to those) rather than defaulting to white.
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
[danthau: Thank you *so much* for the workaround you provided above. No more blinding white flashes anymore!] I agree that this bug should be kept open, and I would suggest that the fix should be for Firefox to set the tabpanel's background color to match the color that is configured in Tools / Options / Content / Colors / Background. The impact of this bug is rather severe for those of us that have eyestrain, circadian disorders, or other such issues that require us to modify the accessibility settings in Firefox. Therefore I would suggest that this be treated as an accessibility-related bug. Sorry I'm not familiar with the code, otherwise I would attempt to submit a patch.
Marking new given the two dupes. Please can someone find the regression range: http://harthur.github.com/mozregression/
Status: UNCONFIRMED → NEW
Component: General → Theme
Ever confirmed: true
QA Contact: general → theme
Don't need a regression range. browser.display.background_color had never been respected here.
Both this bug and the other report this as being a new issue to Fx4...
I'm affected by this bug (or something very similar), did not occur in fx3 but now happens in fx4. The thing is, I have not used any of the alphas/betas of Fx4 till b11 or so, and this already had that issue. Hence I'm not sure if I'll even be able to do the regression range test (not knowing how far back to go, unless its all the way to fx3?)
Again, we don't need a regression range. This needs bug 591341 to be fixed.
Component: Theme → Tabbed Browser
QA Contact: theme → tabbed.browser
This problem was preventing me from using Firefox 4.0 and above, so thanks for the workaround. If someone can point me to the relevant code, I'll be happy to fix it.
Attached patch patch (deleted) — Splinter Review
Assignee: nobody → dao
Status: NEW → ASSIGNED
Attachment #526526 - Flags: review?(gavin.sharp)
The code selecting the background color is in nsPresContext.cpp, nsPresContext::GetDocumentColorPreferences(). Note that it ignores browser.display.use_system_colors if an "accessibility theme" is used, which I don't think I can detect here.
Comment on attachment 526526 [details] [diff] [review] patch >+ this.style.backgroundColor = >+ Services.prefs.getBoolPref("browser.display.use_system_colors") ? >+ "-moz-default-background-color" : >+ Services.prefs.getCharPref("browser.display.background_color"); Isn't "-moz-default-background-color" always the value you want? If I remember correctly, it does take into account the value of the color preferences.
(In reply to comment #17) > Comment on attachment 526526 [details] [diff] [review] > patch > > >+ this.style.backgroundColor = > >+ Services.prefs.getBoolPref("browser.display.use_system_colors") ? > >+ "-moz-default-background-color" : > >+ Services.prefs.getCharPref("browser.display.background_color"); > > Isn't "-moz-default-background-color" always the value you want? If I remember > correctly, it does take into account the value of the color preferences. Unfortunately, it doesn't honor the prefs in chrome documents.
Attachment #526526 - Flags: review?(gavin.sharp) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 6
I'm using a 3rd party dark theme which is Nasa Night Launch with latest trunk builds. Window was flashing when i open a new tab, but thought this was about theme, so didn't file a bug. I tested the theme with this patch but window still flashes with one difference. It does flash for some (randomly) new tabs, not for all. Should this have fixed that or am i expecting wrong ?
(In reply to comment #20) > I'm using a 3rd party dark theme which is Nasa Night Launch with latest trunk > builds. Window was flashing when i open a new tab, but thought this was about > theme, so didn't file a bug. > > I tested the theme with this patch but window still flashes with one > difference. It does flash for some (randomly) new tabs, not for all. > > Should this have fixed that or am i expecting wrong ? It's possible that the theme is overriding the background color that we set, so you should probably report this to that theme's author.
(In reply to comment #21) > (In reply to comment #20) > > I'm using a 3rd party dark theme which is Nasa Night Launch with latest trunk > > builds. Window was flashing when i open a new tab, but thought this was about > > theme, so didn't file a bug. > > > > I tested the theme with this patch but window still flashes with one > > difference. It does flash for some (randomly) new tabs, not for all. > > > > Should this have fixed that or am i expecting wrong ? > > It's possible that the theme is overriding the background color that we set, so > you should probably report this to that theme's author. if you mean overriding the pref: browser.display.background_color i checked that, theme does not override it. Then i override it myself from #FFFFFF to #000000, then no flashes.
(In reply to comment #22) > if you mean overriding the pref: browser.display.background_color > > i checked that, theme does not override it. No, I mean that the theme could prevent Firefox from coloring the area that you see flashing.
This bug is still reproducing for me on Mozilla/5.0 (Windows NT 6.1; rv:6.0a1) Gecko/20110504 Firefox/6.0a1
Try with today's build.
(In reply to comment #24) > This bug is still reproducing for me on Mozilla/5.0 (Windows NT 6.1; rv:6.0a1) > Gecko/20110504 Firefox/6.0a1 yes, for me too. I tried in a fresh profile with default theme and changed backgroudn color pref to #000000, window flashes with new tabs.Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a1) Gecko/20110505 Firefox/6.0a1 ID:20110505030608
(In reply to comment #26) > (In reply to comment #24) > > This bug is still reproducing for me on Mozilla/5.0 (Windows NT 6.1; rv:6.0a1) > > Gecko/20110504 Firefox/6.0a1 > > yes, for me too. > > I tried in a fresh profile with default theme and changed backgroudn color pref > to #000000, window flashes with new tabs.Mozilla/5.0 > > (Windows NT 6.1; WOW64; rv:6.0a1) Gecko/20110505 Firefox/6.0a1 > ID:20110505030608 sorry about this post, i restarted firefox and there didnt happen any windows flashes. But this time, when opening default home page and add-ons manager , window flashes.
Verified fixed in Mozilla/5.0 (Windows NT 6.1; rv:5.0a2) Gecko/20110506 Firefox/5.0a2 and today's nightly
Looks like there was a mixup in our bug day query, so Gaby thought this was an Fx5 bug. The verification above unfortunately won't apply. The good news is that this bug isn't affecting everyone.
(In reply to comment #29) > Looks like there was a mixup in our bug day query, so Gaby thought this was > an Fx5 bug. The verification above unfortunately won't apply. The good news > is that this bug isn't affecting everyone. Still a bit confused-- does this mean this will be fixed in a soon-upcoming (1-2 days) nightly build? Or will it be fixed in Firefox 6? I see flashes on 5/6/11's nightly build.
Mozilla/5.0 (X11; Linux i686; rv:7.0a1) Gecko/20110630 Firefox/7.0a1 After restarting browser the issue is no longer reproducible. Verified it on Ubuntu 11.04, WinXP, Win 7 and Mac OS X 10.6 using the steps from Comment 0. Setting status to Verified Fixed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: