From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/rendering/svg/RenderSVGTextPath.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'Source/WebCore/rendering/svg/RenderSVGTextPath.cpp') 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 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(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(*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) -- cgit v1.2.1