[Gecko Bug 1555197] part4 : modify wpt 'track-webvtt-two-cue-layout-after-first-end.html' and 'track-webvtt-two-cue-layout-after-first-end-ref.html'. #17318
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For
track-webvtt-two-cue-layout-after-first-end.html
(1) modify cue1's start time
According to the text track cue order [1], "cues must be sorted by their start time, earliest first; then, any cues with the same start time must be sorted by their end time, latest first".
This order also decides which cue we would display first. As this test would like show
cue1
at top and show another cue at bottom, we should modify cue1'sstartTime
in order to put it before cue [0:3] in the cue list.[1] https://html.spec.whatwg.org/multipage/media.html#text-track-cue-order
(2) listen for cue1's
exit
As this cue would like to stop when the first cue ends, it should listen
exit
event.For
track-webvtt-two-cue-layout-after-first-end-ref.html
, we should callvideo.play()
in order to clearshow-poster
flag [2] and runTimeMarchesOn
to show the cue.If we didn't call it to reset the flag, we won't display any cue.
[2] https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:show-poster-flag
Differential Revision: https://phabricator.services.mozilla.com/D32937
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1555197
gecko-commit: 323c42c5c3777286dd99f11db2d1c2e852a07690
gecko-integration-branch: autoland
gecko-reviewers: jya