Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 99127ce297d9945557256245abee97d0d42d4ce8
      
https://github.com/WebKit/WebKit/commit/99127ce297d9945557256245abee97d0d42d4ce8
  Author: Andy Estes <[email protected]>
  Date:   2026-09-01 (Tue, 01 Sep 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    A 
LayoutTests/http/tests/media/media-controls-context-menu-anchor-in-iframe-expected.txt
    A 
LayoutTests/http/tests/media/media-controls-context-menu-anchor-in-iframe.html
    A 
LayoutTests/http/tests/media/resources/media-controls-context-menu-anchor-in-iframe-frame.html
    A LayoutTests/platform/ios-wk2/TestExpectations
    M LayoutTests/platform/mac-wk2/TestExpectations
    M Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
    M Source/WebCore/Modules/mediacontrols/MediaControlsHost.h
    M Source/WebCore/Modules/mediacontrols/MediaControlsHost.idl

  Log Message:
  -----------
  [iOS] Media controls context menus can appear at the wrong position with Site 
Isolation enabled
https://bugs.webkit.org/show_bug.cgi?id=323045
rdar://179129739

Reviewed by Jer Noble.

Context menus are anchored in top-level page coordinates, but
MediaControlsHost::showMediaControlsContextMenu() got the rect from
Element::boundsInRootViewSpace(), whose walk up the frame tree uses 
Widget::parent(). That is null
for a RemoteFrameView under Site Isolation, so in the iframe's process the rect 
stopped at the
iframe's own local root and never picked up the iframe's position in the page.

Fixed by using FrameView::convertToRootViewAcrossIsolatedFrames(), which 
follows the frame tree
across process boundaries.

Test: http/tests/media/media-controls-context-menu-anchor-in-iframe.html

* LayoutTests/TestExpectations:
* 
LayoutTests/http/tests/media/media-controls-context-menu-anchor-in-iframe-expected.txt:
 Added.
* 
LayoutTests/http/tests/media/media-controls-context-menu-anchor-in-iframe.html: 
Added.
* 
LayoutTests/http/tests/media/resources/media-controls-context-menu-anchor-in-iframe-frame.html:
 Added.
* LayoutTests/platform/ios-wk2/TestExpectations: Added.
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::contextMenuAnchorRect):
(WebCore::MediaControlsHost::mediaControlsContextMenuAnchorRectForBindings):
(WebCore::MediaControlsHost::showMediaControlsContextMenu):
* Source/WebCore/Modules/mediacontrols/MediaControlsHost.h:
* Source/WebCore/Modules/mediacontrols/MediaControlsHost.idl:

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



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

Reply via email to