RESOLVED FIXED 106132
Remove RenderObjectChildList::beforePseudoElementRenderer and afterPseudoElementRenderer
https://bugs.webkit.org/show_bug.cgi?id=106132
Summary Remove RenderObjectChildList::beforePseudoElementRenderer and afterPseudoElem...
Elliott Sprehn
Reported 2013-01-04 14:05:56 PST
Remove RenderObjectChildList::beforePseudoElementRenderer and afterPseudoElementRenderer
Attachments
Patch (14.44 KB, patch)
2013-01-04 14:19 PST, Elliott Sprehn
no flags
Patch (14.48 KB, patch)
2013-01-04 14:40 PST, Elliott Sprehn
no flags
Patch (15.64 KB, patch)
2013-01-05 13:43 PST, Elliott Sprehn
no flags
Elliott Sprehn
Comment 1 2013-01-04 14:19:35 PST
Early Warning System Bot
Comment 2 2013-01-04 14:31:47 PST
Abhishek Arya
Comment 3 2013-01-04 14:32:17 PST
Comment on attachment 181374 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=181374&action=review > Source/WebCore/rendering/RenderCounter.cpp:87 > + if (RenderObject* before = toElement(renderer->node())->pseudoElementRenderer(BEFORE)) What ensures that this cast to toElement is safe ?
Early Warning System Bot
Comment 4 2013-01-04 14:34:01 PST
Abhishek Arya
Comment 5 2013-01-04 14:38:11 PST
Comment on attachment 181374 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=181374&action=review > Source/WebCore/rendering/RenderCounter.cpp:172 > return result; minor issue s/result/before. Also, there is lot of different names used in the code like result, renderer, before, etc. I would prefer a consistent naming like beforePseudoElementRenderer and afterPseudoElementRenderer
Elliott Sprehn
Comment 6 2013-01-04 14:40:16 PST
Elliott Sprehn
Comment 7 2013-01-04 14:42:03 PST
(In reply to comment #3) > (From update of attachment 181374 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=181374&action=review > > > Source/WebCore/rendering/RenderCounter.cpp:87 > > + if (RenderObject* before = toElement(renderer->node())->pseudoElementRenderer(BEFORE)) > > What ensures that this cast to toElement is safe ? If you look at the rest of that function you can see that renderer is the result of sibling->renderer() and sibling is an Element. The way that function is written is bad because it overwrites sibling right before this check so we need to do renderer->node() to get a reference to the original sibling.
Elliott Sprehn
Comment 8 2013-01-05 13:43:55 PST
Created attachment 181444 [details] Patch Made variable name usage consistent.
WebKit Review Bot
Comment 9 2013-01-05 15:08:25 PST
Comment on attachment 181444 [details] Patch Clearing flags on attachment: 181444 Committed r138909: <http://trac.webkit.org/changeset/138909>
WebKit Review Bot
Comment 10 2013-01-05 15:08:30 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.