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

Unified Diff: Source/core/svg/SVGGradientElement.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 | « no previous file | Source/core/svg/SVGGraphicsElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGGradientElement.h
diff --git a/Source/core/svg/SVGGradientElement.h b/Source/core/svg/SVGGradientElement.h
index 65f92d05aedfab8503c226a5d65075d34449bd04..fa520c0cb0a7633538a352e6de074f94b1104471 100644
--- a/Source/core/svg/SVGGradientElement.h
+++ b/Source/core/svg/SVGGradientElement.h
@@ -107,12 +107,13 @@ private:
END_DECLARE_ANIMATED_PROPERTIES
};
-inline SVGGradientElement* toSVGGradientElement(Node* node)
+inline bool isSVGGradientElement(const Node& node)
{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || (node->hasTagName(SVGNames::radialGradientTag) || node->hasTagName(SVGNames::linearGradientTag)));
- return static_cast<SVGGradientElement*>(node);
+ return node.hasTagName(SVGNames::radialGradientTag) || node.hasTagName(SVGNames::linearGradientTag);
}
+DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGGradientElement);
+
} // namespace WebCore
#endif
« no previous file with comments | « no previous file | Source/core/svg/SVGGraphicsElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698