Implement createImageBitmap(HTMLVideoElement)
authorMs2ger@igalia.com <Ms2ger@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Feb 2018 10:24:57 +0000 (10:24 +0000)
committerMs2ger@igalia.com <Ms2ger@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Feb 2018 10:24:57 +0000 (10:24 +0000)
commitf4bd78d333edbd1179a34c6916ac722c6c4a7276
treeba6b7d8b575cb99171441d4eb2cd173780c80e24
parent4b03ad0a5e3214a10751a1f93d760b3f872c452e
Implement createImageBitmap(HTMLVideoElement)
https://bugs.webkit.org/show_bug.cgi?id=182388

Reviewed by Žan Doberšek.

LayoutTests/imported/w3c:

* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt:
* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html:
  Update from upstream to make the test pass on macOS.
* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:

Source/WebCore:

The implementation is inspired by CanvasRenderingContext2DBase::drawImage().

Tests:

- web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html
- web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html

* html/ImageBitmap.cpp:
(WebCore::taintsOrigin): Add function to help with the implementation.
(WebCore::ImageBitmap::createPromise): Fill in implementation.

LayoutTests:

* platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt
LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html
LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt
LayoutTests/platform/ios/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt
LayoutTests/platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/html/ImageBitmap.cpp