Bug 33228

Summary: Line boxes aren't cleared when the last child is removed from a RenderBlock
Product: WebKit Reporter: James Robinson <jamesr>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Clears lineboxes when last child is deleted
none
Adds the childrenInline() check none

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.