This patch adds toSVGStopElement(Node* node) in order to remove remained static_cast<SVGStopElement*>. Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=156274
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.