summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/rendering/svg/RenderSVGTextPath.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
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)