[webkit-changes] [WebKit/WebKit] ee22ba: add _proxyName/_isContentFromNetwork to WKWebView
nmahendru
noreply at github.com
Thu Feb 6 08:53:18 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ee22bac374c677ae4426ba1775556821eb44410a
https://github.com/WebKit/WebKit/commit/ee22bac374c677ae4426ba1775556821eb44410a
Author: Nitin Mahendru <nitinmahendru at apple.com>
Date: 2025-02-06 (Thu, 06 Feb 2025)
Changed paths:
M Source/WebCore/platform/network/ResourceResponseBase.h
M Source/WebKit/Scripts/webkit/messages.py
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
M Source/WebKit/UIProcess/PageLoadState.cpp
M Source/WebKit/UIProcess/PageLoadState.h
M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
M Source/WebKit/UIProcess/ProvisionalPageProxy.h
M Source/WebKit/UIProcess/RemotePageProxy.cpp
M Source/WebKit/UIProcess/RemotePageProxy.h
M Source/WebKit/UIProcess/WebFrameProxy.cpp
M Source/WebKit/UIProcess/WebFrameProxy.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/WebPageProxy.messages.in
M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
Log Message:
-----------
add _proxyName/_isContentFromNetwork to WKWebView
rdar://144167580
https://bugs.webkit.org/show_bug.cgi?id=287023
Reviewed by Alex Christensen.
_proxyName/_isContentFromNetwork will only have a useful value when the pageload is committed
for the main frame. In other words, only use these values when you get the callback:
(void)_webView:(WKWebView *)webView didCommitLoadWithRequest:(NSURLRequest *)request inFrame:(WKFrameInfo *)frame
_isContentFromNetwork is useful differentiate between whether the response is from a cache or network.
If it's coming from a cache, then _wasPrivateRelayed/_proxyName might not have the correct values
as it is possible the page was cached in absence of icloud+.
Also these values are only useful for mainframe navigation. So they should only be checked:
[webView _mainFrame] != nil
* Source/WebCore/platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseData::ResourceResponseData):
* Source/WebKit/Scripts/webkit/messages.py:
(headers_for_type):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _proxyName]):
(-[WKWebView _isContentFromNetwork]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::didCommitLoad):
* Source/WebKit/UIProcess/PageLoadState.h:
(WebKit::PageLoadState::proxyName):
(WebKit::PageLoadState::source):
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
* Source/WebKit/UIProcess/ProvisionalPageProxy.h:
* Source/WebKit/UIProcess/RemotePageProxy.cpp:
(WebKit::RemotePageProxy::didCommitLoadForFrame):
* Source/WebKit/UIProcess/RemotePageProxy.h:
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::commitProvisionalFrame):
* Source/WebKit/UIProcess/WebFrameProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::commitProvisionalPage):
(WebKit::WebPageProxy::didCommitLoadForFrame):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::dispatchDidCommitLoad):
Canonical link: https://commits.webkit.org/289937@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list