User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.2a1pre) Gecko/20110328 Firefox/4.2a1pre
The text on the FIA website renders the text in the table in white instead of the expected black until you right click on the page, then the text will become black.
Steps to Reproduce:
1. Goto http://www.fia.com/en-GB/sport/championships/f1/Pages/season_guide1.aspx
2. Notice the text in the 3 tables are white (expect for the links to the individual GPs).
3. Right click on the page and the text will become black.
Interesting. I see the text white (including in computed style) until I examine the CSS rules for that table cell. Then it becomes black...
Created attachment 522418 [details]
This is some weird table color quirk...
Whatever causes that inner table to not have white text is not happening properly in this testcase. If I take out the <link> or replace it with a <style> the problem goes away.... And if I put the white color on the <body> then the text is white in all browsers(!).
David, do you have any idea where this quirk is implemented?
Ok, found it. So the problem here is that we're doing InitialReflow when the stylesheet finishes loading. We're in the middle of frame construction and we end up resolving style for that inner table. But nsHTMLStyleSheet::RulesMatching calls GetBodyColor() which looks for the <body>'s frame, which we don't have yet. So we bail out and don't apply the quirk.
If we don't have a <body> frame we should consider just resolving a style for the body in this situation...
The other option is to restyle when the <body> gets a frame. David, thoughts?
And another option is that when we resolve style for a <body> in the frame constructor we tell nsHTMLStyleSheet about the new style...
Created attachment 522421 [details]
Simpler and less magical testcase
http://hg.mozilla.org/mozilla-central/rev/9439ffe089a1 has this bug in the summary. Should it be fixed?
Yes, this was fixed by bug 655549.
*** Bug 651028 has been marked as a duplicate of this bug. ***
Mozilla/5.0 (Windows NT 6.1; rv:7.0) Gecko/20100101 Firefox/7.0
Mozilla/5.0 (X11; Linux i686; rv:7.0) Gecko/20100101 Firefox/7.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0) Gecko/20100101 Firefox/7.0
Mozilla/5.0 (Windows NT 5.1; rv:7.0) Gecko/20100101 Firefox/7.0
Verified fixed on Mac OS 10.6, Ubuntu 10.4, Windows XP and Windows 7. I have used the test case provided in comment 8.