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

Unified Diff: Source/core/html/HTMLImageElement.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: Address reviewer comments 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/html/HTMLImageElement.cpp
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp
index 2f54b1083fccff0bd4a3b63982fda35f08b38f49..2d589b230caaf107a5fecc9e4120ff2195068f40 100644
--- a/Source/core/html/HTMLImageElement.cpp
+++ b/Source/core/html/HTMLImageElement.cpp
@@ -29,6 +29,7 @@
#include "core/dom/Attribute.h"
#include "core/dom/EventNames.h"
#include "core/fetch/ImageResource.h"
+#include "core/html/HTMLAnchorElement.h"
#include "core/html/HTMLFormElement.h"
#include "core/html/parser/HTMLParserIdioms.h"
#include "core/rendering/RenderImage.h"
@@ -114,7 +115,7 @@ void HTMLImageElement::parseAttribute(const QualifiedName& name, const AtomicStr
} else if (name == srcAttr)
m_imageLoader.updateFromElementIgnoringPreviousError();
else if (name == usemapAttr)
- setIsLink(!value.isNull());
+ setIsLink(!value.isNull() && !shouldProhibitLinks(this));
else if (name == onbeforeloadAttr)
setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, name, value));
else if (name == compositeAttr) {

Powered by Google App Engine
This is Rietveld 408576698