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

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

Issue 23532011: Introduce toSVGTextElement(), and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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
« no previous file with comments | « Source/core/rendering/svg/RenderSVGText.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGTextElement.h
diff --git a/Source/core/svg/SVGTextElement.h b/Source/core/svg/SVGTextElement.h
index 95be00e5e58eb3d14377294b1fc3922f5e2f5d4d..0ec8cbee64b2a428f63f5d2359c3a1c60b1b554e 100644
--- a/Source/core/svg/SVGTextElement.h
+++ b/Source/core/svg/SVGTextElement.h
@@ -21,6 +21,7 @@
#ifndef SVGTextElement_h
#define SVGTextElement_h
+#include "SVGNames.h"
#include "core/svg/SVGTextPositioningElement.h"
namespace WebCore {
@@ -40,6 +41,12 @@ private:
virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const;
};
+inline SVGTextElement* toSVGTextElement(Node* node)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(SVGNames::textTag));
+ return static_cast<SVGTextElement*>(node);
+}
+
} // namespace WebCore
#endif
« no previous file with comments | « Source/core/rendering/svg/RenderSVGText.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698