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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp

Issue 1928043002: Add drawImage() originClean() getSecurityOrigin() to OffscreenCanvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase master and Edited based on haraken's comment Created 4 years, 8 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: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
index 1f6d8b41d433809b9034173c9a98df84f4b9f9ce..8587440600d183f840951abcb49d7255af3874f2 100644
--- a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
@@ -1052,7 +1052,7 @@ void BaseRenderingContext2D::drawImage(CanvasImageSource* imageSource,
buffer->setHasExpensiveOp();
}
- if (originClean() && wouldTaintOrigin(imageSource, nullptr))
+ if (originClean() && wouldTaintOrigin(imageSource))
setOriginTainted();
}
@@ -1089,7 +1089,7 @@ CanvasGradient* BaseRenderingContext2D::createRadialGradient(double x0, double y
return gradient;
}
-CanvasPattern* BaseRenderingContext2D::createPattern(ScriptState* scriptState, const CanvasImageSourceUnion& imageSource, const String& repetitionType, ExceptionState& exceptionState)
+CanvasPattern* BaseRenderingContext2D::createPattern(const CanvasImageSourceUnion& imageSource, const String& repetitionType, ExceptionState& exceptionState)
{
Pattern::RepeatMode repeatMode = CanvasPattern::parseRepetitionType(repetitionType, exceptionState);
if (exceptionState.hadException())
@@ -1122,7 +1122,7 @@ CanvasPattern* BaseRenderingContext2D::createPattern(ScriptState* scriptState, c
}
ASSERT(imageForRendering);
- bool originClean = !wouldTaintOrigin(imageSourceInternal, scriptState);
+ bool originClean = !wouldTaintOrigin(imageSourceInternal);
return CanvasPattern::create(imageForRendering.release(), repeatMode, originClean);
}

Powered by Google App Engine
This is Rietveld 408576698