Closed
Bug 838688
Opened 13 years ago
Closed 13 years ago
Improve nsBlockFrame::ReparentFloats/CollectFloats
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: perf)
Attachments
(2 files)
|
10.44 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
|
4.42 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•13 years ago
|
||
Removing a nFrameList::RemoveFrameIfPresent and a ContainsFrame in the
process (both O(n)).
Attachment #710784 -
Flags: review?(bzbarsky)
| Assignee | ||
Comment 2•13 years ago
|
||
Attachment #710794 -
Flags: review?(bzbarsky)
Comment 3•13 years ago
|
||
Comment on attachment 710784 [details] [diff] [review]
Make ReparentFloats/CollectFloats not require a priori knowledge of which child list a float is expected to be on.
>+ // Floats lives in mFloats, or in the PushedFloat or OverflowOutOfFlows
s/lives/live/
Again would be good to have asserts that the frame is in one of the lists in question.... r=me with that
Attachment #710784 -
Flags: review?(bzbarsky) → review+
Comment 4•13 years ago
|
||
Comment on attachment 710794 [details] [diff] [review]
Optimize CollectFloats by doing an early return if this block doesn't have any floats.
Why is returning early if the frame has no floats OK if aCollectSiblings is true?
Comment 5•13 years ago
|
||
Comment on attachment 710794 [details] [diff] [review]
Optimize CollectFloats by doing an early return if this block doesn't have any floats.
r- pending explanation
Attachment #710794 -
Flags: review?(bzbarsky) → review-
| Assignee | ||
Comment 6•13 years ago
|
||
Comment on attachment 710794 [details] [diff] [review]
Optimize CollectFloats by doing an early return if this block doesn't have any floats.
(In reply to Boris Zbarsky (:bz) from comment #4)
> Why is returning early if the frame has no floats OK if aCollectSiblings is
> true?
Because nsBlockFrame::CollectFloats ignores floats that belongs to some
other frame (can happen due to lazy reparenting in nsInlineFrame).
http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsBlockFrame.cpp#6877
So if 'this' has no floats, CollectFloats is a NOP.
(with the assumption that floats are correctly parented and present on
one of the lists of its parent -- which I'm pretty sure holds)
Attachment #710794 -
Flags: review- → review?(bzbarsky)
| Assignee | ||
Comment 7•13 years ago
|
||
... and the above is independent of aCollectSiblings, which just says if
we should also traverse aFrame's siblings or not.
Comment 8•13 years ago
|
||
Comment on attachment 710794 [details] [diff] [review]
Optimize CollectFloats by doing an early return if this block doesn't have any floats.
Oh, I see. aFrame is not the block itself, gotcha.
r=me
Attachment #710794 -
Flags: review?(bzbarsky) → review+
| Assignee | ||
Comment 9•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #3)
> s/lives/live/
fixed
> Again would be good to have asserts that the frame is in one of the lists in
> question.... r=me with that
Added an assertion for that:
https://hg.mozilla.org/integration/mozilla-inbound/rev/73ac17d659f6
https://hg.mozilla.org/integration/mozilla-inbound/rev/504e5b0d7d53
Comment 10•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/73ac17d659f6
https://hg.mozilla.org/mozilla-central/rev/504e5b0d7d53
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in
before you can comment on or make changes to this bug.
Description
•