Set timeOrigin to align with spec, even when BCG switches take place. - #66437
Conversation
|
EWS run on previous version of this PR (hash 784fdba) Details |
784fdba to
7bc2c8c
Compare
|
EWS run on previous version of this PR (hash 7bc2c8c) Details |
7bc2c8c to
7bf8b78
Compare
|
EWS run on previous version of this PR (hash 7bf8b78) Details |
7bf8b78 to
bd52538
Compare
|
EWS run on previous version of this PR (hash bd52538) Details |
|
I think it makes sense that we report similar times with and without a BCG switch, but we should not add new tests for navigation redirects as part of this. And if they are added elsewhere, they should probably be tentative for now. |
bd52538 to
3fac22e
Compare
Tests added to WPT separately. Now this PR only changes their expectations |
|
EWS run on previous version of this PR (hash 3fac22e) Details |
achristensen07
left a comment
There was a problem hiding this comment.
I don't think we want to do this quite like this. I think our process swapping is the reason our navigation start time isn't leaked across origins when we swap processes for cross-origin navigations, and I think this would introduce that leak without a TAO check. I think we would need to fix #66762 first to know if a navigation passes a TAO check.
3fac22e to
7c1d30f
Compare
|
EWS run on previous version of this PR (hash 7c1d30f) Details |
Revamped to pipe in the original navigation timing only when the TAO check passes. |
7c1d30f to
0a490d6
Compare
|
EWS run on previous version of this PR (hash 0a490d6) Details |
macOS Safer C++ Build #121504 (0a490d6)
|
|
The win-tests failures seem completely unrelated. Merging. |
|
EWS run on previous version of this PR (hash 4c3de2b) Details |
4c3de2b to
14f69bd
Compare
|
EWS run on current version of this PR (hash 14f69bd) Details |
https://bugs.webkit.org/show_bug.cgi?id=316291 Reviewed by Alex Christensen. Currently the timeOrigin is set when the final process starts the navigation request load. But in the case of a BCG switch, that load ends up resuming/reusing a load that was already started in the previous process. This PR pipes the relevant information over, so that the `timeOrigin` will be properly set in these cases. This is fine from a w3c/navigation-timing#160 perspective, because as against this by obfuscating more than just the redirect data for cross-origin redirects. Test progression. * Source/WebCore/loader/DocumentLoader.cpp: (WebCore::DocumentLoader::startLoadingMainResource): Set the original navigation time if provided. * Source/WebCore/loader/DocumentLoader.h: (WebCore::DocumentLoader::setOriginalNavigationStartTime): Setter. * Source/WebCore/loader/FrameLoadRequest.h: (WebCore::FrameLoadRequest::originalNavigationStartTime const): Getter. (WebCore::FrameLoadRequest::setOriginalNavigationStartTime): Setter. * Source/WebCore/loader/FrameLoader.cpp: (WebCore::FrameLoader::load): Set the originalNavigationStartTime from the request. * Source/WebCore/loader/ResourceLoadTiming.h: (WebCore::ResourceLoadTiming::setStartTime): Setter. * Source/WebKit/NetworkProcess/NetworkResourceLoadParameters.h: * Source/WebKit/NetworkProcess/NetworkResourceLoadParameters.serialization.in: * Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::sendDidReceiveResponsePotentiallyInNewBrowsingContextGroup): Add originalNavigationStartTime as parameter to the BCG switch. (WebKit::NetworkResourceLoader::sendDidReceiveResponseWithPotentialProcessSwap): * Source/WebKit/Shared/LoadParameters.h: * Source/WebKit/Shared/LoadParameters.serialization.in: * Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::triggerBrowsingContextGroupSwitchForNavigation): Add originalNavigationStartTime as parameter to the BCG switch. (WebKit::NetworkProcessProxy::considerProcessSwapForNavigationResponse): * Source/WebKit/UIProcess/Network/NetworkProcessProxy.h: * Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in: * Source/WebKit/UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::loadRequest): Add originalNavigationStartTime as parameter to the BCG switch. * Source/WebKit/UIProcess/ProvisionalPageProxy.h: * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadRequestWithNavigationShared): Set the originalNavigationStartTime in parameters. (WebKit::WebPageProxy::continueNavigationInNewProcess): Pass originalNavigationStartTime. (WebKit::WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation): Pass originalNavigationStartTime. (WebKit::WebPageProxy::loadRequest): (WebKit::WebPageProxy::receivedNavigationActionPolicyDecision): (WebKit::WebPageProxy::performProcessSwapForNavigationResponse): (WebKit::WebPageProxy::triggerProcessSwapForEnhancedSecurity): * Source/WebKit/UIProcess/WebPageProxy.h: * Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess): Set the originalNavigationStartTime from the documentLoader's startTime. * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::loadRequest): Set the originalNavigationStartTime from the load parameters. * LayoutTests/imported/w3c/web-platform-tests/navigation-timing/response-start-after-coop-bcg-switch-no-tao.tentative.https-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/navigation-timing/response-start-after-coop-bcg-switch-no-tao.tentative.https.html: Added. Canonical link: https://commits.webkit.org/318057@main
14f69bd to
f8352ee
Compare
|
Committed 318057@main (f8352ee): https://commits.webkit.org/318057@main Reviewed commits have been landed. Closing PR #66437 and removing active labels. |
🧪 api-mac
f8352ee
14f69bd
🛠 win🧪 win-tests🧪 api-mac-debug🧪 mac-AS-debug-wk2🧪 mac-intel-wk2