Bug 33228 - Line boxes aren't cleared when the last child is removed from a RenderBlock
Summary: Line boxes aren't cleared when the last child is removed from a RenderBlock
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-05 13:07 PST by James Robinson
Modified: 2010-01-05 16:08 PST (History)
2 users (show)

See Also:


Attachments
Clears lineboxes when last child is deleted (2.03 KB, patch)
2010-01-05 13:09 PST, James Robinson
no flags Details | Formatted Diff | Diff
Adds the childrenInline() check (2.05 KB, patch)
2010-01-05 13:28 PST, James Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Robinson 2010-01-05 13:07:25 PST
When the last child is removed from a RenderBlock its line box list is not cleared until the next layout pass.  This is slightly wasteful and makes the fullLayout flag in RenderBlock::layoutInlineChildren() harder to reason about.
Comment 1 James Robinson 2010-01-05 13:09:00 PST
Created attachment 45924 [details]
Clears lineboxes when last child is deleted
Comment 2 WebKit Review Bot 2010-01-05 13:10:15 PST
style-queue ran check-webkit-style on attachment 45924 [details] without any errors.
Comment 3 Dave Hyatt 2010-01-05 13:16:31 PST
Comment on attachment 45924 [details]
Clears lineboxes when last child is deleted

Seems like this should be:

if (childrenInline() && !firstChild())

just to not waste time calling into lineBoxes() in the block child removal case?

r=me
Comment 4 James Robinson 2010-01-05 13:28:07 PST
Created attachment 45928 [details]
Adds the childrenInline() check
Comment 5 WebKit Review Bot 2010-01-05 13:29:15 PST
style-queue ran check-webkit-style on attachment 45928 [details] without any errors.
Comment 6 Dave Hyatt 2010-01-05 13:30:57 PST
Comment on attachment 45928 [details]
Adds the childrenInline() check

r=me
Comment 7 Eric Seidel (no email) 2010-01-05 13:34:10 PST
Comment on attachment 45924 [details]
Clears lineboxes when last child is deleted

Obsoleting this old patch.
Comment 8 WebKit Commit Bot 2010-01-05 16:08:06 PST
Comment on attachment 45928 [details]
Adds the childrenInline() check

Clearing flags on attachment: 45928

Committed r52838: <http://trac.webkit.org/changeset/52838>
Comment 9 WebKit Commit Bot 2010-01-05 16:08:10 PST
All reviewed patches have been landed.  Closing bug.