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

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

Issue 105753003: Generate toSVGGradient|Graphics|PolyElement() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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/SVGGraphicsElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGPolyElement.h
diff --git a/Source/core/svg/SVGPolyElement.h b/Source/core/svg/SVGPolyElement.h
index ed906d0c960709f180680552fb1e686abaf050f2..4cc460158dfc1e6a97f6d8aad047385024c4818f 100644
--- a/Source/core/svg/SVGPolyElement.h
+++ b/Source/core/svg/SVGPolyElement.h
@@ -64,12 +64,13 @@ private:
END_DECLARE_ANIMATED_PROPERTIES
};
-inline SVGPolyElement* toSVGPolyElement(SVGElement* element)
+inline bool isSVGPolyElement(const Node& node)
{
- ASSERT_WITH_SECURITY_IMPLICATION(!element || element->hasTagName(SVGNames::polygonTag) || element->hasTagName(SVGNames::polylineTag));
- return static_cast<SVGPolyElement*>(element);
+ return node.hasTagName(SVGNames::polygonTag) || node.hasTagName(SVGNames::polylineTag);
}
+DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGPolyElement);
+
} // namespace WebCore
#endif
« no previous file with comments | « Source/core/svg/SVGGraphicsElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698