Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d80918ca87e7253afebb18ca7b044fd0c3de9c0e
      
https://github.com/WebKit/WebKit/commit/d80918ca87e7253afebb18ca7b044fd0c3de9c0e
  Author: Phinehas Fuachie <[email protected]>
  Date:   2026-08-17 (Mon, 17 Aug 2026)

  Changed paths:
    A 
LayoutTests/http/tests/site-isolation/controls-manager-in-cross-origin-iframe-expected.txt
    A 
LayoutTests/http/tests/site-isolation/controls-manager-in-cross-origin-iframe.html
    A 
LayoutTests/http/tests/site-isolation/controls-manager-in-grandchild-frame-expected.txt
    A 
LayoutTests/http/tests/site-isolation/controls-manager-in-grandchild-frame.html
    A 
LayoutTests/http/tests/site-isolation/resources/controls-manager-in-cross-origin-iframe.html
    A 
LayoutTests/http/tests/site-isolation/resources/controls-manager-in-grandchild-frame-inner.html
    A 
LayoutTests/http/tests/site-isolation/resources/controls-manager-in-grandchild-frame-middle.html
    M Source/WebCore/html/MediaElementSession.cpp
    M Source/WebCore/page/FrameTreeSyncData.in
    M Source/WebCore/page/LocalFrameView.cpp
    M Source/WebCore/page/LocalFrameView.h
    M Source/WebCore/page/Page.cpp
    M Source/WebCore/page/RemoteFrameView.cpp
    M Source/WebCore/page/RemoteFrameView.h
    M Source/WebCore/platform/ScrollView.h
    M Source/WebKit/UIProcess/WebFrameProxy.cpp

  Log Message:
  -----------
  [iOS][Site Isolation] No Picture-in-Picture button in fullscreen for video in 
a cross-origin iframe
https://bugs.webkit.org/show_bug.cgi?id=321573
rdar://164525056

Reviewed by Alex Christensen.

The fullscreen PiP button is hidden without a playback controls manager, and
canShowControlsManager() refuses one unless isElementRectMostlyInMainFrame() 
passes. Under Site
Isolation both operands of that check were wrong in a subframe's process:
boundingBoxInRootViewCoordinates() walks parent() pointers and stops at a 
RemoteFrame, so the
element rect was subframe-local; and contentsSize() on a remote main frame's 
view is always empty,
since nothing calls setContentsSize() on one.

Use convertToRootViewAcrossIsolatedFrames() for the element rect, which crosses 
any number of
RemoteFrames in the ancestry, and add a FrameContentsSize field to 
FrameTreeSyncData so a remote
main frame has a real size to compare against. Both branches now compute the 
same rect instead of
Site Isolation taking a different path.

* 
LayoutTests/http/tests/site-isolation/controls-manager-in-cross-origin-iframe-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/controls-manager-in-cross-origin-iframe.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/controls-manager-in-grandchild-frame-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/controls-manager-in-grandchild-frame.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/resources/controls-manager-in-cross-origin-iframe.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/resources/controls-manager-in-grandchild-frame-inner.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/resources/controls-manager-in-grandchild-frame-middle.html:
 Added.
* Source/WebCore/html/MediaElementSession.cpp:
(WebCore::isElementRectMostlyInMainFrame):
* Source/WebCore/page/FrameTreeSyncData.in:
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::updateContentsSizeForRemoteFrames):
* Source/WebCore/page/LocalFrameView.h:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::syncLocalFrameInfoToRemote):
* Source/WebCore/page/RemoteFrameView.cpp:
(WebCore::RemoteFrameView::frameContentsSize const):
* Source/WebCore/page/RemoteFrameView.h:
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::calculateFrameTreeSyncData const):

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



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

Reply via email to