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

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

Issue 24061004: Add toSVGStyleElement(), and use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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/dom/DocumentStyleSheetCollection.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/SVGStyleElement.h
diff --git a/Source/core/svg/SVGStyleElement.h b/Source/core/svg/SVGStyleElement.h
index e263f90b0c410e96a836c27b455e6c0f900f5302..35cf7be6a1e0c621d9c22cb64e9875a75676bced 100644
--- a/Source/core/svg/SVGStyleElement.h
+++ b/Source/core/svg/SVGStyleElement.h
@@ -21,6 +21,7 @@
#ifndef SVGStyleElement_h
#define SVGStyleElement_h
+#include "SVGNames.h"
#include "core/dom/StyleElement.h"
#include "core/svg/SVGElement.h"
@@ -67,6 +68,12 @@ private:
Timer<SVGElement> m_svgLoadEventTimer;
};
+inline SVGStyleElement* toSVGStyleElement(Node* node)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(SVGNames::styleTag));
+ return static_cast<SVGStyleElement*>(node);
+}
+
} // namespace WebCore
#endif // SVGStyleElement_h
« no previous file with comments | « Source/core/dom/DocumentStyleSheetCollection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698