[webkit-changes] [WebKit/WebKit] 7ff585: Apple.com/apple-events: Unable to enable subtitles...

Jer Noble noreply at github.com
Mon Nov 7 08:47:35 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7ff585820d47faa4b1845617e6328c4d3d7c41ac
      https://github.com/WebKit/WebKit/commit/7ff585820d47faa4b1845617e6328c4d3d7c41ac
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2022-11-07 (Mon, 07 Nov 2022)

  Changed paths:
    A LayoutTests/media/track/video-track-add-visible-expected.txt
    A LayoutTests/media/track/video-track-add-visible.html
    M Source/WebCore/html/HTMLMediaElement.cpp

  Log Message:
  -----------
  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




More information about the webkit-changes mailing list