media element: support seekable attribute (#36541)

support seekable attribute in `htmlmediaelement`, modify `seek`
algorithm to use `seekable` attribute.

related
[specs](https://html.spec.whatwg.org/multipage/media.html#dom-media-seekable)
Testing: Run WPT Test
Fixes: https://github.com/servo/servo/issues/22297

Will wait for https://github.com/servo/media/pull/435 before turning
this to ready for review.
cc @jdm @xiaochengh

Signed-off-by: rayguo17 <rayguo17@gmail.com>
This commit is contained in:
TIN TUN AUNG 2025-04-16 13:52:19 +08:00 committed by GitHub
parent 15199ba2ef
commit f5e6eb289a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 59 additions and 39 deletions

View file

@ -2322,9 +2322,6 @@
[HTMLSelectElement interface: document.createElement("select") must inherit property "autocomplete" with the proper type]
expected: FAIL
[HTMLMediaElement interface: attribute seekable]
expected: FAIL
[HTMLTableSectionElement interface: attribute align]
expected: FAIL
@ -6487,36 +6484,24 @@
[HTMLMediaElement interface: document.createElement("video") must inherit property "preservesPitch" with the proper type]
expected: FAIL
[HTMLMediaElement interface: document.createElement("video") must inherit property "seekable" with the proper type]
expected: FAIL
[HTMLMediaElement interface: document.createElement("audio") must inherit property "getStartDate()" with the proper type]
expected: FAIL
[HTMLMediaElement interface: document.createElement("audio") must inherit property "preservesPitch" with the proper type]
expected: FAIL
[HTMLMediaElement interface: document.createElement("audio") must inherit property "seekable" with the proper type]
expected: FAIL
[HTMLMediaElement interface: new Audio() must inherit property "getStartDate()" with the proper type]
expected: FAIL
[HTMLMediaElement interface: new Audio() must inherit property "preservesPitch" with the proper type]
expected: FAIL
[HTMLMediaElement interface: new Audio() must inherit property "seekable" with the proper type]
expected: FAIL
[HTMLMediaElement interface: operation getStartDate()]
expected: FAIL
[HTMLMediaElement interface: attribute preservesPitch]
expected: FAIL
[HTMLMediaElement interface: attribute seekable]
expected: FAIL
[HTMLMapElement interface: attribute name]
expected: FAIL

View file

@ -1,4 +0,0 @@
[seek-to-currentTime.html]
[seek to currentTime]
expected: FAIL