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

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

Issue 23023002: Add toSVGTextPathElement(), 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
« no previous file with comments | « no previous file | Source/core/svg/SVGTextPathElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGTextPath.cpp
diff --git a/Source/core/rendering/svg/RenderSVGTextPath.cpp b/Source/core/rendering/svg/RenderSVGTextPath.cpp
index a1fbae363e60aca6baba3e7c777f0912069371f5..f2068b80ac5453eaf11eac0a92338069850a7c1d 100644
--- a/Source/core/rendering/svg/RenderSVGTextPath.cpp
+++ b/Source/core/rendering/svg/RenderSVGTextPath.cpp
@@ -35,7 +35,7 @@ RenderSVGTextPath::RenderSVGTextPath(Element* element)
Path RenderSVGTextPath::layoutPath() const
{
- SVGTextPathElement* textPathElement = static_cast<SVGTextPathElement*>(node());
+ SVGTextPathElement* textPathElement = toSVGTextPathElement(node());
Element* targetElement = SVGURIReference::targetElementFromIRIString(textPathElement->hrefCurrentValue(), textPathElement->document());
if (!targetElement || !targetElement->hasTagName(SVGNames::pathTag))
return Path();
@@ -56,17 +56,17 @@ Path RenderSVGTextPath::layoutPath() const
float RenderSVGTextPath::startOffset() const
{
- return static_cast<SVGTextPathElement*>(node())->startOffsetCurrentValue().valueAsPercentage();
+ return toSVGTextPathElement(node())->startOffsetCurrentValue().valueAsPercentage();
}
bool RenderSVGTextPath::exactAlignment() const
{
- return static_cast<SVGTextPathElement*>(node())->spacingCurrentValue() == SVGTextPathSpacingExact;
+ return toSVGTextPathElement(node())->spacingCurrentValue() == SVGTextPathSpacingExact;
}
bool RenderSVGTextPath::stretchMethod() const
{
- return static_cast<SVGTextPathElement*>(node())->methodCurrentValue() == SVGTextPathMethodStretch;
+ return toSVGTextPathElement(node())->methodCurrentValue() == SVGTextPathMethodStretch;
}
}
« no previous file with comments | « no previous file | Source/core/svg/SVGTextPathElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698