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

Unified Diff: third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.idl

Issue 1748163003: Add rendering context and rendering 2D context to OffscreenCanvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make OffscreenCanvasRenderingContext Modules exportable" Created 4 years, 9 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/offscreencanvas/OffscreenCanvas.idl
diff --git a/third_party/WebKit/Source/core/html/canvas/OffscreenCanvas.idl b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.idl
similarity index 59%
rename from third_party/WebKit/Source/core/html/canvas/OffscreenCanvas.idl
rename to third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.idl
index be5bf9128569e7bf0702354f142c44a037338a56..b1436b0a5c5f0442a648cbee0435fa5b037d9016 100644
--- a/third_party/WebKit/Source/core/html/canvas/OffscreenCanvas.idl
+++ b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.idl
@@ -2,6 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Note: If there're more context types implemented, they should be added here
+// to form a union type of OffscreenCanvasRenderingContext
+typedef OffscreenCanvasRenderingContext2D OffscreenRenderingContext;
+
[
Constructor([EnforceRange] unsigned long width, [EnforceRange] unsigned long height),
GarbageCollected,
@@ -10,4 +14,6 @@
] interface OffscreenCanvas {
[EnforceRange] attribute unsigned long width;
[EnforceRange] attribute unsigned long height;
+
+ OffscreenRenderingContext? getContext(DOMString contextId, optional CanvasContextCreationAttributes attributes);
};

Powered by Google App Engine
This is Rietveld 408576698