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

Unified Diff: Source/core/svg/SVGDocument.cpp

Issue 192133002: Use isSVG*Element() helpers more in SVG code (Part 1) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/SVGAltGlyphItemElement.cpp ('k') | Source/core/svg/SVGElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGDocument.cpp
diff --git a/Source/core/svg/SVGDocument.cpp b/Source/core/svg/SVGDocument.cpp
index 1106167617364a47479c36c7147836ce0abc2fb2..ebefdeeb7fba88d5e9b88deb5ec322d2bc33e6f3 100644
--- a/Source/core/svg/SVGDocument.cpp
+++ b/Source/core/svg/SVGDocument.cpp
@@ -42,10 +42,7 @@ SVGDocument::SVGDocument(const DocumentInit& initializer)
SVGSVGElement* SVGDocument::rootElement(const Document& document)
{
Element* elem = document.documentElement();
- if (elem && elem->hasTagName(SVGNames::svgTag))
- return toSVGSVGElement(elem);
-
- return 0;
+ return isSVGSVGElement(elem) ? toSVGSVGElement(elem) : 0;
}
SVGSVGElement* SVGDocument::rootElement() const
« no previous file with comments | « Source/core/svg/SVGAltGlyphItemElement.cpp ('k') | Source/core/svg/SVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698