Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bb389b9c4ae0d39f673961754ad40e32bd911505
      
https://github.com/WebKit/WebKit/commit/bb389b9c4ae0d39f673961754ad40e32bd911505
  Author: Dana Estra <[email protected]>
  Date:   2026-02-09 (Mon, 09 Feb 2026)

  Changed paths:
    M Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
    M Source/WebCore/Modules/mediacontrols/MediaControlsHost.h
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h
    M Source/WebCore/page/QuirksData.h

  Log Message:
  -----------
  Subtitles stop rendering after entering/exiting PIP on apple.com
https://bugs.webkit.org/show_bug.cgi?id=307099
rdar://154434137

Reviewed by Eric Carlson.

Apple.com/apple-events, which uses natively rendered WebVTT, sets visibility: 
hidden
on their video. Our caption container inherits visibility from the video. 
Because the
captions are hidden, our rendering optimizations skip drawing them, and they do 
not make
it into the image that we send to PIP. The captions also do not appear when 
after returning
to fullscreen from PIP. To fix this, we should set visibility: visible on the 
captions
container in fullscreen and PIP.

This change should be restricted to an apple.com quirk because of the side 
effect we expect
on other websites that hide their video with visibility: hidden. If a video 
were hidden,
and we un-hid the captions in PIP, the captions would appear both on the page 
and in PIP,
because the placard (which hides the captions on the page while in PIP) would 
also be
invisible.

This side effect does not occur on apple.com/apple-events because they place 
the video
behind other elements via z-index, so the captions are hidden regardless.

No new tests.

* Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::needsCaptionVisibilityInFullscreenAndPictureInPictureQuirk
 const):
(WebCore::MediaControlsHost::handleCaptionVisibilityInFullscreenAndPictureInPictureQuirk):
(WebCore::MediaControlsHost::presentationModeChanged):
* Source/WebCore/Modules/mediacontrols/MediaControlsHost.h:
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::ensureCaptionVisibilityInFullscreenAndPictureInPicture const):
(WebCore::handleAppleQuirks):
(WebCore::Quirks::determineRelevantQuirks):
* Source/WebCore/page/Quirks.h:
* Source/WebCore/page/QuirksData.h:

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



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

Reply via email to