[webkit-changes] [WebKit/WebKit] 6f62e9: [Site Isolation] Owner element should be preserved...

Alex Christensen noreply at github.com
Tue May 7 12:00:11 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6f62e90b5cac93d820552a99e2241e9a90875514
      https://github.com/WebKit/WebKit/commit/6f62e90b5cac93d820552a99e2241e9a90875514
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2024-05-07 (Tue, 07 May 2024)

  Changed paths:
    A LayoutTests/http/tests/site-isolation/load-event-after-transition-expected.txt
    A LayoutTests/http/tests/site-isolation/load-event-after-transition.html
    M Source/WebCore/page/Frame.cpp
    M Source/WebCore/page/Frame.h
    M Source/WebCore/page/LocalFrame.cpp
    M Source/WebCore/page/LocalFrame.h
    M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm

  Log Message:
  -----------
  [Site Isolation] Owner element should be preserved when switching between LocalFrame and RemoteFrame
https://bugs.webkit.org/show_bug.cgi?id=273809
rdar://127638179

Reviewed by Charlie Wolfe.

Otherwise it suddenly becomes null from the point of view of the Frame and DOMWindow,
which prevents things like the load event from flowing to the event listeners.

I also rename createSubframeHostedInAnotherProcess to createProvisionalSubframe because
the contents aren't necessarily hosted in another process.

This test hit a case where sometimes a frame was created and destroyed before the frame
we transitioned from was destroyed, so I updated the assertion to not assert in that case.

* LayoutTests/http/tests/site-isolation/load-event-after-transition-expected.txt: Added.
* LayoutTests/http/tests/site-isolation/load-event-after-transition.html: Added.
* Source/WebCore/page/Frame.cpp:
(WebCore::Frame::setOwnerElement):
* Source/WebCore/page/Frame.h:
* Source/WebCore/page/LocalFrame.cpp:
(WebCore::LocalFrame::createProvisionalSubframe):
(WebCore::LocalFrame::createSubframeHostedInAnotherProcess): Deleted.
* Source/WebCore/page/LocalFrame.h:
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createProvisionalFrame):
(WebKit::WebFrame::commitProvisionalFrame):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:

Canonical link: https://commits.webkit.org/278472@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