Changeset 280648 in webkit
- Timestamp:
- Aug 4, 2021, 11:55:25 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
html/track/TextTrackCueGeneric.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r280646 r280648 1 2021-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 1 20 2021-08-04 Commit Queue <commit-queue@webkit.org> 2 21 -
trunk/Source/WebCore/html/track/TextTrackCueGeneric.cpp
r278645 r280648 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.