Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: c44dcfa19a644523ebdc60d75d94dbdcf8a71e4b https://github.com/WebKit/WebKit/commit/c44dcfa19a644523ebdc60d75d94dbdcf8a71e4b Author: Alex Christensen <achristen...@apple.com> Date: 2023-09-29 (Fri, 29 Sep 2023)
Changed paths: A LayoutTests/http/tests/site-isolation/resources/window-properties-child.html A LayoutTests/http/tests/site-isolation/resources/window-properties-grandchild.html A LayoutTests/http/tests/site-isolation/window-properties-expected.txt A LayoutTests/http/tests/site-isolation/window-properties.html M Source/WebCore/page/FrameTree.cpp M Source/WebCore/page/RemoteDOMWindow.cpp M Source/WebKit/UIProcess/WebPageProxy.cpp Log Message: ----------- Begin implementing RemoteDOMWindow properties https://bugs.webkit.org/show_bug.cgi?id=262327 rdar://116199379 Reviewed by Pascoe. A cross-origin iframe has some properties that can be queried without site isolation, and these properties need to continue to work with site isolation enabled. length is the number of subframes, which we can get from the frame tree. parent goes up in the frame tree by one frame top goes up in the frame tree all the way to ... the top Scoped children checks work a little differently with RemoteFrames and RemoteDOMWindows because we don't have a Document or a TreeScope from that Frame. For now, consider these in scope until removed by an incoming IPC message. This definition may need some refining later, but this makes these cases work as they used to without site isolation enabled. In order to get the test to finish successfully, I had to correct the conditions under which WebPage::DidFinishLoadInAnotherProcess would be sent. Instead of checking if the parent frame has a RemotePageProxy, we need to check if the frame is in a different process than its parent. This makes the test finish successfully when the grandchild is in the same process as the main frame (so it has no RemotePageProxy) but its parent is not. They are in different processes, so IPC is required to inform of the frame load completion. * LayoutTests/http/tests/site-isolation/resources/window-properties-child.html: Added. * LayoutTests/http/tests/site-isolation/resources/window-properties-grandchild.html: Added. * LayoutTests/http/tests/site-isolation/window-properties-expected.txt: Added. * LayoutTests/http/tests/site-isolation/window-properties.html: Added. * Source/WebCore/page/FrameTree.cpp: (WebCore::inScope): * Source/WebCore/page/RemoteDOMWindow.cpp: (WebCore::RemoteDOMWindow::focus): (WebCore::RemoteDOMWindow::length const): (WebCore::RemoteDOMWindow::top const): (WebCore::RemoteDOMWindow::parent const): Canonical link: https://commits.webkit.org/268688@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes