Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1793)

Unified Diff: Source/core/svg/SVGTextPositioningElement.h

Issue 133203003: Generate toSVGFooElement() for SVGFELight|AnimateMotion|FontFaceSrc|TextPositioningElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modified Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/svg/SVGTextPositioningElement.h
diff --git a/Source/core/svg/SVGTextPositioningElement.h b/Source/core/svg/SVGTextPositioningElement.h
index aa2ce00b3d288f289b976718006af418df9cda5c..f81235366013bfb6943470f7c66a6ffad038d3e4 100644
--- a/Source/core/svg/SVGTextPositioningElement.h
+++ b/Source/core/svg/SVGTextPositioningElement.h
@@ -21,6 +21,7 @@
#ifndef SVGTextPositioningElement_h
#define SVGTextPositioningElement_h
+#include "SVGNames.h"
#include "core/svg/SVGAnimatedLengthList.h"
#include "core/svg/SVGAnimatedNumberList.h"
#include "core/svg/SVGTextContentElement.h"
@@ -42,6 +43,7 @@ protected:
bool isSupportedAttribute(const QualifiedName&);
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE FINAL;
virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE FINAL;
+ virtual bool isTextPositioning() const OVERRIDE FINAL { return true; }
RefPtr<SVGAnimatedLengthList> m_x;
RefPtr<SVGAnimatedLengthList> m_y;
@@ -52,6 +54,13 @@ protected:
END_DECLARE_ANIMATED_PROPERTIES
};
+inline bool isSVGTextPositioningElement(const Node& node)
+{
+ return node.isSVGElement() && toSVGElement(node).isTextPositioning();
+}
+
+DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGTextPositioningElement);
+
} // namespace WebCore
#endif

Powered by Google App Engine
This is Rietveld 408576698