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

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

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/SVGAnimateMotionElement.cpp ('k') | Source/core/svg/SVGFontElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGElement.cpp
diff --git a/Source/core/svg/SVGElement.cpp b/Source/core/svg/SVGElement.cpp
index dffa90982c18e023169c0361571c0c274adde89d..a62f9bd5a53a8592418cf821b632be929ea95d28 100644
--- a/Source/core/svg/SVGElement.cpp
+++ b/Source/core/svg/SVGElement.cpp
@@ -41,6 +41,7 @@
#include "core/svg/SVGElementInstance.h"
#include "core/svg/SVGElementRareData.h"
#include "core/svg/SVGGraphicsElement.h"
+#include "core/svg/SVGImageElement.h"
#include "core/svg/SVGSVGElement.h"
namespace WebCore {
@@ -211,7 +212,7 @@ SVGElement* SVGElement::viewportElement() const
// to determine the "overflow" property. <use> on <symbol> wouldn't work otherwhise.
ContainerNode* n = parentOrShadowHostNode();
while (n) {
- if (n->hasTagName(SVGNames::svgTag) || n->hasTagName(SVGNames::imageTag) || n->hasTagName(SVGNames::symbolTag))
+ if (n->hasTagName(SVGNames::svgTag) || isSVGImageElement(n) || n->hasTagName(SVGNames::symbolTag))
return toSVGElement(n);
n = n->parentOrShadowHostNode();
« no previous file with comments | « Source/core/svg/SVGAnimateMotionElement.cpp ('k') | Source/core/svg/SVGFontElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698