Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3442)

Unified Diff: Source/core/rendering/svg/SVGRenderTreeAsText.cpp

Issue 23205014: Introduce toSVGLinearGradientElement(), and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/svg/SVGRenderTreeAsText.cpp
diff --git a/Source/core/rendering/svg/SVGRenderTreeAsText.cpp b/Source/core/rendering/svg/SVGRenderTreeAsText.cpp
index 5838081a05813bfc4fec1e998c24edcc91d7a07a..2106e01e81a285c540f4ce7dba7a6789b6c1ec47 100644
--- a/Source/core/rendering/svg/SVGRenderTreeAsText.cpp
+++ b/Source/core/rendering/svg/SVGRenderTreeAsText.cpp
@@ -539,10 +539,8 @@ void writeSVGResourceContainer(TextStream& ts, const RenderObject& object, int i
// Dump final results that are used for rendering. No use in asking SVGGradientElement for its gradientUnits(), as it may
// link to other gradients using xlink:href, we need to build the full inheritance chain, aka. collectGradientProperties()
- SVGLinearGradientElement* linearGradientElement = static_cast<SVGLinearGradientElement*>(gradient->node());
-
LinearGradientAttributes attributes;
- linearGradientElement->collectGradientAttributes(attributes);
+ toSVGLinearGradientElement(gradient->node())->collectGradientAttributes(attributes);
writeCommonGradientProperties(ts, attributes.spreadMethod(), attributes.gradientTransform(), attributes.gradientUnits());
ts << " [start=" << gradient->startPoint(attributes) << "] [end=" << gradient->endPoint(attributes) << "]\n";
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceLinearGradient.cpp ('k') | Source/core/svg/SVGLinearGradientElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698