diff options
Diffstat (limited to 'Source/WebCore/svg/SVGTextPathElement.h')
-rw-r--r-- | Source/WebCore/svg/SVGTextPathElement.h | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/Source/WebCore/svg/SVGTextPathElement.h b/Source/WebCore/svg/SVGTextPathElement.h index db65b58ed..d16204e13 100644 --- a/Source/WebCore/svg/SVGTextPathElement.h +++ b/Source/WebCore/svg/SVGTextPathElement.h @@ -17,10 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#ifndef SVGTextPathElement_h -#define SVGTextPathElement_h +#pragma once -#if ENABLE(SVG) #include "SVGNames.h" #include "SVGTextContentElement.h" #include "SVGURIReference.h" @@ -49,9 +47,9 @@ struct SVGPropertyTraits<SVGTextPathMethodType> { case SVGTextPathMethodUnknown: return emptyString(); case SVGTextPathMethodAlign: - return "align"; + return ASCIILiteral("align"); case SVGTextPathMethodStretch: - return "stretch"; + return ASCIILiteral("stretch"); } ASSERT_NOT_REACHED(); @@ -78,9 +76,9 @@ struct SVGPropertyTraits<SVGTextPathSpacingType> { case SVGTextPathSpacingUnknown: return emptyString(); case SVGTextPathSpacingAuto: - return "auto"; + return ASCIILiteral("auto"); case SVGTextPathSpacingExact: - return "exact"; + return ASCIILiteral("exact"); } ASSERT_NOT_REACHED(); @@ -110,8 +108,11 @@ public: TEXTPATH_SPACINGTYPE_EXACT = SVGTextPathSpacingExact }; - static PassRefPtr<SVGTextPathElement> create(const QualifiedName&, Document&); - + static Ref<SVGTextPathElement> create(const QualifiedName&, Document&); + +protected: + void finishedInsertingSubtree() override; + private: SVGTextPathElement(const QualifiedName&, Document&); @@ -119,31 +120,26 @@ private: void clearResourceReferences(); - virtual void buildPendingResource() override; - virtual InsertionNotificationRequest insertedInto(ContainerNode&) override; - virtual void removedFrom(ContainerNode&) override; + void buildPendingResource() override; + InsertionNotificationRequest insertedInto(ContainerNode&) override; + void removedFrom(ContainerNode&) override; - bool isSupportedAttribute(const QualifiedName&); - virtual void parseAttribute(const QualifiedName&, const AtomicString&) override; - virtual void svgAttributeChanged(const QualifiedName&) override; + static bool isSupportedAttribute(const QualifiedName&); + void parseAttribute(const QualifiedName&, const AtomicString&) override; + void svgAttributeChanged(const QualifiedName&) override; - virtual RenderPtr<RenderElement> createElementRenderer(PassRef<RenderStyle>) override; - virtual bool childShouldCreateRenderer(const Node&) const override; - virtual bool rendererIsNeeded(const RenderStyle&) override; + RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override; + bool childShouldCreateRenderer(const Node&) const override; + bool rendererIsNeeded(const RenderStyle&) override; - virtual bool selfHasRelativeLengths() const override; + bool selfHasRelativeLengths() const override; BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGTextPathElement) DECLARE_ANIMATED_LENGTH(StartOffset, startOffset) DECLARE_ANIMATED_ENUMERATION(Method, method, SVGTextPathMethodType) DECLARE_ANIMATED_ENUMERATION(Spacing, spacing, SVGTextPathSpacingType) - DECLARE_ANIMATED_STRING(Href, href) + DECLARE_ANIMATED_STRING_OVERRIDE(Href, href) END_DECLARE_ANIMATED_PROPERTIES }; -NODE_TYPE_CASTS(SVGTextPathElement) - } // namespace WebCore - -#endif // ENABLE(SVG) -#endif |