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

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

Issue 18278003: Introduce isSVGFontElement() and isSVGImageElement(), and use them (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/svg/SVGHKernElement.cpp ('k') | Source/core/svg/SVGImageElement.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 9f78f4068e906afa30d08df77642a181bbedc6fb..8425703e01df060979ab8a5638afe65e62a4beae 100644
--- a/Source/core/svg/SVGImageElement.h
+++ b/Source/core/svg/SVGImageElement.h
@@ -76,9 +76,14 @@ private:
SVGImageLoader m_imageLoader;
};
+inline bool isSVGImageElement(const Node* node)
+{
+ return node->hasTagName(SVGNames::imageTag);
+}
+
inline SVGImageElement* toSVGImageElement(Node* node)
{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(SVGNames::imageTag));
+ ASSERT_WITH_SECURITY_IMPLICATION(!node || isSVGImageElement(node));
return static_cast<SVGImageElement*>(node);
}
« no previous file with comments | « Source/core/svg/SVGHKernElement.cpp ('k') | Source/core/svg/SVGImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698