Skip to content

Commit

Permalink
Cherry-pick 274480@main (379505f). https://bugs.webkit.org/show_bug.c…
Browse files Browse the repository at this point in the history
…gi?id=269085

    Subtitle size is enlarged in Full screen
    https://bugs.webkit.org/show_bug.cgi?id=269085
    rdar://122584350

    Reviewed by Jer Noble.

    Webkit-media-text-track-display pseudo-elements should have a font size unit of CQMIN instead of CQH. CQMIN will be calculated to be CQW if the width of the video element is shorter than the height, or CQH vice versa. This creates a more appropriate font size.

    * Source/WebCore/html/track/VTTCue.cpp:
    (WebCore::VTTCueBox::applyCSSProperties):

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

Canonical link: https://commits.webkit.org/266719.371@webkitglib/2.42
  • Loading branch information
danae404 authored and aperezdc committed Mar 14, 2024
1 parent 3314d2d commit e620daf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebCore/html/track/VTTCue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ void VTTCueBox::applyCSSProperties()
// The font shorthand property on the (root) list of WebVTT Node Objects
// must be set to 5vh sans-serif. [CSS-VALUES]
// NOTE: We use 'cqh' rather than 'vh' as the video element is not a proper viewport.
setInlineStyleProperty(CSSPropertyFontSize, cue->fontSize(), CSSUnitType::CSS_CQH, cue->fontSizeIsImportant());
setInlineStyleProperty(CSSPropertyFontSize, cue->fontSize(), CSSUnitType::CSS_CQMIN, cue->fontSizeIsImportant());

if (!cue->snapToLines()) {
setInlineStyleProperty(CSSPropertyWhiteSpaceCollapse, CSSValuePreserve);
Expand Down

0 comments on commit e620daf

Please sign in to comment.