-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare to allow parent frames to navigate site isolated iframes #13785
Merged
webkit-commit-queue
merged 1 commit into
WebKit:main
from
achristensen07:eng/Prepare-to-allow-parent-frames-to-navigate-site-isolated-iframes
May 12, 2023
Merged
Prepare to allow parent frames to navigate site isolated iframes #13785
webkit-commit-queue
merged 1 commit into
WebKit:main
from
achristensen07:eng/Prepare-to-allow-parent-frames-to-navigate-site-isolated-iframes
May 12, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
achristensen07
added
the
WebKit Process Model
Bugs related to WebKit's multi-process architecture
label
May 12, 2023
EWS run on previous version of this PR (hash 46c5890) |
achristensen07
force-pushed
the
eng/Prepare-to-allow-parent-frames-to-navigate-site-isolated-iframes
branch
from
May 12, 2023 00:20
46c5890
to
bb4960f
Compare
EWS run on previous version of this PR (hash bb4960f) |
achristensen07
force-pushed
the
eng/Prepare-to-allow-parent-frames-to-navigate-site-isolated-iframes
branch
from
May 12, 2023 00:30
bb4960f
to
6d6b61e
Compare
EWS run on current version of this PR (hash 6d6b61e) |
beidson
approved these changes
May 12, 2023
achristensen07
added
the
unsafe-merge-queue
Applied to send a pull request to merge-queue, but skip building and testing
label
May 12, 2023
https://bugs.webkit.org/show_bug.cgi?id=256678 rdar://109235337 Reviewed by Brady Eidson. This PR does a few things, all of which will not change behavior with site isolation off. First, it moves NavigationScheduler from LocalFrame to Frame. This is needed because if a parent frame sets iframe.src=newURL then the parent's process needs to schedule the navigation of the iframe. This is the first of several large steps to get the navigation to happen. The next steps are to make a FrameLoader able to be owned by either a LocalFrame or a RemoteFrame and able to be moved between the two as the navigation causes processes to change. I got the NavigationScheduler to the point where it doesn't assert in the API test ParentNavigatingCrossOriginIframeToSameOrigin when site isolation is enabled, though the navigation doesn't proceed yet because there is no FrameLoader on the RemoteFrame. In order to make that compile, I needed to make some InspectorInstrumentation parameters be Frame instead of LocalFrame. I also made the source process in WebPageProxy::decidePolicyForNavigationAction be the WebFrameProxy's current process instead of the process from which the decidePolicyForNavigationAction message came. In all tests that are running for site isolation so far, they are the same. I add some assertions in the WebFrame constructor and invalidator that helped me figure out what was going wrong when debugging this. We had some code that was making 2 WebFrames with the same FrameIdentifier. This will help future developers catch problems earlier. I also change the alert in the API test ParentNavigatingCrossOriginIframeToSameOrigin to be called in the onload handler. This will allow my frame tree validation code to have deterministic state once I implement the frame teardown in the previoiusly-used process. If it weren't in the onload handler, then there was a race condition in the test because the alert could come before the didCommitLoadForFrame was processed. I also move the boolean values initialized in the FrameLoader constructor to use initializers in the header. * Source/WebCore/inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::frameScheduledNavigationImpl): (WebCore::InspectorInstrumentation::frameClearedScheduledNavigationImpl): * Source/WebCore/inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::frameScheduledNavigation): (WebCore::InspectorInstrumentation::frameClearedScheduledNavigation): (WebCore::InspectorInstrumentation::instrumentingAgents): * Source/WebCore/inspector/agents/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::frameDetached): (WebCore::InspectorPageAgent::frameForId): (WebCore::InspectorPageAgent::frameId): (WebCore::InspectorPageAgent::assertFrame): (WebCore::InspectorPageAgent::frameScheduledNavigation): (WebCore::InspectorPageAgent::frameClearedScheduledNavigation): * Source/WebCore/inspector/agents/InspectorPageAgent.h: * Source/WebCore/loader/NavigationDisabler.h: (WebCore::NavigationDisabler::isNavigationAllowed): * Source/WebCore/loader/NavigationScheduler.cpp: (WebCore::NavigationScheduler::NavigationScheduler): (WebCore::NavigationScheduler::scheduleRedirect): (WebCore::NavigationScheduler::mustLockBackForwardList): (WebCore::NavigationScheduler::scheduleLocationChange): (WebCore::NavigationScheduler::scheduleFormSubmission): (WebCore::NavigationScheduler::scheduleRefresh): (WebCore::NavigationScheduler::timerFired): (WebCore::NavigationScheduler::schedule): (WebCore::NavigationScheduler::startTimer): (WebCore::NavigationScheduler::cancel): * Source/WebCore/loader/NavigationScheduler.h: * Source/WebCore/loader/SubframeLoader.cpp: (WebCore::FrameLoader::SubframeLoader::loadOrRedirectSubframe): * Source/WebCore/page/Frame.cpp: (WebCore::Frame::Frame): (WebCore::Frame::~Frame): * Source/WebCore/page/Frame.h: (WebCore::Frame::navigationScheduler const): * Source/WebCore/page/LocalFrame.cpp: (WebCore::LocalFrame::LocalFrame): (WebCore::LocalFrame::~LocalFrame): * Source/WebCore/page/LocalFrame.h: (WebCore::LocalFrame::navigationScheduler const): Deleted. * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::decidePolicyForNavigationAction): * Source/WebKit/WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::WebFrame): (WebKit::WebFrame::invalidate): * Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/263999@main
webkit-commit-queue
force-pushed
the
eng/Prepare-to-allow-parent-frames-to-navigate-site-isolated-iframes
branch
from
May 12, 2023 03:22
6d6b61e
to
65e5a93
Compare
Committed 263999@main (65e5a93): https://commits.webkit.org/263999@main Reviewed commits have been landed. Closing PR #13785 and removing active labels. |
webkit-commit-queue
removed
the
unsafe-merge-queue
Applied to send a pull request to merge-queue, but skip building and testing
label
May 12, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
65e5a93
6d6b61e
π§ͺ gtk-wk2