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

Changeset 280695 in webkit


Ignore:
Timestamp:
Aug 5, 2021, 9:26:58 AM (5 years ago)
Author:
Russell Epstein
Message:

Cherry-pick r280648. rdar://problem/81568979

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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280648 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-612.1.27.0-branch/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-612.1.27.0-branch/Source/WebCore/ChangeLog

    r280693 r280695  
     12021-08-05  Russell Epstein  <repstein@apple.com>
     2
     3        Cherry-pick r280648. rdar://problem/81568979
     4
     5    REGRESSION(?): subtitle text sizing is sometimes inconsistent
     6    https://bugs.webkit.org/show_bug.cgi?id=228786
     7    <rdar://problem/80525509>
     8   
     9    Reviewed by Eric Carlson.
     10   
     11    Tested manually. I'm still not 100% sure of the root cause of this, but after talking with
     12    some folks more familiar with WebKit's media "stack" it seems like this only happens with
     13    in-band non-VTT subtitle tracks that have their own styling. The fix is also pretty obvious.
     14   
     15    * html/track/TextTrackCueGeneric.cpp:
     16    (WebCore::TextTrackCueGeneric::setFontSize):
     17    We should still pass along the new font size (and `bool important`) even if we don't have a
     18    display tree yet, as the font size (and `bool important`) are used when the display tree is
     19    created, meaning that we shouldn't have to wait for another `setFontSize` call after the
     20    display tree is created in order to update the font size.
     21   
     22   
     23    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     24
     25    2021-08-04  Devin Rousso  <drousso@apple.com>
     26
     27            REGRESSION(?): subtitle text sizing is sometimes inconsistent
     28            https://bugs.webkit.org/show_bug.cgi?id=228786
     29            <rdar://problem/80525509>
     30
     31            Reviewed by Eric Carlson.
     32
     33            Tested manually. I'm still not 100% sure of the root cause of this, but after talking with
     34            some folks more familiar with WebKit's media "stack" it seems like this only happens with
     35            in-band non-VTT subtitle tracks that have their own styling. The fix is also pretty obvious.
     36
     37            * html/track/TextTrackCueGeneric.cpp:
     38            (WebCore::TextTrackCueGeneric::setFontSize):
     39            We should still pass along the new font size (and `bool important`) even if we don't have a
     40            display tree yet, as the font size (and `bool important`) are used when the display tree is
     41            created, meaning that we shouldn't have to wait for another `setFontSize` call after the
     42            display tree is created in order to update the font size.
     43
    1442021-08-05  Russell Epstein  <repstein@apple.com>
    245
  • branches/safari-612.1.27.0-branch/Source/WebCore/html/track/TextTrackCueGeneric.cpp

    r278645 r280695  
    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.