[webvtt] Enable wpt "testing/web-platform/tests/html/semantics/embedded-content/media-elements/track/track-element/track-cue-negative-duration.html""

RESOLVED FIXED in Firefox 68

Status

()

defect
P2
normal
RESOLVED FIXED
2 months ago
2 months ago

People

(Reporter: alwu, Assigned: alwu)

Tracking

(Blocks 1 bug)

unspecified
mozilla68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

This test failed because we exclude cues with negative duration in [1]. If we would like to enable this test, we have to add this kinds of cue to otherCue and then treat it as missing cue in TimeMarchesOn in order to dispatch enter and exit for it.

However, if we do so, it would result in large amount of unnesscesary enter and exit being dispatched, because everytime the cue's start time is larger than lastTime, it would be added in missing cue because its endtime is always smaller than currentTime.

So here we should not follow what spec said perfectly, because it would cause the unnecessary overhead.

[1] https://searchfox.org/mozilla-central/rev/e7d9a8749303b39dadcc0e18ea0d60a570a68145/dom/media/TextTrack.cpp#323-326

Assignee: nobody → alwu

According to the spec [1], the cue's end time might be negative and be smaller than its start time.

In this case, when we reach the cue's start start on the media time line, we should treat it as a missing cue (which won't be actually displayed, but will receive events) when we run the TimeMarchesOn.

Therefore, we have to add this kinds of cue into otherCue and let TimeMarchesOn handle it properly, to dispatch enter and exit event for it.

[1] https://html.spec.whatwg.org/multipage/media.html#text-track-cue-end-time

Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/175f567cd163
handle cue with negative duration. r=jya
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.