Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a8c31653e18a1227f2140465ef04dc6d2cd1edcc
      
https://github.com/WebKit/WebKit/commit/a8c31653e18a1227f2140465ef04dc6d2cd1edcc
  Author: Ben Nham <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    A 
LayoutTests/http/tests/site-isolation/only-broadcast-frame-geometry-if-remote-frame-exists-expected.txt
    A 
LayoutTests/http/tests/site-isolation/only-broadcast-frame-geometry-if-remote-frame-exists.html
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/page/Frame.cpp
    M Source/WebCore/page/Page.cpp
    M Source/WebCore/page/Page.h
    M Source/WebCore/page/RemoteFrame.cpp

  Log Message:
  -----------
  [Site Isolation] Avoid sending per-frame layout info if there are no remote 
frame processes
https://bugs.webkit.org/show_bug.cgi?id=322535
rdar://185830113

Reviewed by Megan Gardner, Alex Christensen, and Kiet Ho.

We currently send frame layout info on each rendering update from the 
WebProcess to the UIProcess
when Site Isolation is enabled. This is unnecessary if there is only one 
process involved in
rendering the page.

To make this cheaper, we cache whether the page has a remote frame. The cache 
is invalidated on
every FrameTree mutation, which should be relatively rare.

Tests: 
http/tests/site-isolation/only-broadcast-frame-geometry-if-remote-frame-exists.html

* Source/WebCore/page/Page.cpp:
(WebCore::Page::doAfterUpdateRendering):
(WebCore::Page::setMainFrame):
(WebCore::Page::frameTreeContainsRemoteFrame const):
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::updateIntersectionObservers):
* Source/WebCore/page/FrameTree.cpp:
(WebCore::FrameTree::didMutateTree):
(WebCore::FrameTree::detachFromParent):
(WebCore::FrameTree::appendChild):
(WebCore::FrameTree::removeChild):
(WebCore::FrameTree::replaceChild):
* Source/WebCore/page/FrameTree.h:
(WebCore::FrameTree::detachFromParent): Deleted.
* Source/WebCore/page/Page.h:
(WebCore::Page::didMutateFrameTree):
* 
LayoutTests/http/tests/site-isolation/only-broadcast-frame-geometry-if-remote-frame-exists-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/only-broadcast-frame-geometry-if-remote-frame-exists.html:
 Added.

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



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

Reply via email to