[webkit-changes] [WebKit/WebKit] eae66f: WebVTT regions are not positioned according to the...

danae404 noreply at github.com
Tue Oct 3 10:04:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: eae66f440e600b0d39e9bcbd60582c96cc4c35a0
      https://github.com/WebKit/WebKit/commit/eae66f440e600b0d39e9bcbd60582c96cc4c35a0
  Author: Dana Estra <destra at apple.com>
  Date:   2023-10-03 (Tue, 03 Oct 2023)

  Changed paths:
    A LayoutTests/media/track/captions-webvtt/regions.vtt
    A LayoutTests/media/track/webvtt-region-position-expected.txt
    A LayoutTests/media/track/webvtt-region-position.html
    M Source/WebCore/Modules/modern-media-controls/controls/text-tracks.css
    M Source/WebCore/html/shadow/MediaControlTextTrackContainerElement.cpp
    M Source/WebCore/html/track/VTTCue.cpp
    M Source/WebCore/html/track/VTTCue.h
    M Source/WebCore/html/track/VTTRegion.cpp

  Log Message:
  -----------
  WebVTT regions are not positioned according to the spec
https://bugs.webkit.org/show_bug.cgi?id=260402
rdar://23091897

Reviewed by Eric Carlson.

Updating WebVTT code to reflect changes that have been made to the W3C WebVTT spec,
specifically in section 7 (https://www.w3.org/TR/webvtt1/#processing-model).
In step 14.2 in section 7.1, there is a split in logic depending on if the cue
Is within a region or not. Currently, the code always follows the path for
Cues without regions. I updated this so that step 14.3 of the spec would be
executed for cues assigned to regions. I also updated the CSS applied to the
region and text track display divs to conform to section 7.4 "Applying CSS
Properties to WebVTT Node Objects".

* LayoutTests/media/track/captions-webvtt/regions.vtt: Added.
* LayoutTests/media/track/webvtt-region-position-expected.txt: Added.
* LayoutTests/media/track/webvtt-region-position.html: Added.
* Source/WebCore/Modules/modern-media-controls/controls/text-tracks.css:
(::-webkit-media-text-track-display):
(::-webkit-media-text-track-region):
* Source/WebCore/html/shadow/MediaControlTextTrackContainerElement.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
(WebCore::MediaControlTextTrackContainerElement::processActiveVTTCue):
* Source/WebCore/html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSPropertiesWithRegion):
(WebCore::VTTCueBox::applyCSSProperties):
(WebCore::VTTCue::calculateDisplayParametersWithRegion):
(WebCore::VTTCue::obtainCSSBoxes):
(WebCore::VTTCue::getDisplayTree):
* Source/WebCore/html/track/VTTCue.h:
* Source/WebCore/html/track/VTTRegion.cpp:
(WebCore::VTTRegion::prepareRegionDisplayTree):

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




More information about the webkit-changes mailing list