Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Apple.com/apple-events: Unable to enable subtitles on first watch of …
…the keynote https://bugs.webkit.org/show_bug.cgi?id=247549 rdar://101785175 Reviewed by Eric Carlson. Two interlocking bugs prevent captions from being visible if tracks are added after the video is loaded: 1) `m_processingPreferenceChange` is set to `true` in `markCaptionAndSubtitleTracksAsUnconfigured()` and is only set to `false` if at least one text track is present and therefore `configureTextTrackGroup()` is called. 2) the MediaControlsHost is not notified that the video element's videoBox has changed, as it's only notified during style updates, and will not necessarily have a RenderVideo attached at that point. Clear `m_processingPreferenceChange` unconditionally at the end of `configureTextTracks()`. And call the MediaControlsHost's `updateCaptionDisplaySizes()` when the media element is resized. * LayoutTests/media/track/video-track-add-visible-expected.txt: Added. * LayoutTests/media/track/video-track-add-visible.html: Added. * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::configureTextTrackGroup): (WebCore::HTMLMediaElement::layoutSizeChanged): (WebCore::HTMLMediaElement::configureTextTracks): Canonical link: https://commits.webkit.org/256408@main
- Loading branch information