Closed
Bug 572604
Opened 14 years ago
Closed 14 years ago
Don't flush layout before firing onload except when necessary
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla2.0b2
People
(Reporter: jruderman, Assigned: bzbarsky)
References
Details
(Keywords: perf)
Attachments
(2 files)
(deleted),
text/plain
|
Details | |
(deleted),
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
It would be nice to fire onload as soon as all script-observable effects are ready. In particular, we generally don't need to flush layout, only style. By avoiding a layout flush, we can save time overall if the onload script causes DOM/style changes.
The one case that requires flushing layout is if there are web fonts that we *might* have to load depending on the text. We should be able to detect that case cheaply and only flush layout before onload in that case.
Pre-requisites:
* Make nsStyleSet say whether there are any font-face rules (should be easy)
* Fix talos (?)
Reporter | ||
Updated•14 years ago
|
Assignee: nobody → bzbarsky
Assignee | ||
Comment 1•14 years ago
|
||
Attachment #456500 -
Flags: review?(dbaron)
Assignee | ||
Comment 2•14 years ago
|
||
I'd really like to land this as soon after b2 as possible so it can bake...
Comment 3•14 years ago
|
||
Comment on attachment 456500 [details] [diff] [review]
Like so
Getting to this point means that we've already parsed all the style sheets? (We don't need to flush anything in order to ensure that?)
If so, r=dbaron.
Attachment #456500 -
Flags: review?(dbaron) → review+
Assignee | ||
Comment 4•14 years ago
|
||
> Getting to this point means that we've already parsed all the style sheets?
Yes.
Assignee | ||
Comment 5•14 years ago
|
||
Pushed http://hg.mozilla.org/mozilla-central/rev/a2c9de706e86
Then pushed http://hg.mozilla.org/mozilla-central/rev/3687d3cf3176 to bump assertion counts on one test that ended up asserting more of the same things it was already asserting.
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b2
You need to log in
before you can comment on or make changes to this bug.
Description
•