[webkit-changes] [WebKit/WebKit] ab7842: Transfer remote page map to SuspendedPageProxy whe...

Alex Christensen noreply at github.com
Wed Jul 12 17:35:29 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ab78423b7dc297485a9d68436726c53ef201d166
      https://github.com/WebKit/WebKit/commit/ab78423b7dc297485a9d68436726c53ef201d166
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2023-07-12 (Wed, 12 Jul 2023)

  Changed paths:
    M Source/WebCore/history/CachedFrame.cpp
    M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
    M Source/WebKit/UIProcess/ProvisionalPageProxy.h
    M Source/WebKit/UIProcess/RemotePageDrawingAreaProxy.cpp
    M Source/WebKit/UIProcess/SuspendedPageProxy.cpp
    M Source/WebKit/UIProcess/SuspendedPageProxy.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm

  Log Message:
  -----------
  Transfer remote page map to SuspendedPageProxy when suspending
https://bugs.webkit.org/show_bug.cgi?id=259148
rdar://112143525

Reviewed by J Pascoe.

When navigating from one page that has iframes to another, we use the remote page map
to broadcast frame tree updates.  We shouldn't broadcast to remote pages associated
with the suspended page.  The main frame is transferred, and now the remote page map
is transferred along with it.

The RemotePageDrawingAreaProxy needs to ignore a few drawing messages after it suspends.
These should be ignored because it is not longer drawing after it suspends, and the
drawing area has been destroyed.  SuspendedPageProxy also ignores messages it doesn't
recognize with no assertion.

When navigating to a SuspendedPageProxy, we need to restore the remote page map.
The remote page map follows the path of the main frame through the ProvisionalPageProxy
back to the WebPageProxy.

We were hitting assertions because the CachedFrame constructor would only remove LocalFrames.
To make it not assert, remove all Frames.  We still need to implement CachedFrame for
RemoteFrames, but this makes the test cover much of the navigation back to a SuspendedPageProxy
without assertion, with future work still to be done.

This change enables opening several popular news websites with site isolation on without asserting.

* Source/WebKit/UIProcess/RemotePageDrawingAreaProxy.cpp:
(WebKit::RemotePageDrawingAreaProxy::didReceiveMessage):
* Source/WebKit/UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::SuspendedPageProxy):
* Source/WebKit/UIProcess/SuspendedPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::takeRemotePageMap):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::TEST):

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




More information about the webkit-changes mailing list