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

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: 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
Index: Source/core/rendering/svg/RenderSVGRoot.cpp
diff --git a/Source/core/rendering/svg/RenderSVGRoot.cpp b/Source/core/rendering/svg/RenderSVGRoot.cpp
index 3e63935b13d1cc7bfd47d01161016b5e70a647fc..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,22 +111,7 @@ void RenderSVGRoot::computeIntrinsicRatioInformation(FloatSize& intrinsicSize, d
bool RenderSVGRoot::isEmbeddedThroughSVGImage() const
{
- if (!node())
- return false;
-
- Frame* frame = node()->document()->frame();
- if (!frame)
- return false;
-
- // Test whether we're embedded through an img.
- if (!frame->page())
- return false;
-
- ChromeClient* chromeClient = frame->page()->chrome().client();
- if (!chromeClient || !chromeClient->isSVGImageChromeClient())
- return false;
-
- return true;
+ return SVGImage::isInSVGImage(toSVGSVGElement(node()));
}
bool RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument() const

Powered by Google App Engine
This is Rietveld 408576698