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

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

Issue 18214003: Change static_cast<SVGImageElement*> with toSVGImageElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix build break Created 7 years, 5 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/RenderSVGImage.cpp ('k') | Source/core/svg/SVGImageLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGImageElement.h
diff --git a/Source/core/svg/SVGImageElement.h b/Source/core/svg/SVGImageElement.h
index 9dd3f421f90ce55f1177c06b77211f40ad0dea7c..9f78f4068e906afa30d08df77642a181bbedc6fb 100644
--- a/Source/core/svg/SVGImageElement.h
+++ b/Source/core/svg/SVGImageElement.h
@@ -21,6 +21,7 @@
#ifndef SVGImageElement_h
#define SVGImageElement_h
+#include "SVGNames.h"
#include "core/svg/SVGAnimatedBoolean.h"
#include "core/svg/SVGAnimatedLength.h"
#include "core/svg/SVGAnimatedPreserveAspectRatio.h"
@@ -75,6 +76,12 @@ private:
SVGImageLoader m_imageLoader;
};
+inline SVGImageElement* toSVGImageElement(Node* node)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(SVGNames::imageTag));
+ return static_cast<SVGImageElement*>(node);
+}
+
} // namespace WebCore
#endif
« no previous file with comments | « Source/core/rendering/svg/RenderSVGImage.cpp ('k') | Source/core/svg/SVGImageLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698