-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Move most LazyInitialized ivars from WKWebViewConfiguration to API::PageConfiguration #26177
Conversation
EWS run on previous version of this PR (hash d41d8ac) |
d41d8ac
to
94efcd5
Compare
EWS run on previous version of this PR (hash 94efcd5) |
94efcd5
to
80ea1d6
Compare
EWS run on previous version of this PR (hash 80ea1d6) |
80ea1d6
to
cb4cdbe
Compare
EWS run on previous version of this PR (hash cb4cdbe) |
cb4cdbe
to
94ce76b
Compare
EWS run on previous version of this PR (hash 94ce76b) |
94ce76b
to
6ac194d
Compare
EWS run on previous version of this PR (hash 6ac194d) |
6ac194d
to
039ddc8
Compare
EWS run on previous version of this PR (hash 039ddc8) |
039ddc8
to
9d12a61
Compare
EWS run on previous version of this PR (hash 9d12a61) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with changes.
static Ref<WebKit::WebPreferences> createWebPreferences(); | ||
static Ref<WebKit::VisitedLinkStore> createVisitedLinkStore(); | ||
static Ref<WebsitePolicies> createWebsitePolicies(); | ||
LazyInitializedRef<WebKit::BrowsingContextGroup, createBrowsingContextGroup> browsingContextGroup; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Please add a blank line to separate member functions from data members.
class WebPagePreferencesLockdownModeObserver final : public LockdownModeObserver { | ||
WTF_MAKE_FAST_ALLOCATED; | ||
public: | ||
WebPagePreferencesLockdownModeObserver(API::WebsitePolicies&); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explicit?
@@ -0,0 +1,13814 @@ | |||
/* | |||
* Copyright (C) 2010-2023 Apple Inc. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please drop this file from the PR before landing. .orig
9d12a61
to
46d363d
Compare
EWS run on previous version of this PR (hash 46d363d) |
EWS run on current version of this PR (hash b9bb653) |
46d363d
to
b9bb653
Compare
b9bb653
to
d2f84ed
Compare
β¦ageConfiguration 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
d2f84ed
to
9b4ec97
Compare
Committed 276462@main (9b4ec97): https://commits.webkit.org/276462@main Reviewed commits have been landed. Closing PR #26177 and removing active labels. |
PlayStationWebView was not updated; fixed in #26299. |
9b4ec97
b9bb653