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

Unified Diff: Source/core/rendering/svg/RenderSVGRoot.cpp

Issue 22604008: Allow SVG images to not taint the canvas with drawImage/drawPattern (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase after r156375 Created 7 years, 4 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/html/HTMLImageElement.cpp ('k') | Source/core/svg/graphics/SVGImage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGRoot.cpp
diff --git a/Source/core/rendering/svg/RenderSVGRoot.cpp b/Source/core/rendering/svg/RenderSVGRoot.cpp
index 47c86deaeba8572b234d5f57f70299056a4f39b7..c6cb3c6447d0d1b50d7fe5f95319acfa05030ec2 100644
--- a/Source/core/rendering/svg/RenderSVGRoot.cpp
+++ b/Source/core/rendering/svg/RenderSVGRoot.cpp
@@ -40,6 +40,7 @@
#include "core/rendering/svg/SVGResourcesCache.h"
#include "core/svg/SVGElement.h"
#include "core/svg/SVGSVGElement.h"
+#include "core/svg/graphics/SVGImage.h"
using namespace std;
@@ -110,13 +111,7 @@ void RenderSVGRoot::computeIntrinsicRatioInformation(FloatSize& intrinsicSize, d
bool RenderSVGRoot::isEmbeddedThroughSVGImage() const
{
- if (!node())
- return false;
-
- // Test whether we're embedded through an img.
- if (Page* page = node()->document()->page())
- return page->chrome().client().isSVGImageChromeClient();
- return false;
+ return SVGImage::isInSVGImage(toSVGSVGElement(node()));
}
bool RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument() const
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/svg/graphics/SVGImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698