⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 280648 in webkit


Ignore:
Timestamp:
Aug 4, 2021, 11:55:25 AM (5 years ago)
Author:
Devin Rousso
Message:

REGRESSION(?): subtitle text sizing is sometimes inconsistent
https://bugs.webkit.org/show_bug.cgi?id=228786
<rdar://problem/80525509>

Reviewed by Eric Carlson.

Tested manually. I'm still not 100% sure of the root cause of this, but after talking with
some folks more familiar with WebKit's media "stack" it seems like this only happens with
in-band non-VTT subtitle tracks that have their own styling. The fix is also pretty obvious.

  • html/track/TextTrackCueGeneric.cpp:

(WebCore::TextTrackCueGeneric::setFontSize):
We should still pass along the new font size (and bool important) even if we don't have a
display tree yet, as the font size (and bool important) are used when the display tree is
created, meaning that we shouldn't have to wait for another setFontSize call after the
display tree is created in order to update the font size.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r280646 r280648  
     12021-08-04  Devin Rousso  <drousso@apple.com>
     2
     3        REGRESSION(?): subtitle text sizing is sometimes inconsistent
     4        https://bugs.webkit.org/show_bug.cgi?id=228786
     5        <rdar://problem/80525509>
     6
     7        Reviewed by Eric Carlson.
     8
     9        Tested manually. I'm still not 100% sure of the root cause of this, but after talking with
     10        some folks more familiar with WebKit's media "stack" it seems like this only happens with
     11        in-band non-VTT subtitle tracks that have their own styling. The fix is also pretty obvious.
     12
     13        * html/track/TextTrackCueGeneric.cpp:
     14        (WebCore::TextTrackCueGeneric::setFontSize):
     15        We should still pass along the new font size (and `bool important`) even if we don't have a
     16        display tree yet, as the font size (and `bool important`) are used when the display tree is
     17        created, meaning that we shouldn't have to wait for another `setFontSize` call after the
     18        display tree is created in order to update the font size.
     19
    1202021-08-04  Commit Queue  <commit-queue@webkit.org>
    221
  • trunk/Source/WebCore/html/track/TextTrackCueGeneric.cpp

    r278645 r280648  
    195195void TextTrackCueGeneric::setFontSize(int fontSize, const IntSize& videoSize, bool important)
    196196{
    197     if (!hasDisplayTree() || !fontSize)
     197    if (!fontSize)
    198198        return;
    199199   
    200     if (important || !baseFontSizeRelativeToVideoHeight()) {
     200    if (important || !hasDisplayTree() || !baseFontSizeRelativeToVideoHeight()) {
    201201        VTTCue::setFontSize(fontSize, videoSize, important);
    202202        return;
Note: See TracChangeset for help on using the changeset viewer.