Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 66904a7e842df9824bd80a3f5729b0f4cddb2c15
https://github.com/WebKit/WebKit/commit/66904a7e842df9824bd80a3f5729b0f4cddb2c15
Author: Jer Noble <[email protected]>
Date: 2026-07-02 (Thu, 02 Jul 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/webvtt/rendering/cues-with-video/processing-model/basic.html
A
LayoutTests/imported/w3c/web-platform-tests/webvtt/rendering/cues-with-video/processing-model/snap-to-line-wrap-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/webvtt/rendering/cues-with-video/processing-model/snap-to-line-wrap.html
A
LayoutTests/imported/w3c/web-platform-tests/webvtt/rendering/cues-with-video/processing-model/support/snap-to-line_long.vtt
M
LayoutTests/imported/w3c/web-platform-tests/webvtt/rendering/cues-with-video/processing-model/support/webvtt-ref.css
A
LayoutTests/imported/w3c/web-platform-tests/webvtt/rendering/cues-with-video/processing-model/support/webvtt-reset.css
M
LayoutTests/imported/w3c/web-platform-tests/webvtt/rendering/cues-with-video/processing-model/support/webvtt-test.css
M Source/WebCore/html/track/TextTrackCueGeneric.h
M Source/WebCore/html/track/VTTCue.cpp
M Source/WebCore/html/track/VTTCue.h
Log Message:
-----------
[WebVTT] Cues with snapToLines == false should wrap
rdar://178760948
https://bugs.webkit.org/show_bug.cgi?id=318446
Reviewed by Eric Carlson.
Historically, WebKit has set `white-space:pre` on cues whose `snap-to-lines`
flag is false,
in order to correctly implement CEA-608 and CTA-708 captions, which require
wrapping to be
disabled. However this affects all cues whose `snap-to-lines` flag is false,
not just in-band
closed-captions like 608/708, and this affects real sites, including Apple.com.
Narrowly scope the `white-space:pre` styles around cues who explicitly have
`preventLineWrapping()`
enabled, which will only be in-band generic cues.
For the WPT tests, split out the "reset" of styles to the standard-defined
defaults into its own
.css file, where `webvtt-test.css` just sets the styles under test; namely Ahem
at a specific size.
For the ref tests, make the fake `.video` div a container, so
container-relative size rules work.
Test:
imported/w3c/web-platform-tests/webvtt/rendering/cues-with-video/processing-model/snap-to-line-wrap.html
*
LayoutTests/imported/w3c/web-platform-tests/webvtt/rendering/cues-with-video/processing-model/basic.html:
*
LayoutTests/imported/w3c/web-platform-tests/webvtt/rendering/cues-with-video/processing-model/snap-to-line-wrap-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/webvtt/rendering/cues-with-video/processing-model/snap-to-line-wrap.html:
*
LayoutTests/imported/w3c/web-platform-tests/webvtt/rendering/cues-with-video/processing-model/support/snap-to-line_long.vtt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/webvtt/rendering/cues-with-video/processing-model/support/webvtt-ref.css:
(.video):
*
LayoutTests/imported/w3c/web-platform-tests/webvtt/rendering/cues-with-video/processing-model/support/webvtt-reset.css:
(::cue):
*
LayoutTests/imported/w3c/web-platform-tests/webvtt/rendering/cues-with-video/processing-model/support/webvtt-test.css:
(::cue):
* Source/WebCore/html/track/TextTrackCueGeneric.h:
* Source/WebCore/html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):
* Source/WebCore/html/track/VTTCue.h:
(WebCore::VTTCue::preventLineWrapping const):
(WebCore::VTTCue::wrapTextDuringPercentageBasedPositioning const): Deleted.
Canonical link: https://commits.webkit.org/316432@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications