Diff
Modified: trunk/LayoutTests/ChangeLog (253030 => 253031)
--- trunk/LayoutTests/ChangeLog 2019-12-03 10:03:32 UTC (rev 253030)
+++ trunk/LayoutTests/ChangeLog 2019-12-03 10:30:55 UTC (rev 253031)
@@ -1,3 +1,12 @@
+2019-12-03 Zan Dobersek <zdober...@igalia.com>
+
+ Implement createImageBitmap(OffscreenCanvas)
+ https://bugs.webkit.org/show_bug.cgi?id=183440
+
+ Reviewed by Antti Koivisto.
+
+ * platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
+
2019-12-02 Nikita Vasilyev <nvasil...@apple.com>
Web Inspector: Provide UI to convert between sRGB and p3 color spaces
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (253030 => 253031)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2019-12-03 10:03:32 UTC (rev 253030)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2019-12-03 10:30:55 UTC (rev 253031)
@@ -1,3 +1,16 @@
+2019-12-03 Zan Dobersek <zdober...@igalia.com>
+
+ Implement createImageBitmap(OffscreenCanvas)
+ https://bugs.webkit.org/show_bug.cgi?id=183440
+
+ Reviewed by Antti Koivisto.
+
+ * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt:
+ * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt:
+ * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt:
+ * web-platform-tests/offscreen-canvas/convert-to-blob/offscreencanvas.convert.to.blob.w-expected.txt:
+ * web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w-expected.txt:
+
2019-12-02 Alex Christensen <achristen...@webkit.org>
Incorrect association of the URL object with the value port
Modified: trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt (253030 => 253031)
--- trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt 2019-12-03 10:03:32 UTC (rev 253030)
+++ trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt 2019-12-03 10:30:55 UTC (rev 253031)
@@ -34,11 +34,11 @@
FAIL createImageBitmap from a vector SVGImageElement scaled up, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
FAIL createImageBitmap from a vector SVGImageElement resized, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
FAIL createImageBitmap from a vector SVGImageElement with negative sw/sh, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
-FAIL createImageBitmap from an OffscreenCanvas, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
-FAIL createImageBitmap from an OffscreenCanvas scaled down, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
-FAIL createImageBitmap from an OffscreenCanvas scaled up, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
-FAIL createImageBitmap from an OffscreenCanvas resized, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
-FAIL createImageBitmap from an OffscreenCanvas with negative sw/sh, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
+PASS createImageBitmap from an OffscreenCanvas, and drawImage on the created ImageBitmap
+PASS createImageBitmap from an OffscreenCanvas scaled down, and drawImage on the created ImageBitmap
+PASS createImageBitmap from an OffscreenCanvas scaled up, and drawImage on the created ImageBitmap
+PASS createImageBitmap from an OffscreenCanvas resized, and drawImage on the created ImageBitmap
+PASS createImageBitmap from an OffscreenCanvas with negative sw/sh, and drawImage on the created ImageBitmap
FAIL createImageBitmap from an ImageData, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ImageData is not implemented"
FAIL createImageBitmap from an ImageData scaled down, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ImageData is not implemented"
FAIL createImageBitmap from an ImageData scaled up, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ImageData is not implemented"
Modified: trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt (253030 => 253031)
--- trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt 2019-12-03 10:03:32 UTC (rev 253030)
+++ trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt 2019-12-03 10:30:55 UTC (rev 253031)
@@ -6,7 +6,7 @@
PASS Serialize ImageBitmap created from a vector HTMLImageElement
FAIL Serialize ImageBitmap created from a bitmap SVGImageElement promise_test: Unhandled rejection with value: object "TypeError: Type error"
FAIL Serialize ImageBitmap created from a vector SVGImageElement promise_test: Unhandled rejection with value: object "TypeError: Type error"
-FAIL Serialize ImageBitmap created from an OffscreenCanvas promise_test: Unhandled rejection with value: object "TypeError: Type error"
+PASS Serialize ImageBitmap created from an OffscreenCanvas
FAIL Serialize ImageBitmap created from an ImageData promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ImageData is not implemented"
PASS Serialize ImageBitmap created from an ImageBitmap
PASS Serialize ImageBitmap created from a Blob
Modified: trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt (253030 => 253031)
--- trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt 2019-12-03 10:03:32 UTC (rev 253030)
+++ trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt 2019-12-03 10:30:55 UTC (rev 253031)
@@ -6,7 +6,7 @@
PASS Transfer ImageBitmap created from a vector HTMLImageElement
FAIL Transfer ImageBitmap created from a bitmap SVGImageElement promise_test: Unhandled rejection with value: object "TypeError: Type error"
FAIL Transfer ImageBitmap created from a vector SVGImageElement promise_test: Unhandled rejection with value: object "TypeError: Type error"
-FAIL Transfer ImageBitmap created from an OffscreenCanvas promise_test: Unhandled rejection with value: object "TypeError: Type error"
+PASS Transfer ImageBitmap created from an OffscreenCanvas
FAIL Transfer ImageBitmap created from an ImageData promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ImageData is not implemented"
PASS Transfer ImageBitmap created from an ImageBitmap
PASS Transfer ImageBitmap created from a Blob
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt (253030 => 253031)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt 2019-12-03 10:03:32 UTC (rev 253030)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt 2019-12-03 10:30:55 UTC (rev 253031)
@@ -34,11 +34,11 @@
FAIL createImageBitmap from a vector SVGImageElement scaled up, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
FAIL createImageBitmap from a vector SVGImageElement resized, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
FAIL createImageBitmap from a vector SVGImageElement with negative sw/sh, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
-FAIL createImageBitmap from an OffscreenCanvas, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
-FAIL createImageBitmap from an OffscreenCanvas scaled down, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
-FAIL createImageBitmap from an OffscreenCanvas scaled up, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
-FAIL createImageBitmap from an OffscreenCanvas resized, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
-FAIL createImageBitmap from an OffscreenCanvas with negative sw/sh, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: Type error"
+PASS createImageBitmap from an OffscreenCanvas, and drawImage on the created ImageBitmap
+PASS createImageBitmap from an OffscreenCanvas scaled down, and drawImage on the created ImageBitmap
+PASS createImageBitmap from an OffscreenCanvas scaled up, and drawImage on the created ImageBitmap
+PASS createImageBitmap from an OffscreenCanvas resized, and drawImage on the created ImageBitmap
+PASS createImageBitmap from an OffscreenCanvas with negative sw/sh, and drawImage on the created ImageBitmap
FAIL createImageBitmap from an ImageData, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ImageData is not implemented"
FAIL createImageBitmap from an ImageData scaled down, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ImageData is not implemented"
FAIL createImageBitmap from an ImageData scaled up, and drawImage on the created ImageBitmap promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ImageData is not implemented"
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt (253030 => 253031)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt 2019-12-03 10:03:32 UTC (rev 253030)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt 2019-12-03 10:30:55 UTC (rev 253031)
@@ -21,9 +21,9 @@
FAIL createImageBitmap with a a vector SVGImageElement source and sw set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError")
FAIL createImageBitmap with a a vector SVGImageElement source and sh set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError")
FAIL createImageBitmap with a a vector SVGImageElement source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "InvalidStateError" ("InvalidStateError")
-FAIL createImageBitmap with a an OffscreenCanvas source and sw set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError")
-FAIL createImageBitmap with a an OffscreenCanvas source and sh set to 0 assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "RangeError" ("RangeError")
-FAIL createImageBitmap with a an OffscreenCanvas source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: Type error" ("TypeError") expected object "InvalidStateError" ("InvalidStateError")
+PASS createImageBitmap with a an OffscreenCanvas source and sw set to 0
+PASS createImageBitmap with a an OffscreenCanvas source and sh set to 0
+FAIL createImageBitmap with a an OffscreenCanvas source and oversized (unallocatable) crop region assert_unreached: Should have rejected: undefined Reached unreachable code
PASS createImageBitmap with a an ImageData source and sw set to 0
PASS createImageBitmap with a an ImageData source and sh set to 0
FAIL createImageBitmap with a an ImageData source and oversized (unallocatable) crop region assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with ImageData is not implemented" ("TypeError") expected object "InvalidStateError" ("InvalidStateError")
@@ -42,7 +42,7 @@
PASS createImageBitmap with empty image source.
PASS createImageBitmap with empty video source.
PASS createImageBitmap with an oversized canvas source.
-FAIL createImageBitmap with an invalid OffscreenCanvas source. assert_throws: function "function () { throw e }" threw object "TypeError: Type error" that is not a DOMException InvalidStateError: property "code" is equal to undefined, expected 11
+PASS createImageBitmap with an invalid OffscreenCanvas source.
PASS createImageBitmap with an undecodable blob source.
PASS createImageBitmap with a broken image source.
FAIL createImageBitmap with an available but undecodable image source. assert_unreached: Should have rejected: undefined Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt (253030 => 253031)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt 2019-12-03 10:03:32 UTC (rev 253030)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt 2019-12-03 10:30:55 UTC (rev 253031)
@@ -6,7 +6,7 @@
PASS Serialize ImageBitmap created from a vector HTMLImageElement
FAIL Serialize ImageBitmap created from a bitmap SVGImageElement promise_test: Unhandled rejection with value: object "TypeError: Type error"
FAIL Serialize ImageBitmap created from a vector SVGImageElement promise_test: Unhandled rejection with value: object "TypeError: Type error"
-FAIL Serialize ImageBitmap created from an OffscreenCanvas promise_test: Unhandled rejection with value: object "TypeError: Type error"
+PASS Serialize ImageBitmap created from an OffscreenCanvas
FAIL Serialize ImageBitmap created from an ImageData promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ImageData is not implemented"
PASS Serialize ImageBitmap created from an ImageBitmap
PASS Serialize ImageBitmap created from a Blob
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt (253030 => 253031)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt 2019-12-03 10:03:32 UTC (rev 253030)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt 2019-12-03 10:30:55 UTC (rev 253031)
@@ -6,7 +6,7 @@
PASS Transfer ImageBitmap created from a vector HTMLImageElement
FAIL Transfer ImageBitmap created from a bitmap SVGImageElement promise_test: Unhandled rejection with value: object "TypeError: Type error"
FAIL Transfer ImageBitmap created from a vector SVGImageElement promise_test: Unhandled rejection with value: object "TypeError: Type error"
-FAIL Transfer ImageBitmap created from an OffscreenCanvas promise_test: Unhandled rejection with value: object "TypeError: Type error"
+PASS Transfer ImageBitmap created from an OffscreenCanvas
FAIL Transfer ImageBitmap created from an ImageData promise_test: Unhandled rejection with value: object "TypeError: createImageBitmap with ImageData is not implemented"
PASS Transfer ImageBitmap created from an ImageBitmap
PASS Transfer ImageBitmap created from a Blob
Modified: trunk/Source/WebCore/ChangeLog (253030 => 253031)
--- trunk/Source/WebCore/ChangeLog 2019-12-03 10:03:32 UTC (rev 253030)
+++ trunk/Source/WebCore/ChangeLog 2019-12-03 10:30:55 UTC (rev 253031)
@@ -1,3 +1,17 @@
+2019-12-03 Zan Dobersek <zdober...@igalia.com>
+
+ Implement createImageBitmap(OffscreenCanvas)
+ https://bugs.webkit.org/show_bug.cgi?id=183440
+
+ Reviewed by Antti Koivisto.
+
+ No new tests. Covered by existing tests.
+
+ * html/ImageBitmap.cpp:
+ (WebCore::ImageBitmap::createPromise):
+ * html/ImageBitmap.h:
+ * page/WindowOrWorkerGlobalScope.idl:
+
2019-12-03 Carlos Garcia Campos <cgar...@igalia.com>
WebDriver: handle elements of type file in send keys command
Modified: trunk/Source/WebCore/html/ImageBitmap.cpp (253030 => 253031)
--- trunk/Source/WebCore/html/ImageBitmap.cpp 2019-12-03 10:03:32 UTC (rev 253030)
+++ trunk/Source/WebCore/html/ImageBitmap.cpp 2019-12-03 10:30:55 UTC (rev 253031)
@@ -43,6 +43,9 @@
#include "JSDOMPromiseDeferred.h"
#include "JSImageBitmap.h"
#include "LayoutSize.h"
+#if ENABLE(OFFSCREEN_CANVAS)
+#include "OffscreenCanvas.h"
+#endif
#include "RenderElement.h"
#include "SharedBuffer.h"
#include "SuspendableTimer.h"
@@ -343,12 +346,24 @@
promise.resolve(WTFMove(imageBitmap));
}
-void ImageBitmap::createPromise(ScriptExecutionContext&, RefPtr<HTMLCanvasElement>& canvasElement, ImageBitmapOptions&& options, Optional<IntRect> rect, ImageBitmap::Promise&& promise)
+void ImageBitmap::createPromise(ScriptExecutionContext& context, RefPtr<HTMLCanvasElement>& canvasElement, ImageBitmapOptions&& options, Optional<IntRect> rect, ImageBitmap::Promise&& promise)
{
+ createPromise(context, *canvasElement, WTFMove(options), WTFMove(rect), WTFMove(promise));
+}
+
+#if ENABLE(OFFSCREEN_CANVAS)
+void ImageBitmap::createPromise(ScriptExecutionContext& context, RefPtr<OffscreenCanvas>& canvasElement, ImageBitmapOptions&& options, Optional<IntRect> rect, ImageBitmap::Promise&& promise)
+{
+ createPromise(context, *canvasElement, WTFMove(options), WTFMove(rect), WTFMove(promise));
+}
+#endif
+
+void ImageBitmap::createPromise(ScriptExecutionContext&, CanvasBase& canvas, ImageBitmapOptions&& options, Optional<IntRect> rect, ImageBitmap::Promise&& promise)
+{
// 2. If the canvas element's bitmap has either a horizontal dimension or a vertical
// dimension equal to zero, then return a promise rejected with an "InvalidStateError"
// DOMException and abort these steps.
- auto size = canvasElement->size();
+ auto size = canvas.size();
if (!size.width() || !size.height()) {
promise.reject(InvalidStateError, "Cannot create ImageBitmap from a canvas that has zero width or height");
return;
@@ -366,7 +381,7 @@
auto outputSize = outputSizeForSourceRectangle(sourceRectangle.returnValue(), options);
auto bitmapData = ImageBuffer::create(FloatSize(outputSize.width(), outputSize.height()), bufferRenderingMode);
- auto imageForRender = canvasElement->copiedImage();
+ auto imageForRender = canvas.copiedImage();
if (!imageForRender) {
promise.reject(InvalidStateError, "Cannot create ImageBitmap from canvas that can't be rendered");
return;
@@ -381,7 +396,7 @@
// 5. Set the origin-clean flag of the ImageBitmap object's bitmap to the same value as
// the origin-clean flag of the canvas element's bitmap.
- imageBitmap->m_originClean = canvasElement->originClean();
+ imageBitmap->m_originClean = canvas.originClean();
// 6. Return a new promise, but continue running these steps in parallel.
// 7. Resolve the promise with the new ImageBitmap object as the value.
Modified: trunk/Source/WebCore/html/ImageBitmap.h (253030 => 253031)
--- trunk/Source/WebCore/html/ImageBitmap.h 2019-12-03 10:03:32 UTC (rev 253030)
+++ trunk/Source/WebCore/html/ImageBitmap.h 2019-12-03 10:30:55 UTC (rev 253031)
@@ -38,6 +38,7 @@
namespace WebCore {
class Blob;
+class CanvasBase;
class HTMLCanvasElement;
class HTMLImageElement;
class HTMLVideoElement;
@@ -46,6 +47,9 @@
class ImageData;
class IntRect;
class IntSize;
+#if ENABLE(OFFSCREEN_CANVAS)
+class OffscreenCanvas;
+#endif
class PendingImageBitmap;
class ScriptExecutionContext;
class TypedOMCSSImageValue;
@@ -63,6 +67,9 @@
#endif
RefPtr<HTMLCanvasElement>,
RefPtr<ImageBitmap>,
+#if ENABLE(OFFSCREEN_CANVAS)
+ RefPtr<OffscreenCanvas>,
+#endif
#if ENABLE(CSS_TYPED_OM)
RefPtr<TypedOMCSSImageValue>,
#endif
@@ -105,8 +112,12 @@
#if ENABLE(VIDEO)
static void createPromise(ScriptExecutionContext&, RefPtr<HTMLVideoElement>&, ImageBitmapOptions&&, Optional<IntRect>, Promise&&);
#endif
+ static void createPromise(ScriptExecutionContext&, RefPtr<ImageBitmap>&, ImageBitmapOptions&&, Optional<IntRect>, Promise&&);
static void createPromise(ScriptExecutionContext&, RefPtr<HTMLCanvasElement>&, ImageBitmapOptions&&, Optional<IntRect>, Promise&&);
- static void createPromise(ScriptExecutionContext&, RefPtr<ImageBitmap>&, ImageBitmapOptions&&, Optional<IntRect>, Promise&&);
+#if ENABLE(OFFSCREEN_CANVAS)
+ static void createPromise(ScriptExecutionContext&, RefPtr<OffscreenCanvas>&, ImageBitmapOptions&&, Optional<IntRect>, Promise&&);
+#endif
+ static void createPromise(ScriptExecutionContext&, CanvasBase&, ImageBitmapOptions&&, Optional<IntRect>, Promise&&);
static void createPromise(ScriptExecutionContext&, RefPtr<Blob>&, ImageBitmapOptions&&, Optional<IntRect>, Promise&&);
static void createPromise(ScriptExecutionContext&, RefPtr<ImageData>&, ImageBitmapOptions&&, Optional<IntRect>, Promise&&);
static void createPromise(ScriptExecutionContext&, RefPtr<TypedOMCSSImageValue>&, ImageBitmapOptions&&, Optional<IntRect>, Promise&&);
Modified: trunk/Source/WebCore/page/WindowOrWorkerGlobalScope.idl (253030 => 253031)
--- trunk/Source/WebCore/page/WindowOrWorkerGlobalScope.idl 2019-12-03 10:03:32 UTC (rev 253030)
+++ trunk/Source/WebCore/page/WindowOrWorkerGlobalScope.idl 2019-12-03 10:30:55 UTC (rev 253031)
@@ -25,13 +25,20 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if defined(ENABLE_VIDEO) && ENABLE_VIDEO && defined(ENABLE_CSS_TYPED_OM) && ENABLE_CSS_TYPED_OM
-typedef (HTMLImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap or TypedOMCSSImageValue) CanvasImageSource;
-#elif defined(ENABLE_VIDEO) && ENABLE_VIDEO
-typedef (HTMLImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap) CanvasImageSource;
-#else
-typedef (HTMLImageElement or HTMLCanvasElement or ImageBitmap) CanvasImageSource;
+// FIXME: This should include SVGImageElement.
+typedef (HTMLImageElement
+#if defined(ENABLE_VIDEO) && ENABLE_VIDEO
+ or HTMLVideoElement
#endif
+ or HTMLCanvasElement
+ or ImageBitmap
+#if defined(ENABLE_OFFSCREEN_CANVAS) && ENABLE_OFFSCREEN_CANVAS
+ or OffscreenCanvas
+#endif
+#if defined(ENABLE_CSS_TYPED_OM) && ENABLE_CSS_TYPED_OM
+ or TypedOMCSSImageValue
+#endif
+) CanvasImageSource;
typedef (CanvasImageSource or Blob or ImageData) ImageBitmapSource;