Skip to content

Commit

Permalink
Cherry-pick 379505f. rdar://122584350
Browse files Browse the repository at this point in the history
    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

Identifier: 272448.552@safari-7618.1.15.10-branch
  • Loading branch information
danae404 authored and Dan Robson committed Feb 13, 2024
1 parent 6166537 commit b682dde
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 @@ -257,7 +257,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 b682dde

Please sign in to comment.