Closed Bug 379485 Opened 18 years ago Closed 18 years ago

[FIX]Don't render a page before the stylesheet is loaded

Categories

(Core :: CSS Parsing and Computation, defect, P1)

x86
Windows XP
defect

Tracking

()

VERIFIED FIXED
mozilla1.9alpha5

People

(Reporter: Peter6, Assigned: bzbarsky)

References

Details

(Keywords: regression)

Attachments

(1 file)

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a5pre) Gecko/20070501 Minefield/3.0a5pre ID:2007050121 [cairo]

since bug 84582 landed some pages flicker during initial rendering.

the cause is that they are renderd before the stylesheet is actually loaded.

visable a.o. http://www.cnn.com/ and http://forums.mozillazine.org/
Can you create a testcase?  The current code _does_ hold off rendering until the sheets have loaded.
And more to the point, this worksforme.  Are you using any extensions that would be querying layout information about the page before onload fires?
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a5pre) Gecko/20070502 Minefield/3.0a5pre ID:2007050204 [cairo]
I can reproduce this semi-reliably at http://fileforum.betanews.com/ with a new profile. CTRL-F5 if you can't see it, but the page initially loads without styling before assuming its styled look.
Interesting.  I definitely cannot reproduce on http://fileforum.betanews.com/, with either normal reload or shift-reload....

Can someone reproduce this in a build with debug symbols?  If so, I would be interested in seeing the stack to PresShell::InitialReflow.
Ah, I managed to catch this in a debugger.

We have a bit of a problem.  The issue is that when a subframe load starts it flushes out layout on the parent document in nsDocShell::GetPositionAndSize (called from nsDocShell::SetupNewViewer).

This is probably suboptimal in any case; we shouldn't need to flush here, imho (unlike most callers of GetPositionAndSize, etc).
Attached patch Let's try thisSplinter Review
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #263495 - Flags: superreview?(jst)
Attachment #263495 - Flags: review?(jst)
Priority: -- → P1
Target Milestone: --- → mozilla1.9alpha5
Summary: Don't render a page before the stylesheet is loaded → [FIX]Don't render a page before the stylesheet is loaded
Comment on attachment 263495 [details] [diff] [review]
Let's try this

r+sr=jst
Attachment #263495 - Flags: superreview?(jst)
Attachment #263495 - Flags: superreview+
Attachment #263495 - Flags: review?(jst)
Attachment #263495 - Flags: review+
Checked in.  Thank you for the pointers to testcases!
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a5pre) Gecko/20070502 Minefield/3.0a5pre ID:2007050214 [cairo] (above patch included)

I'm still seeing the problem when I do a hard reload on Mozillazine forums.
ok, i figured it out.
It's the tab sidebar extension giving some trouble.
w/o it it's fine

->Verified
Status: RESOLVED → VERIFIED
Depends on: 380417
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: