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

Unified Diff: third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp

Issue 1954533002: Implement wouldTaintOrigin and expose createPattern for OCRC2D on main thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: OCRC2D pattern is working fine in GPU; remove Failure mark in TestExpectations Created 4 years, 7 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/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
diff --git a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
index 24633388c8c78a57f59e443671e8e1e91a22faf8..88f141ba97b60e842fdbd0114168d2a12b7ba863 100644
--- a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
@@ -47,14 +47,9 @@ bool OffscreenCanvasRenderingContext2D::wouldTaintOrigin(CanvasImageSource* sour
// Currently, we only support passing in ImageBitmap as source image in
// drawImage() or createPattern() in a OffscreenCanvas2d in worker.
ASSERT(source->isImageBitmap());
- // ImageBitmap wouldTaintOrigin doesn't consider destinationSecurityOrigin.
- return source->wouldTaintOrigin(nullptr);
}
- // TODO(crbug.com/606925): implement wouldTaintOrigin for OffscreenCanvas2d
- // on main thread
- NOTIMPLEMENTED();
- return true;
+ return CanvasRenderingContext::wouldTaintOrigin(source, executionContext->getSecurityOrigin());
}
int OffscreenCanvasRenderingContext2D::width() const

Powered by Google App Engine
This is Rietveld 408576698