summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
commit32761a6cee1d0dee366b885b7b9c777e67885688 (patch)
treed6bec92bebfb216f4126356e55518842c2f476a1 /Source/WebCore/rendering/svg/RenderSVGTextPath.cpp
parenta4e969f4965059196ca948db781e52f7cfebf19e (diff)
downloadWebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/WebCore/rendering/svg/RenderSVGTextPath.cpp')
-rw-r--r--Source/WebCore/rendering/svg/RenderSVGTextPath.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp b/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp
index 4becbeea9..12cb6d361 100644
--- a/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp
+++ b/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp
@@ -18,6 +18,8 @@
*/
#include "config.h"
+
+#if ENABLE(SVG)
#include "RenderSVGTextPath.h"
#include "FloatQuad.h"
@@ -32,14 +34,14 @@
namespace WebCore {
-RenderSVGTextPath::RenderSVGTextPath(SVGTextPathElement& element, Ref<RenderStyle>&& style)
- : RenderSVGInline(element, WTFMove(style))
+RenderSVGTextPath::RenderSVGTextPath(SVGTextPathElement& element, PassRef<RenderStyle> style)
+ : RenderSVGInline(element, std::move(style))
{
}
SVGTextPathElement& RenderSVGTextPath::textPathElement() const
{
- return downcast<SVGTextPathElement>(RenderSVGInline::graphicsElement());
+ return toSVGTextPathElement(RenderSVGInline::graphicsElement());
}
Path RenderSVGTextPath::layoutPath() const
@@ -48,17 +50,17 @@ Path RenderSVGTextPath::layoutPath() const
if (!targetElement || !targetElement->hasTagName(SVGNames::pathTag))
return Path();
- SVGPathElement& pathElement = downcast<SVGPathElement>(*targetElement);
+ SVGPathElement* pathElement = toSVGPathElement(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;
}
@@ -78,3 +80,5 @@ bool RenderSVGTextPath::stretchMethod() const
}
}
+
+#endif // ENABLE(SVG)