diff options
Diffstat (limited to 'Source/WebCore/svg/SVGTextElement.cpp')
-rw-r--r-- | Source/WebCore/svg/SVGTextElement.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
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> SVGTextElement::create(const QualifiedName& tagName, Document& document) +Ref<SVGTextElement> 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> 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<RenderElement> SVGTextElement::createElementRenderer(PassRef<RenderStyle> style) +RenderPtr<RenderElement> SVGTextElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&) { - return createRenderer<RenderSVGText>(*this, std::move(style)); + return createRenderer<RenderSVGText>(*this, WTFMove(style)); } bool SVGTextElement::childShouldCreateRenderer(const Node& child) const @@ -89,5 +85,3 @@ bool SVGTextElement::childShouldCreateRenderer(const Node& child) const } } - -#endif // ENABLE(SVG) |