[webkit-reviews] review granted: [Bug 119990] Add toSVGStopElement(Node* node) to clean-up a static_cast<SVGStopElement*> : [Attachment 209046] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Aug 18 23:00:53 PDT 2013


Darin Adler <darin at apple.com> has granted Gyuyoung Kim
<gyuyoung.kim at samsung.com>'s request for review:
Bug 119990: Add toSVGStopElement(Node* node) to clean-up a
static_cast<SVGStopElement*>
https://bugs.webkit.org/show_bug.cgi?id=119990

Attachment 209046: Patch
https://bugs.webkit.org/attachment.cgi?id=209046&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
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?


More information about the webkit-reviews mailing list