Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3baee90ae42e16d461acb3bd2163ae328236c04f
      
https://github.com/WebKit/WebKit/commit/3baee90ae42e16d461acb3bd2163ae328236c04f
  Author: Phinehas Fuachie <[email protected]>
  Date:   2026-03-14 (Sat, 14 Mar 2026)

  Changed paths:
    M Source/WebCore/html/HTMLMediaElement.cpp
    M Source/WebCore/html/HTMLMediaElement.h
    M Source/WebCore/platform/cocoa/VideoPresentationModelVideoElement.mm
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/testing/Internals.h
    M Source/WebCore/testing/Internals.idl
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A 
Tools/TestWebKitAPI/Tests/WebKitCocoa/UI/VideoInShadowDOMElementFullscreen.mm

  Log Message:
  -----------
  Videos inside shadow DOM not detected as children of element fullscreen, 
preventing docking on visionOS
https://bugs.webkit.org/show_bug.cgi?id=309602
rdar://168093378

Reviewed by Ryosuke Niwa.

The ancestor walk in documentFullscreenChanged() used parentNode(), which 
returns nullptr at shadow
root boundaries. Videos inside web components (e.g. Reddit's <shreddit-player>) 
were never marked
as isChildOfElementFullscreen, so bestVideoForElementFullscreen() returned 
nullptr and the dock
button was not shown.

Replace the manual parentNode() walk with isShadowIncludingDescendantOf(), 
which crosses shadow
root boundaries by walking up through shadow hosts.

* Source/WebCore/platform/cocoa/VideoPresentationModelVideoElement.mm:
(WebCore::VideoPresentationModelVideoElement::documentFullscreenChanged):

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



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

Reply via email to