[webkit-changes] [WebKit/WebKit] 6620ec: [Site Isolation] ProvisionalPageProxy should not r...

Charlie Wolfe noreply at github.com
Tue Feb 4 13:34:24 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6620ec4e5d02829af3b21ab19705ea597bced6ab
      https://github.com/WebKit/WebKit/commit/6620ec4e5d02829af3b21ab19705ea597bced6ab
  Author: Charlie Wolfe <charliew at apple.com>
  Date:   2025-02-04 (Tue, 04 Feb 2025)

  Changed paths:
    M Source/WebKit/Shared/ProvisionalFrameCreationParameters.h
    M Source/WebKit/Shared/ProvisionalFrameCreationParameters.serialization.in
    M Source/WebKit/Shared/WebPageCreationParameters.h
    M Source/WebKit/Shared/WebPageCreationParameters.serialization.in
    M Source/WebKit/UIProcess/BrowsingContextGroup.cpp
    M Source/WebKit/UIProcess/BrowsingContextGroup.h
    M Source/WebKit/UIProcess/FrameProcess.cpp
    M Source/WebKit/UIProcess/FrameProcess.h
    M Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp
    M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/WebPage.messages.in

  Log Message:
  -----------
  [Site Isolation] ProvisionalPageProxy should not reuse the main frame when its process does not already have a RemotePageProxy
https://bugs.webkit.org/show_bug.cgi?id=287005
rdar://144148232

Reviewed by Alex Christensen.

This removes another scenario where a main frame was unnecessarily being reused after a cross-site
navigation. This is needed to enable the back/forward cache.

Now, when a ProvisionalPageProxy is created, the creation of RemotePageProxy for the new process is
delayed until we know that one does not already exist. Previously, creating a FrameProcess would always
also create a RemotePageProxy for the new process, so one was always available to take in
ProvisionalPageProxy::initializeWebPage. With this change, if no existing RemotePageProxy is found, the
main frame created by the ProvisionalPageProxy is used instead.

No change in behavior.

* Source/WebKit/Shared/ProvisionalFrameCreationParameters.h:
* Source/WebKit/Shared/ProvisionalFrameCreationParameters.serialization.in:
* Source/WebKit/Shared/WebPageCreationParameters.h:
* Source/WebKit/Shared/WebPageCreationParameters.serialization.in:
Since the provisional main frame needs to be created at the same as page creation, add a new member to
WebPageCreationParameters instead of sending two IPC messages.

* Source/WebKit/UIProcess/BrowsingContextGroup.cpp:
(WebKit::BrowsingContextGroup::addFrameProcess):
(WebKit::BrowsingContextGroup::addFrameProcessAndInjectPageContextIf):
* Source/WebKit/UIProcess/BrowsingContextGroup.h:
* Source/WebKit/UIProcess/FrameProcess.cpp:
(WebKit::FrameProcess::FrameProcess):
* Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp:
(WebKit::ProvisionalFrameProxy::ProvisionalFrameProxy):
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::initializeWebPage):
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::prepareForProvisionalLoadInProcess):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeWebPage):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::m_textAnimationController):
(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::createProvisionalFrame):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:

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



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


More information about the webkit-changes mailing list