Summary: | Implement createImageBitmap(HTMLVideoElement) | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ms2ger (he/him; ⌚ UTC+1/+2) <Ms2ger> | ||||||||||||||||||||
Component: | Canvas | Assignee: | Ms2ger (he/him; ⌚ UTC+1/+2) <Ms2ger> | ||||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||||
Severity: | Normal | CC: | cdumez, commit-queue, dino, esprehn+autocc, ews-watchlist, gyuyoung.kim, rniwa, ross.kirsling, webkit-bug-importer, zan | ||||||||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||||||
Bug Depends on: | |||||||||||||||||||||||
Bug Blocks: | 182424 | ||||||||||||||||||||||
Attachments: |
|
Description
Ms2ger (he/him; ⌚ UTC+1/+2)
2018-02-01 07:22:27 PST
Created attachment 332877 [details]
Patch
Comment on attachment 332877 [details] Patch Attachment 332877 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/6316783 New failing tests: imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html Created attachment 332880 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Comment on attachment 332877 [details] Patch Attachment 332877 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/6317075 New failing tests: imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html Created attachment 332881 [details]
Archive of layout-test-results from ews101 for mac-sierra
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101 Port: mac-sierra Platform: Mac OS X 10.12.6
Created attachment 332882 [details]
Patch
Note to self: still need to update the WPE results. Comment on attachment 332882 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=332882&action=review > Source/WebCore/ChangeLog:14 > + Implement createImageBitmap(HTMLVideoElement) > + https://bugs.webkit.org/show_bug.cgi?id=182388 > + > + Reviewed by NOBODY (OOPS!). > + > + Tests: > + > + - web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html > + - web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html > + > + > + * html/ImageBitmap.cpp: Please put in the effort and describe the changes that have been made. OTOH, the ChangeLog entry looks incomplete, since neither taintsOrigin() or ImageBitmap::createPromise() are listed as changed. > Source/WebCore/html/ImageBitmap.cpp:397 > // 3. If the video element's readyState attribute is either HAVE_NOTHING or > // HAVE_METADATA, then return a promise rejected with an "InvalidStateError" > // DOMException and abort these steps. > + if (video->readyState() == HTMLMediaElement::HAVE_NOTHING || video->readyState() == HTMLMediaElement::HAVE_METADATA) { > + promise.reject(InvalidStateError, "Cannot create ImageBitmap before the HTMLVideoElement has data"); > + return; > + } Do you know what version of what spec the comments and implementation follow? The current WHATWG specification for instance doesn't contain this condition. > Source/WebCore/html/ImageBitmap.cpp:439 > + promise.resolve(imageBitmap); imageBitmap should be moved into the resolve() call. Created attachment 332970 [details]
Patch
Created attachment 332971 [details]
Patch
Comment on attachment 332971 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=332971&action=review > Source/WebCore/html/ImageBitmap.cpp:404 > + // 5. Let imageBitmap be a new ImageBitmap object. > + auto imageBitmap = create(); Following the spec steps, this should sit before the 6.1. step. > Source/WebCore/html/ImageBitmap.cpp:421 > + GraphicsContext& c = bitmapData->context(); This can go in the scope below. Created attachment 333050 [details]
Patch
Comment on attachment 333050 [details] Patch Rejecting attachment 333050 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 333050, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: rdparty/autoinstalled/mechanize/_urllib2_fork.py", line 332, in _call_chain result = func(*args) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py", line 1170, in https_open return self.do_open(conn_factory, req) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py", line 1118, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno 60] Operation timed out> Full output: http://webkit-queues.webkit.org/results/6353958 Comment on attachment 333050 [details] Patch Attachment 333050 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/6354205 New failing tests: imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html Created attachment 333051 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
LayoutTests/platform/ios/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt also needs to be updated. Created attachment 333065 [details]
Patch
Comment on attachment 333065 [details] Patch Rejecting attachment 333065 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 333065, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: rdparty/autoinstalled/mechanize/_urllib2_fork.py", line 332, in _call_chain result = func(*args) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py", line 1170, in https_open return self.do_open(conn_factory, req) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py", line 1118, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno 60] Operation timed out> Full output: http://webkit-queues.webkit.org/results/6362062 Comment on attachment 333065 [details] Patch Clearing flags on attachment: 333065 Committed r228092: <https://trac.webkit.org/changeset/228092> All reviewed patches have been landed. Closing bug. This patch is missing an #if ENABLE(VIDEO) guard. I've submitted a fix here: https://bugs.webkit.org/show_bug.cgi?id=182539 |