Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: efa502bff3558cd957669a197a17072bc5b383b4
https://github.com/WebKit/WebKit/commit/efa502bff3558cd957669a197a17072bc5b383b4
Author: Matthew Finkel <[email protected]>
Date: 2024-07-31 (Wed, 31 Jul 2024)
Changed paths:
M Source/WebCore/loader/FrameLoader.cpp
M Source/WebCore/loader/FrameLoader.h
M Source/WebCore/loader/cache/CachedResourceLoader.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm
Log Message:
-----------
Add internal state for tracking HTTP fallback and same-site navigations
https://bugs.webkit.org/show_bug.cgi?id=277368
rdar://132836296
Reviewed by Alex Christensen.
Currently, we have a flag that indicates whether https-by-default should be
skipped for same-site navigations. This patch tracks the fallback state and
uses that to decide if we should upgrade the current navigation. If the
navigation is for the same registrable domain and the page we're navigation
away from, and we had to perform a HTTP fallback, then upgrading this
navigation is unlikely to be successful.
Adds a new API test for this behavior.
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::dispatchDidFailProvisionalLoad):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
We don't always call FrameLoader::checkLoadCompleteForThisFrame after
transitioning to the the Complete state. This patch now resets the HTTP
fallback state and same-site navigation state when we reach the CommmittedPage
state.
* Source/WebCore/loader/FrameLoader.h:
* Source/WebCore/loader/cache/CachedResourceLoader.cpp:
(WebCore::shouldPerformHTTPSUpgrade):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
(TEST(WKNavigation, HTTPSFirstHTTPDowngradeAndSameSiteNavigation)):
Canonical link: https://commits.webkit.org/281676@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes