Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: a17d0c381b91c4db749a290c344e5c8943fbc658 https://github.com/WebKit/WebKit/commit/a17d0c381b91c4db749a290c344e5c8943fbc658 Author: Alex Christensen <achristen...@apple.com> Date: 2025-02-21 (Fri, 21 Feb 2025)
Changed paths: M LayoutTests/http/tests/site-isolation/fullscreen-expected.txt M LayoutTests/http/tests/site-isolation/fullscreen.html M LayoutTests/imported/w3c/web-platform-tests/fullscreen/api/document-exit-fullscreen-nested-in-iframe-expected.txt M Source/WebCore/dom/FullscreenManager.cpp M Source/WebCore/dom/FullscreenManager.h Log Message: ----------- Use more site-isolation friendly frame tree traversal in FullscreenManager https://bugs.webkit.org/show_bug.cgi?id=288213 rdar://145304768 Reviewed by Ryosuke Niwa. In a few places we were making assumptions like: 1. The main frame is in the same process as the current document 2. A document's owner element is in the same process as the document 3. When we are traversing, if we find a document without an owner element in this process, we must be at the main frame. All 3 assumptions are invalid when site isolation is on. I've replaced the traversal with traversing the FrameTree including LocalFrames and RemoteFrames and only visiting the LocalFrames. Before this change, exiting a fullscreen third party iframe would not actually exit, as seen by the lack of UI process exitFullScreenForElement and beganExitFullScreen calls in the test output. That is fixed with this change. The style and size isn't yet correct, but those will be fixed in future PRs. I also replaced a few Deques with Vector+makeReversedRange to accomplish the same reverse iteration without the overhead of a Deque. FullscreenManager::exitFullscreen had an assumption that the exit mode is NoResize unless we know we are exiting fullscreen in the main frame. In order for exiting fullscreen to work in iframes with site isolation on, I needed to make the assumption that if the main frame is in another process we are exiting with ExitMode::Resize. This only applies with site isolation on. * LayoutTests/http/tests/site-isolation/fullscreen-expected.txt: * LayoutTests/http/tests/site-isolation/fullscreen.html: * Source/WebCore/dom/FullscreenManager.cpp: (WebCore::documentsToUnfullscreen): (WebCore::FullscreenManager::exitFullscreen): (WebCore::FullscreenManager::finishExitFullscreen): (WebCore::FullscreenManager::willEnterFullscreen): (WebCore::FullscreenManager::didExitFullscreen): * Source/WebCore/dom/FullscreenManager.h: Canonical link: https://commits.webkit.org/290822@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes