[webkit-changes] [WebKit/WebKit] 9b4ec9: Move most LazyInitialized ivars from WKWebViewConf...
Alex Christensen
noreply at github.com
Thu Mar 21 07:57:30 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9b4ec97c63d50b56e80eff37479ba48885b92965
https://github.com/WebKit/WebKit/commit/9b4ec97c63d50b56e80eff37479ba48885b92965
Author: Alex Christensen <achristensen at apple.com>
Date: 2024-03-21 (Thu, 21 Mar 2024)
Changed paths:
M Source/WebKit/SourcesCocoa.txt
M Source/WebKit/UIProcess/API/APIPageConfiguration.cpp
M Source/WebKit/UIProcess/API/APIPageConfiguration.h
M Source/WebKit/UIProcess/API/APIWebsitePolicies.cpp
M Source/WebKit/UIProcess/API/APIWebsitePolicies.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesInternal.h
M Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
M Source/WebKit/UIProcess/API/wpe/WPEWebView.cpp
M Source/WebKit/UIProcess/Cocoa/NavigationState.mm
A Source/WebKit/UIProcess/Cocoa/WebPagePreferencesLockdownModeObserver.h
A Source/WebKit/UIProcess/Cocoa/WebPagePreferencesLockdownModeObserver.mm
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebProcessPool.cpp
M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
M Source/WebKit/UIProcess/win/WebView.cpp
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/WebKit/WKPageConfiguration.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm
Log Message:
-----------
Move most LazyInitialized ivars from WKWebViewConfiguration to API::PageConfiguration
https://bugs.webkit.org/show_bug.cgi?id=271301
rdar://125067469
Reviewed by Chris Dumez.
This is a step towards the API::PageConfiguration being made in WebPageProxy::createNewPage
rather than UIClient::createNewPage.
This new way of storing these objects is more robust against invalid use of WKWebViewConfiguration
if nil is set as the value of non-nullable objects, so the validate step is no longer needed
and the InvalidConfiguration API test needed some changes, but this should have no impact on
legitimate use of the API.
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/API/APIPageConfiguration.cpp:
(API::PageConfiguration::Data::createBrowsingContextGroup):
(API::PageConfiguration::Data::createWebProcessPool):
(API::PageConfiguration::Data::createWebUserContentControllerProxy):
(API::PageConfiguration::Data::createWebPreferences):
(API::PageConfiguration::Data::createVisitedLinkStore):
(API::PageConfiguration::Data::createWebsitePolicies):
(API::PageConfiguration::create):
(API::PageConfiguration::browsingContextGroup const):
(API::PageConfiguration::processPool const):
(API::PageConfiguration::userContentController const):
(API::PageConfiguration::preferences const):
(API::PageConfiguration::pageToCloneSessionStorageFrom const):
(API::PageConfiguration::setPageToCloneSessionStorageFrom):
(API::PageConfiguration::visitedLinkStore const):
(API::PageConfiguration::websiteDataStore const):
(API::PageConfiguration::websiteDataStoreIfExists const):
(API::PageConfiguration::protectedWebsiteDataStore const):
(API::PageConfiguration::setWebsiteDataStore):
(API::PageConfiguration::defaultWebsitePolicies const):
(API::PageConfiguration::urlSchemeHandlerForURLScheme):
(API::PageConfiguration::setURLSchemeHandlerForURLScheme):
(API::PageConfiguration::lockdownModeEnabled const):
(API::PageConfiguration::delaysWebProcessLaunchUntilFirstLoad const):
(API::PageConfiguration::isLockdownModeExplicitlySet const):
(API::PageConfiguration::preferencesForGPUProcess const):
(API::PageConfiguration::preferencesForNetworkProcess const):
(API::PageConfiguration::PageConfiguration): Deleted.
(API::PageConfiguration::browsingContextGroup): Deleted.
(API::PageConfiguration::processPool): Deleted.
(API::PageConfiguration::userContentController): Deleted.
(API::PageConfiguration::visitedLinkStore): Deleted.
(API::PageConfiguration::websiteDataStore): Deleted.
(API::PageConfiguration::protectedWebsiteDataStore): Deleted.
* Source/WebKit/UIProcess/API/APIPageConfiguration.h:
(API::PageConfiguration::Data::initializer):
* Source/WebKit/UIProcess/API/APIWebsitePolicies.cpp:
(API::WebsitePolicies::WebsitePolicies):
(API::WebsitePolicies::copy const):
* Source/WebKit/UIProcess/API/APIWebsitePolicies.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _setupPageConfiguration:]):
(validate): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration processPool]):
(-[WKWebViewConfiguration setProcessPool:]):
(-[WKWebViewConfiguration preferences]):
(-[WKWebViewConfiguration setPreferences:]):
(-[WKWebViewConfiguration userContentController]):
(-[WKWebViewConfiguration setUserContentController:]):
(-[WKWebViewConfiguration websiteDataStore]):
(-[WKWebViewConfiguration setWebsiteDataStore:]):
(-[WKWebViewConfiguration defaultWebpagePreferences]):
(-[WKWebViewConfiguration setDefaultWebpagePreferences:]):
(-[WKWebViewConfiguration _visitedLinkStore]):
(-[WKWebViewConfiguration _setVisitedLinkStore:]):
(-[WKWebViewConfiguration _websiteDataStoreIfExists]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.mm:
(-[WKWebpagePreferences init]):
(): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesInternal.h:
* Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreateWebPage):
* Source/WebKit/UIProcess/API/wpe/WPEWebView.cpp:
(WKWPE::m_backend):
* Source/WebKit/UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
* Source/WebKit/UIProcess/Cocoa/WebPagePreferencesLockdownModeObserver.h: Copied from Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesInternal.h.
* Source/WebKit/UIProcess/Cocoa/WebPagePreferencesLockdownModeObserver.mm: Copied from Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesInternal.h.
(WebKit::WebPagePreferencesLockdownModeObserver::WebPagePreferencesLockdownModeObserver):
(WebKit::WebPagePreferencesLockdownModeObserver::~WebPagePreferencesLockdownModeObserver):
(WebKit::WebPagePreferencesLockdownModeObserver::willChangeLockdownMode):
(WebKit::WebPagePreferencesLockdownModeObserver::didChangeLockdownMode):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::m_browsingContextGroup):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
* Source/WebKit/UIProcess/WebPageProxy.cpp.orig: Copied from Source/WebKit/UIProcess/WebPageProxy.cpp.
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createWebPage):
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::predictedUserAgentForRequest const):
* Source/WebKit/UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKit/WKPageConfiguration.cpp:
(TestWebKitAPI::TEST):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm:
(TEST):
Canonical link: https://commits.webkit.org/276462@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