Title: [280695] branches/safari-612.1.27.0-branch/Source/WebCore
Revision
280695
Author
[email protected]
Date
2021-08-05 09:26:58 -0700 (Thu, 05 Aug 2021)

Log 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

Modified Paths

Diff

Modified: branches/safari-612.1.27.0-branch/Source/WebCore/ChangeLog (280694 => 280695)


--- branches/safari-612.1.27.0-branch/Source/WebCore/ChangeLog	2021-08-05 16:26:55 UTC (rev 280694)
+++ branches/safari-612.1.27.0-branch/Source/WebCore/ChangeLog	2021-08-05 16:26:58 UTC (rev 280695)
@@ -1,5 +1,48 @@
 2021-08-05  Russell Epstein  <[email protected]>
 
+        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
+
+    2021-08-04  Devin Rousso  <[email protected]>
+
+            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.
+
+2021-08-05  Russell Epstein  <[email protected]>
+
         Cherry-pick r280623. rdar://problem/81517664
 
     Null check self.session after calling _cancel instead of before

Modified: branches/safari-612.1.27.0-branch/Source/WebCore/html/track/TextTrackCueGeneric.cpp (280694 => 280695)


--- branches/safari-612.1.27.0-branch/Source/WebCore/html/track/TextTrackCueGeneric.cpp	2021-08-05 16:26:55 UTC (rev 280694)
+++ branches/safari-612.1.27.0-branch/Source/WebCore/html/track/TextTrackCueGeneric.cpp	2021-08-05 16:26:58 UTC (rev 280695)
@@ -194,10 +194,10 @@
 
 void TextTrackCueGeneric::setFontSize(int fontSize, const IntSize& videoSize, bool important)
 {
-    if (!hasDisplayTree() || !fontSize)
+    if (!fontSize)
         return;
     
-    if (important || !baseFontSizeRelativeToVideoHeight()) {
+    if (important || !hasDisplayTree() || !baseFontSizeRelativeToVideoHeight()) {
         VTTCue::setFontSize(fontSize, videoSize, important);
         return;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to