Bug 1643873 [wpt PR 24023] - Implement the media element 'show poster flag' in accord...
commit8a50c68948495cd883d0a9b7f334cac088ea46de
authorWill Cassella <cassew@google.com>
Mon, 22 Jun 2020 10:38:30 +0000 (22 10:38 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Tue, 23 Jun 2020 11:04:12 +0000 (23 11:04 +0000)
tree79f0f4cd4f3aba3cc54fca333f67ae9a0972b0ad
parent09db28eb3a6fccc8dd3334b6581adf6a879a4a06
Bug 1643873 [wpt PR 24023] - Implement the media element 'show poster flag' in accordance with spec, a=testonly

Automatic update from web-platform-tests
Implement the media element 'show poster flag' in accordance with spec

Previously, HTMLMediaElement had a 'DisplayMode' enum which was one of
{ 'kUnknown', 'kPoster', 'kVideo' }. This didn't mesh well with the
spec, which only mentions the 'show poster flag' as being true or false.

Additionally, the points where this mode was changed were inconsistent
with the spec, and resulted in us showing video contents when we should
be showing the poster, and makes implementing other features dependent
on the state of the 'show poster flag' difficult, such as the cue
timeline.

This CL removes 'DisplayMode' from HTMLMediaElement (though reintroduces
it in a limited form in LayoutVideo), and implements the
'show-poster-flag' in accordance with the spec. This makes the behavior
of poster rendering (as detailed in the attached bug) consistent with
Firefox and Safari.

Bug: 1007241
Change-Id: Iaaf3a10581357443b7889578360852e0a674e68c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222948
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#778039}

--

wpt-commits: 04caec1f4f239a2f1b36b6eaa5017f421b242694
wpt-pr: 24023
testing/web-platform/tests/html/semantics/embedded-content/the-video-element/video-poster-shown-preload-auto-ref.html [new file with mode: 0644]
testing/web-platform/tests/html/semantics/embedded-content/the-video-element/video-poster-shown-preload-auto.html [new file with mode: 0644]