htmlmediaelement: Support seek requests for non seekable fetch context (#37264)

According to specification the data:// URL protocol doesn't support
range request
so be able make any seek request to required content position let's
allow
for non seekable fetch context discard fetched content bytes until seek
offset.
https://fetch.spec.whatwg.org/#scheme-fetch

Some scheme URLs (like data:// URL) doesn't expose "Content-Length"
header in response
so the total expected size of the stream is unknown and it causes some
additional
seek request (SeekData) from the media player. Try to post configure
stream size
after we reached fetch EOS response.

Related source code which breaks WPT tests:

[tests/wpt/tests/html/canvas/element/manual/imagebitmap/common.sub.js#L56-L78](https://github.com/servo/servo/tree/main/tests/wpt/tests/html/canvas/element/manual/imagebitmap/common.sub.js#L56-L78)

Testing: Improvements in the following tests:
 - html/canvas/element/manual/imagebitmap/createImageBitmap*

Fixes: https://github.com/servo/servo/issues/32645
Fixes: https://github.com/servo/servo/issues/32745
Fixes: https://github.com/servo/servo/issues/34119
Fixes: https://github.com/servo/servo/issues/34120
Fixes: https://github.com/servo/servo/issues/34151

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
This commit is contained in:
Andrei Volykhin 2025-06-07 00:52:24 +03:00 committed by GitHub
parent 2c51d44b53
commit b81f1b135b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 52 additions and 42 deletions

View file

@ -1,4 +1,4 @@
[texture-srgb-upload.html]
expected: TIMEOUT
expected: ERROR
[Overall test]
expected: NOTRUN