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

Unified Diff: third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp

Issue 2335903003: Revert of Disallow users modify canvas after it transfers control to offscreen (Closed)
Patch Set: Created 4 years, 3 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 0e19ab54daefa3aa37a018250efb8e19ffea6119..e673f25d2fb1e24173f604a6aec06cb0bb484ecd 100644
--- a/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
+++ b/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
@@ -11,13 +11,8 @@
namespace blink {
-void HTMLCanvasElementModule::getContext(HTMLCanvasElement& canvas, const String& type, const CanvasContextCreationAttributes& attributes, ExceptionState& exceptionState, RenderingContext& result)
+void HTMLCanvasElementModule::getContext(HTMLCanvasElement& canvas, const String& type, const CanvasContextCreationAttributes& attributes, RenderingContext& result)
{
- if (canvas.surfaceLayerBridge()) {
- // The existence of canvas surfaceLayerBridge indicates that HTMLCanvasElement.transferControlToOffscreen() has been called.
- exceptionState.throwDOMException(InvalidStateError, "Cannot get context from a canvas that has transferred its control to offscreen.");
- }
-
CanvasRenderingContext* context = canvas.getCanvasRenderingContext(type, attributes);
if (context) {
context->setCanvasGetContextResult(result);

Powered by Google App Engine
This is Rietveld 408576698