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/svg/SVGTextElement.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'Source/WebCore/svg/SVGTextElement.cpp') diff --git a/Source/WebCore/svg/SVGTextElement.cpp b/Source/WebCore/svg/SVGTextElement.cpp index bdd931f4b..c55cbc46b 100644 --- a/Source/WebCore/svg/SVGTextElement.cpp +++ b/Source/WebCore/svg/SVGTextElement.cpp @@ -19,14 +19,10 @@ */ #include "config.h" - -#if ENABLE(SVG) #include "SVGTextElement.h" -#include "Attribute.h" #include "RenderSVGResource.h" #include "RenderSVGText.h" -#include "SVGElementInstance.h" #include "SVGNames.h" #include "SVGRenderStyle.h" #include "SVGTSpanElement.h" @@ -39,9 +35,9 @@ inline SVGTextElement::SVGTextElement(const QualifiedName& tagName, Document& do ASSERT(hasTagName(SVGNames::textTag)); } -PassRefPtr SVGTextElement::create(const QualifiedName& tagName, Document& document) +Ref SVGTextElement::create(const QualifiedName& tagName, Document& document) { - return adoptRef(new SVGTextElement(tagName, document)); + return adoptRef(*new SVGTextElement(tagName, document)); } // We override SVGGraphics::animatedLocalTransform() so that the transform-origin @@ -49,14 +45,14 @@ PassRefPtr SVGTextElement::create(const QualifiedName& tagName, AffineTransform SVGTextElement::animatedLocalTransform() const { AffineTransform matrix; - RenderStyle* style = renderer() ? &renderer()->style() : nullptr; + auto* style = renderer() ? &renderer()->style() : nullptr; // if CSS property was set, use that, otherwise fallback to attribute (if set) if (style && style->hasTransform()) { TransformationMatrix t; // For now, the transform-origin is not taken into account // Also, any percentage values will not be taken into account - style->applyTransform(t, IntSize(0, 0), RenderStyle::ExcludeTransformOrigin); + style->applyTransform(t, FloatRect(0, 0, 0, 0), RenderStyle::ExcludeTransformOrigin); // Flatten any 3D transform matrix = t.toAffineTransform(); } else @@ -68,9 +64,9 @@ AffineTransform SVGTextElement::animatedLocalTransform() const return matrix; } -RenderPtr SVGTextElement::createElementRenderer(PassRef style) +RenderPtr SVGTextElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&) { - return createRenderer(*this, std::move(style)); + return createRenderer(*this, WTFMove(style)); } bool SVGTextElement::childShouldCreateRenderer(const Node& child) const @@ -89,5 +85,3 @@ bool SVGTextElement::childShouldCreateRenderer(const Node& child) const } } - -#endif // ENABLE(SVG) -- cgit v1.2.1