summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/svg/RenderSVGTextPath.cpp')
-rw-r--r--Source/WebCore/rendering/svg/RenderSVGTextPath.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp b/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp
index 12cb6d361..3d5f36528 100644
--- a/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp
+++ b/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp
@@ -18,8 +18,6 @@
*/
#include "config.h"
-
-#if ENABLE(SVG)
#include "RenderSVGTextPath.h"
#include "FloatQuad.h"
@@ -30,18 +28,17 @@
#include "SVGPathElement.h"
#include "SVGRootInlineBox.h"
#include "SVGTextPathElement.h"
-#include "SVGTransformList.h"
namespace WebCore {
-RenderSVGTextPath::RenderSVGTextPath(SVGTextPathElement& element, PassRef<RenderStyle> style)
- : RenderSVGInline(element, std::move(style))
+RenderSVGTextPath::RenderSVGTextPath(SVGTextPathElement& element, RenderStyle&& style)
+ : RenderSVGInline(element, WTFMove(style))
{
}
SVGTextPathElement& RenderSVGTextPath::textPathElement() const
{
- return toSVGTextPathElement(RenderSVGInline::graphicsElement());
+ return downcast<SVGTextPathElement>(RenderSVGInline::graphicsElement());
}
Path RenderSVGTextPath::layoutPath() const
@@ -50,17 +47,17 @@ Path RenderSVGTextPath::layoutPath() const
if (!targetElement || !targetElement->hasTagName(SVGNames::pathTag))
return Path();
- SVGPathElement* pathElement = toSVGPathElement(targetElement);
+ SVGPathElement& pathElement = downcast<SVGPathElement>(*targetElement);
Path pathData;
- updatePathFromGraphicsElement(pathElement, pathData);
+ updatePathFromGraphicsElement(&pathElement, pathData);
// Spec: The transform attribute on the referenced 'path' element represents a
// supplemental transformation relative to the current user coordinate system for
// the current 'text' element, including any adjustments to the current user coordinate
// system due to a possible transform attribute on the current 'text' element.
// http://www.w3.org/TR/SVG/text.html#TextPathElement
- pathData.transform(pathElement->animatedLocalTransform());
+ pathData.transform(pathElement.animatedLocalTransform());
return pathData;
}
@@ -80,5 +77,3 @@ bool RenderSVGTextPath::stretchMethod() const
}
}
-
-#endif // ENABLE(SVG)