Closed
Bug 379093
Opened 18 years ago
Closed 18 years ago
[FIX]Onload can fire before page layout is complete
Categories
(Core :: Layout, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha5
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(2 files, 1 obsolete file)
7.12 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
2.34 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
See bug 378975 comment 6.
I guess we could try dealing with this by revoking reflow events when a reflow flush occurs. Or we could explicitly flush out layout before invoking the onload handler.
Assignee | ||
Comment 1•18 years ago
|
||
A third option is to block onload while there is a reflow event pending (and make sure to call DoneRemovingDirtyRoots() from ProcessReflowCommands even if we didn't remove any, since that may just indicate that the reflow event fired). I don't quite like this approach because there is no guarantee that it converges: if reflows keep posting new reflow events, onload will never fire. That seems undesirable.
Assignee | ||
Comment 2•18 years ago
|
||
In general we don't want to keep revoking reflow events to keep down on the churn during, say, DHTML animations that also flush layout all the time. But during pageload, I think we need to do this...
Attachment #263094 -
Flags: superreview?(roc)
Attachment #263094 -
Flags: review?(roc)
Updated•18 years ago
|
Attachment #263094 -
Attachment description: Proposd fix → Proposed fix
Assignee | ||
Updated•18 years ago
|
Priority: -- → P1
Summary: Onload can fire before page layout is complete → [FIX]Onload can fire before page layout is complete
Target Milestone: --- → mozilla1.9alpha5
Attachment #263094 -
Flags: superreview?(roc)
Attachment #263094 -
Flags: superreview+
Attachment #263094 -
Flags: review?(roc)
Attachment #263094 -
Flags: review+
Assignee | ||
Comment 3•18 years ago
|
||
This just goes ahead and flushes out reflow before firing the onload event. This is simpler than trying to maintain the document loading state, esp. since that breaks down if partway through the load a display:none iframe gets a presshell or some such.
Attachment #263094 -
Attachment is obsolete: true
Attachment #263225 -
Flags: superreview?(roc)
Attachment #263225 -
Flags: review?(roc)
Attachment #263225 -
Flags: superreview?(roc)
Attachment #263225 -
Flags: superreview+
Attachment #263225 -
Flags: review?(roc)
Attachment #263225 -
Flags: review+
Comment 4•18 years ago
|
||
I don't think it's generally safe to be keeping around a raw pointer to the window through a FlushPendingNotifications call. Is there some reason it's safe here?
Assignee | ||
Comment 5•18 years ago
|
||
Patch on top of "simpler option" (which I checked in).
Attachment #263233 -
Flags: superreview?(roc)
Attachment #263233 -
Flags: review?(roc)
Assignee | ||
Comment 6•18 years ago
|
||
Note: the checkin of the "simpler option" patch didn't significantly affect Tp or Tp2 on the Linux boxen... Which is interesting, since it certainly affected pageload times here.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Updated•18 years ago
|
Flags: in-testsuite-
Attachment #263233 -
Flags: superreview?(roc)
Attachment #263233 -
Flags: superreview+
Attachment #263233 -
Flags: review?(roc)
Attachment #263233 -
Flags: review+
Is this needed on branches? If it's a bug on branches, then I think perhaps we should take this on branches, for the sake of being able to compare Tp between trunk and branch.
Assignee | ||
Comment 8•18 years ago
|
||
It probably _could_ be useful on branches, though I'm not sure we're hitting this problem on branches on Tp per se.
But as far as comparing Tp, we want to compare to various 1.9 milestones as well, so I filed bug 379233 a few days ago.
Assignee | ||
Comment 9•18 years ago
|
||
Checked in the second patch too.
You need to log in
before you can comment on or make changes to this bug.
Description
•