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

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

Issue 98693006: Generate toSVGSVG|Stop|TextContentElement() (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/SVGSVGElement.h ('k') | Source/core/svg/SVGTextContentElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGStopElement.h
diff --git a/Source/core/svg/SVGStopElement.h b/Source/core/svg/SVGStopElement.h
index 4331a4a60af3bd49dfa0c540abd8d8ca8e1a8cc4..6b941f2e5035f0d905c0b2eadbbb51c8a5bd08f7 100644
--- a/Source/core/svg/SVGStopElement.h
+++ b/Source/core/svg/SVGStopElement.h
@@ -50,12 +50,13 @@ private:
END_DECLARE_ANIMATED_PROPERTIES
};
-inline SVGStopElement* toSVGStopElement(Node* node)
+inline bool isSVGStopElement(const Node& node)
{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || toSVGElement(node)->isGradientStop());
- return static_cast<SVGStopElement*>(node);
+ return node.isSVGElement() && toSVGElement(node).isGradientStop();
}
+DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGStopElement);
+
} // namespace WebCore
#endif
« no previous file with comments | « Source/core/svg/SVGSVGElement.h ('k') | Source/core/svg/SVGTextContentElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698