WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
79319
Cleanup RenderBlock::moveChildrenTo
https://bugs.webkit.org/show_bug.cgi?id=79319
Summary
Cleanup RenderBlock::moveChildrenTo
Julien Chaffraix
Reported
2012-02-22 19:58:55 PST
Seen during a review, the function is pretty difficult to read but also has some redundant code hidden in it. Patch forthcoming.
Attachments
Simple cleanup, removed unneeded inline check, while -> for and use moveChildTo.
(2.47 KB, patch)
2012-02-22 20:03 PST
,
Julien Chaffraix
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Julien Chaffraix
Comment 1
2012-02-22 20:03:44 PST
Created
attachment 128376
[details]
Simple cleanup, removed unneeded inline check, while -> for and use moveChildTo.
Abhishek Arya
Comment 2
2012-02-22 22:32:50 PST
(In reply to
comment #1
)
> Created an attachment (id=128376) [details] > Simple cleanup, removed unneeded inline check, while -> for and use moveChildTo.
Yay! now i can just fix stuff in central RenderBlock::moveChildTo
Eric Seidel (no email)
Comment 3
2012-02-22 22:38:32 PST
Comment on
attachment 128376
[details]
Simple cleanup, removed unneeded inline check, while -> for and use moveChildTo. View in context:
https://bugs.webkit.org/attachment.cgi?id=128376&action=review
I wonder if this will have a performance effect.
> Source/WebCore/rendering/RenderBlock.cpp:992 > + for (RenderObject* child = startChild; child && child != endChild; ) { > + // Save our next sibling as moveChildTo will clear it. > + RenderObject* nextSibling = child->nextSibling(); > + moveChildTo(toBlock, child, beforeChild, fullRemoveInsert); > + child = nextSibling; > }
Just to make sure... there are no mutation events (or other JavaScript) run by moveChildTo such that we would need to hold a RefPtr for child?
Abhishek Arya
Comment 4
2012-02-22 22:42:49 PST
(In reply to
comment #3
)
> (From update of
attachment 128376
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=128376&action=review
> > I wonder if this will have a performance effect. > > > Source/WebCore/rendering/RenderBlock.cpp:992 > > + for (RenderObject* child = startChild; child && child != endChild; ) { > > + // Save our next sibling as moveChildTo will clear it. > > + RenderObject* nextSibling = child->nextSibling(); > > + moveChildTo(toBlock, child, beforeChild, fullRemoveInsert); > > + child = nextSibling; > > } > > Just to make sure... there are no mutation events (or other JavaScript) run by moveChildTo such that we would need to hold a RefPtr for child?
No Refptrs in the rendering world :(
Julien Chaffraix
Comment 5
2012-02-23 09:22:49 PST
Comment on
attachment 128376
[details]
Simple cleanup, removed unneeded inline check, while -> for and use moveChildTo. View in context:
https://bugs.webkit.org/attachment.cgi?id=128376&action=review
> I wonder if this will have a performance effect.
I was wondering that too. Some archaeology did not show the split was done for performance so we should be fine. In case, we can always inline moveChildTo.
>>> Source/WebCore/rendering/RenderBlock.cpp:992 >>> } >> >> Just to make sure... there are no mutation events (or other JavaScript) run by moveChildTo such that we would need to hold a RefPtr for child? > > No Refptrs in the rendering world :(
Indeed, but more importantly, the operations are atomic from a JS perspective.
WebKit Review Bot
Comment 6
2012-02-23 11:11:43 PST
Comment on
attachment 128376
[details]
Simple cleanup, removed unneeded inline check, while -> for and use moveChildTo. Clearing flags on attachment: 128376 Committed
r108645
: <
http://trac.webkit.org/changeset/108645
>
WebKit Review Bot
Comment 7
2012-02-23 11:11:48 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug