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

Unified Diff: third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.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/canvas/HTMLCanvasElementModule.cpp
diff --git a/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp b/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
index c3f2fb7a5865a2609eb60ff155128ed618af731b..e50e9425605fcd4225a4115c16d29cda3805b42d 100644
--- a/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
+++ b/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
@@ -19,13 +19,13 @@ void HTMLCanvasElementModule::getContext(HTMLCanvasElement& canvas, const String
}
}
-OffscreenCanvas* HTMLCanvasElementModule::transferControlToOffscreen(HTMLCanvasElement& canvas, ExceptionState& exceptionState)
+OffscreenCanvas* HTMLCanvasElementModule::transferControlToOffscreen(ExecutionContext* executionContext, HTMLCanvasElement& canvas, ExceptionState& exceptionState)
{
if (canvas.renderingContext()) {
exceptionState.throwDOMException(InvalidStateError, "Cannot transfer control from a canvas that has a rendering context.");
return nullptr;
}
- OffscreenCanvas* offscreenCanvas = OffscreenCanvas::create(canvas.width(), canvas.height());
+ OffscreenCanvas* offscreenCanvas = OffscreenCanvas::create(executionContext, canvas.width(), canvas.height());
offscreenCanvas->setAssociatedCanvasId(DOMNodeIds::idForNode(&canvas));
return offscreenCanvas;
}

Powered by Google App Engine
This is Rietveld 408576698