[webkit-changes] [WebKit/WebKit] fb0116: Support negative timestamps of TextTrackCue

Ahmad Saleem noreply at github.com
Fri Aug 18 09:53:00 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fb0116deed64a915e4294d93ac1e0a4e0afc3d06
      https://github.com/WebKit/WebKit/commit/fb0116deed64a915e4294d93ac1e0a4e0afc3d06
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-08-18 (Fri, 18 Aug 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/track-cue-negative-duration-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/track-cue-negative-timestamp-events-expected.txt
    R LayoutTests/media/track/track-cue-negative-timestamp-expected.txt
    R LayoutTests/media/track/track-cue-negative-timestamp.html
    M Source/WebCore/html/track/TextTrack.cpp
    M Source/WebCore/html/track/TextTrackCue.cpp
    M Source/WebCore/html/track/TextTrackCueList.cpp

  Log Message:
  -----------
  Support negative timestamps of TextTrackCue

https://bugs.webkit.org/show_bug.cgi?id=93143
rdar://problem/113035924

Reviewed by Eric Carlson.

This patch aligns WebKit with Blink / Chromium, Gecko / Firefox and Web-Spec.

Merge: https://chromium-review.googlesource.com/c/chromium/src/+/863270

Ensure proper behaviour for negative timestamps of TextTrackCue.
1. Cues with negative startTime should become active from 0s.
2. Cues with negative startTime and endTime should never be active.

Web-Spec References: https://github.com/whatwg/html/commit/af1b8e293db401bdc758f26fbf565e52f6724c1a and
https://www.w3.org/Bugs/Public/show_bug.cgi?id=18480

* Source/WebCore/html/track/TextTrack.cpp:
(TextTrack::addCue): Remove 'TODO' and greater then 'zeroTime' case
* Source/WebCore/html/track/TextTrackCue.cpp:
(TextTrackCue::setStartTime): Remove 'TODO' and remove 'value' less than 0 early return case
(TextTrackCue::setEndTime): Ditto
* Source/WebCore/html/track/TextTrackCueList.cpp:
(TextTrackCueList::add): Remove 'ASSERT' for 'non-negative' case
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/track-cue-negative-timestamp-events-expected.txt: Rebaselined
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/track-cue-negative-duration-expected.txt: Rebaselined
* LayoutTests/media/track/track-cue-negative-timestamp.html: Removed in favor of WPT
* LayoutTests/media/track/track-cue-negative-timestamp-expected.txt: Ditto

Canonical link: https://commits.webkit.org/267042@main




More information about the webkit-changes mailing list