Summary: | Add toSVGStopElement(Node* node) to clean-up a static_cast<SVGStopElement*> | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Gyuyoung Kim <gyuyoung.kim> | ||||||
Component: | SVG | Assignee: | Gyuyoung Kim <gyuyoung.kim> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, d-r, esprehn+autocc, fmalita, glenn, kondapallykalyan, pdr, schenney, zimmermann | ||||||
Priority: | P2 | Keywords: | BlinkMergeCandidate | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Gyuyoung Kim
2013-08-18 20:30:55 PDT
Created attachment 209046 [details]
Patch
Comment on attachment 209046 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=209046&action=review I am OK with this, but there might be a slightly better way. It seems unfortunate to use isGradientStop in one case and use hasTagName in the other. > Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp:639 > - SVGStopElement* stopElement = static_cast<SVGStopElement*>(stop.node()); > + SVGStopElement* stopElement = toSVGStopElement(stop.node()); How about just using toSVGStopElement(toSVGElement(stop.node())) here instead? Created attachment 209059 [details]
Patch for landing
(In reply to comment #2) > (From update of attachment 209046 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=209046&action=review > > I am OK with this, but there might be a slightly better way. It seems unfortunate to use isGradientStop in one case and use hasTagName in the other. > > > Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp:639 > > - SVGStopElement* stopElement = static_cast<SVGStopElement*>(stop.node()); > > + SVGStopElement* stopElement = toSVGStopElement(stop.node()); > > How about just using toSVGStopElement(toSVGElement(stop.node())) here instead? Hi Darin, thank you for your nice comment. :) I also agree with your nice suggestion. Comment on attachment 209059 [details] Patch for landing Clearing flags on attachment: 209059 Committed r154267: <http://trac.webkit.org/changeset/154267> All reviewed patches have been landed. Closing bug. |