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

Unified Diff: Source/core/svg/graphics/SVGImage.cpp

Issue 163573003: Require the entire document-tree of an SVGImage to be single-origin (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | « LayoutTests/canvas/resources/svg-with-multiple-images-one-with-foreignobject.svg ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/graphics/SVGImage.cpp
diff --git a/Source/core/svg/graphics/SVGImage.cpp b/Source/core/svg/graphics/SVGImage.cpp
index 9805fd3a9c37945614fe4895cf4c62c85b18db8c..3299c7214dd067360add5621ceba6bca8d67ad4f 100644
--- a/Source/core/svg/graphics/SVGImage.cpp
+++ b/Source/core/svg/graphics/SVGImage.cpp
@@ -99,10 +99,13 @@ bool SVGImage::currentFrameHasSingleSecurityOrigin() const
while (Node* node = walker.get()) {
if (node->hasTagName(SVGNames::foreignObjectTag))
return false;
- if (node->hasTagName(SVGNames::imageTag))
- return toSVGImageElement(node)->currentFrameHasSingleSecurityOrigin();
- if (node->hasTagName(SVGNames::feImageTag))
- return toSVGFEImageElement(node)->currentFrameHasSingleSecurityOrigin();
+ if (node->hasTagName(SVGNames::imageTag)) {
+ if (!toSVGImageElement(node)->currentFrameHasSingleSecurityOrigin())
+ return false;
+ } else if (node->hasTagName(SVGNames::feImageTag)) {
+ if (!toSVGFEImageElement(node)->currentFrameHasSingleSecurityOrigin())
+ return false;
+ }
walker.next();
}
« no previous file with comments | « LayoutTests/canvas/resources/svg-with-multiple-images-one-with-foreignobject.svg ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698