Changeset 280695 in webkit
- Timestamp:
- Aug 5, 2021, 9:26:58 AM (5 years ago)
- Location:
- branches/safari-612.1.27.0-branch/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
html/track/TextTrackCueGeneric.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-612.1.27.0-branch/Source/WebCore/ChangeLog
r280693 r280695 1 2021-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 1 44 2021-08-05 Russell Epstein <repstein@apple.com> 2 45 -
branches/safari-612.1.27.0-branch/Source/WebCore/html/track/TextTrackCueGeneric.cpp
r278645 r280695 195 195 void TextTrackCueGeneric::setFontSize(int fontSize, const IntSize& videoSize, bool important) 196 196 { 197 if (! hasDisplayTree() || !fontSize)197 if (!fontSize) 198 198 return; 199 199 200 if (important || ! baseFontSizeRelativeToVideoHeight()) {200 if (important || !hasDisplayTree() || !baseFontSizeRelativeToVideoHeight()) { 201 201 VTTCue::setFontSize(fontSize, videoSize, important); 202 202 return;
Note:
See TracChangeset
for help on using the changeset viewer.