Summary: | Remove RenderObjectChildList::beforePseudoElementRenderer and afterPseudoElementRenderer | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Elliott Sprehn <esprehn> | ||||||||
Component: | New Bugs | Assignee: | Elliott Sprehn <esprehn> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | cmarcelo, eric, inferno, macpherson, menard, ojan.autocc, ojan, webkit-ews, webkit.review.bot | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Elliott Sprehn
2013-01-04 14:05:56 PST
Created attachment 181374 [details]
Patch
Comment on attachment 181374 [details] Patch Attachment 181374 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/15697303 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 ? Comment on attachment 181374 [details] Patch Attachment 181374 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/15686298 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 Created attachment 181376 [details]
Patch
(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. Created attachment 181444 [details]
Patch
Made variable name usage consistent.
Comment on attachment 181444 [details] Patch Clearing flags on attachment: 181444 Committed r138909: <http://trac.webkit.org/changeset/138909> All reviewed patches have been landed. Closing bug. |