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

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

Issue 1919363002: Add createGradient and createPattern to OffscreenCanvas2D in worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ScriptState 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 1044ed1ab0669513f796c59cfcbdc0dee25afd90..5397f3b51a520620ce17ff729238ca3646fb8531 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))
+ if (originClean() && wouldTaintOrigin(imageSource, nullptr))
Justin Novosad 2016/04/27 19:32:25 why no scriptState here? I realize you have not ye
xlai (Olivia) 2016/04/27 19:47:49 The call here does not invoke OCRC2D::wouldTaintOr
setOriginTainted();
}
@@ -1089,7 +1089,7 @@ CanvasGradient* BaseRenderingContext2D::createRadialGradient(double x0, double y
return gradient;
}
-CanvasPattern* BaseRenderingContext2D::createPattern(const CanvasImageSourceUnion& imageSource, const String& repetitionType, ExceptionState& exceptionState)
+CanvasPattern* BaseRenderingContext2D::createPattern(ScriptState* scriptState, 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(const CanvasImageSourceUnio
}
ASSERT(imageForRendering);
- bool originClean = !wouldTaintOrigin(imageSourceInternal);
+ bool originClean = !wouldTaintOrigin(imageSourceInternal, scriptState);
return CanvasPattern::create(imageForRendering.release(), repeatMode, originClean);
}

Powered by Google App Engine
This is Rietveld 408576698