[webkit-changes] [WebKit/WebKit] ac123b: Subtitles are not displayed in PIP window

Dana Estra noreply at github.com
Wed Jan 29 09:31:16 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ac123bdd1261957f0e6ca233ac8168ab0480b174
      https://github.com/WebKit/WebKit/commit/ac123bdd1261957f0e6ca233ac8168ab0480b174
  Author: Dana Estra <destra at apple.com>
  Date:   2025-01-29 (Wed, 29 Jan 2025)

  Changed paths:
    A LayoutTests/platform/visionos/interaction-region/paused-video-regions-expected.txt
    M LayoutTests/platform/visionos/transforms/separated-video-expected.txt
    M Source/WebCore/Modules/modern-media-controls/controls/media-controls.css
    M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm

  Log Message:
  -----------
  Subtitles are not displayed in PIP window
https://bugs.webkit.org/show_bug.cgi?id=286501
rdar://139626885

Reviewed by Jer Noble.

Currently on Mac after returning from pip, all subsequent times
the user enters pip the subtitles do not appear in the pip window,
but are rather outside the pip window on the page. This is caused by two
problems: the first is that we only allocate the captions layer when the
webpage is loaded. So when we destroy the captions layer after returning from
pip, it is never recreated. This patch fixes this issue by adding a call to
VideoFullscreenCaptions::setupCaptionsLayer from
VideoPresentationManagerProxy::setupFullscreenWithID.

The second problem this patch addresses is that overflow needs to hidden
on the media-controls-container div inside the shadow dom. To send the caption to
the pip window, we make an enlarged copy of it, and this needs to be hidden.

Updates baseline for two visionOS layout tests.

* Source/WebCore/Modules/modern-media-controls/controls/media-controls.css:
(.media-controls-container):
* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm:
(WebKit::VideoPresentationManagerProxy::setupFullscreenWithID):

Canonical link: https://commits.webkit.org/289503@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list