- Revision
- 274192
- Author
- wei...@apple.com
- Date
- 2021-03-09 19:12:54 -0800 (Tue, 09 Mar 2021)
Log Message
Preferences do not need to be passed to the WebProcess via WebPageCreationParameters since the store already is
https://bugs.webkit.org/show_bug.cgi?id=222945
Reviewed by Simon Fraser.
Source/WebCore:
* page/EventHandler.cpp:
(WebCore::EventHandler::mouseDownMayStartSelect const):
Get textInteractionEnabled state from preferences, rather than copying its state to the page.
* page/Page.cpp:
(WebCore::m_shouldRelaxThirdPartyCookieBlocking):
* page/Page.h:
(WebCore::Page::textInteractionEnabled const): Deleted.
(WebCore::Page::setTextInteractionEnabled): Deleted.
* page/PageConfiguration.h:
Remove textInteractionEnabled state from Page/PageConfiguration have it use Settings like other settings.
Source/WebKit:
needsInAppBrowserPrivacyQuirks and textInteractionEnabled were both being passed to the WebProcess twice,
once via the preferences store, and once via explicit serialization.
Use the preferences infrastructure to do this for us instead, and remove a bunch of unneeded code.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_lastNavigationWasAppBound):
(WebKit::WebPage::updatePreferences):
Source/WTF:
* Scripts/Preferences/WebPreferencesDebug.yaml:
NeedsInAppBrowserPrivacyQuirks is only ever accessed via the WebKit preferences store,
so does not need to be exposed in WebKitLegacy or WebCore. Achieve this by removing the
WebKitLegacy and WebCore defaults.
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (274191 => 274192)
--- trunk/Source/WTF/ChangeLog 2021-03-10 02:53:04 UTC (rev 274191)
+++ trunk/Source/WTF/ChangeLog 2021-03-10 03:12:54 UTC (rev 274192)
@@ -1,3 +1,15 @@
+2021-03-09 Sam Weinig <wei...@apple.com>
+
+ Preferences do not need to be passed to the WebProcess via WebPageCreationParameters since the store already is
+ https://bugs.webkit.org/show_bug.cgi?id=222945
+
+ Reviewed by Simon Fraser.
+
+ * Scripts/Preferences/WebPreferencesDebug.yaml:
+ NeedsInAppBrowserPrivacyQuirks is only ever accessed via the WebKit preferences store,
+ so does not need to be exposed in WebKitLegacy or WebCore. Achieve this by removing the
+ WebKitLegacy and WebCore defaults.
+
2021-03-09 Alex Christensen <achristen...@webkit.org>
Reduce unnecessary string copies in ParsedContentRange
Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesDebug.yaml (274191 => 274192)
--- trunk/Source/WTF/Scripts/Preferences/WebPreferencesDebug.yaml 2021-03-10 02:53:04 UTC (rev 274191)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesDebug.yaml 2021-03-10 03:12:54 UTC (rev 274192)
@@ -127,19 +127,15 @@
WebCore:
default: false
-# FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
-# FIXME: This is not relevent for WebCore, so should not have WebCore bindings.
NeedsInAppBrowserPrivacyQuirks:
type: bool
humanReadableName: "Needs In-App Browser Privacy Quirks"
humanReadableDescription: "Enable quirks needed to support In-App Browser privacy"
+ webcoreBinding: none
+ exposed: [ WebKit ]
defaultValue:
- WebKitLegacy:
- default: false
WebKit:
default: false
- WebCore:
- default: false
ResourceUsageOverlayVisible:
type: bool
Modified: trunk/Source/WebCore/ChangeLog (274191 => 274192)
--- trunk/Source/WebCore/ChangeLog 2021-03-10 02:53:04 UTC (rev 274191)
+++ trunk/Source/WebCore/ChangeLog 2021-03-10 03:12:54 UTC (rev 274192)
@@ -1,3 +1,22 @@
+2021-03-09 Sam Weinig <wei...@apple.com>
+
+ Preferences do not need to be passed to the WebProcess via WebPageCreationParameters since the store already is
+ https://bugs.webkit.org/show_bug.cgi?id=222945
+
+ Reviewed by Simon Fraser.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::mouseDownMayStartSelect const):
+ Get textInteractionEnabled state from preferences, rather than copying its state to the page.
+
+ * page/Page.cpp:
+ (WebCore::m_shouldRelaxThirdPartyCookieBlocking):
+ * page/Page.h:
+ (WebCore::Page::textInteractionEnabled const): Deleted.
+ (WebCore::Page::setTextInteractionEnabled): Deleted.
+ * page/PageConfiguration.h:
+ Remove textInteractionEnabled state from Page/PageConfiguration have it use Settings like other settings.
+
2021-03-09 Alex Christensen <achristen...@webkit.org>
Reduce unnecessary string copies in ParsedContentRange
Modified: trunk/Source/WebCore/page/EventHandler.cpp (274191 => 274192)
--- trunk/Source/WebCore/page/EventHandler.cpp 2021-03-10 02:53:04 UTC (rev 274191)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2021-03-10 03:12:54 UTC (rev 274192)
@@ -708,8 +708,7 @@
bool EventHandler::mouseDownMayStartSelect() const
{
- auto* page = m_frame.page();
- if (page && !page->textInteractionEnabled())
+ if (!m_frame.settings().textInteractionEnabled())
return false;
return m_mouseDownMayStartSelect;
Modified: trunk/Source/WebCore/page/Page.cpp (274191 => 274192)
--- trunk/Source/WebCore/page/Page.cpp 2021-03-10 02:53:04 UTC (rev 274191)
+++ trunk/Source/WebCore/page/Page.cpp 2021-03-10 03:12:54 UTC (rev 274192)
@@ -306,7 +306,6 @@
, m_loadsSubresources(pageConfiguration.loadsSubresources)
, m_loadsFromNetwork(pageConfiguration.loadsFromNetwork)
, m_shouldRelaxThirdPartyCookieBlocking(pageConfiguration.shouldRelaxThirdPartyCookieBlocking)
- , m_textInteractionEnabled(pageConfiguration.textInteractionEnabled)
, m_httpsUpgradeEnabled(pageConfiguration.httpsUpgradeEnabled)
{
updateTimerThrottlingState();
Modified: trunk/Source/WebCore/page/Page.h (274191 => 274192)
--- trunk/Source/WebCore/page/Page.h 2021-03-10 02:53:04 UTC (rev 274191)
+++ trunk/Source/WebCore/page/Page.h 2021-03-10 03:12:54 UTC (rev 274192)
@@ -833,9 +833,6 @@
MonotonicTime lastRenderingUpdateTimestamp() const { return m_lastRenderingUpdateTimestamp; }
- bool textInteractionEnabled() const { return m_textInteractionEnabled; }
- void setTextInteractionEnabled(bool value) { m_textInteractionEnabled = value; }
-
bool httpsUpgradeEnabled() const { return m_httpsUpgradeEnabled; }
LoadSchedulingMode loadSchedulingMode() const { return m_loadSchedulingMode; }
@@ -1147,8 +1144,7 @@
bool m_hasBeenNotifiedToInjectUserScripts { false };
MonotonicTime m_lastRenderingUpdateTimestamp;
-
- bool m_textInteractionEnabled { true };
+
const bool m_httpsUpgradeEnabled { true };
mutable MediaSessionGroupIdentifier m_mediaSessionGroupIdentifier;
};
Modified: trunk/Source/WebCore/page/PageConfiguration.h (274191 => 274192)
--- trunk/Source/WebCore/page/PageConfiguration.h 2021-03-10 02:53:04 UTC (rev 274191)
+++ trunk/Source/WebCore/page/PageConfiguration.h 2021-03-10 03:12:54 UTC (rev 274192)
@@ -129,11 +129,12 @@
Vector<UserContentURLPattern> corsDisablingPatterns;
UniqueRef<SpeechRecognitionProvider> speechRecognitionProvider;
UniqueRef<MediaRecorderProvider> mediaRecorderProvider;
+
+ // FIXME: These should be all be Settings.
bool loadsSubresources { true };
bool loadsFromNetwork { true };
bool userScriptsShouldWaitUntilNotification { true };
ShouldRelaxThirdPartyCookieBlocking shouldRelaxThirdPartyCookieBlocking { ShouldRelaxThirdPartyCookieBlocking::No };
- bool textInteractionEnabled { true };
bool httpsUpgradeEnabled { true };
};
Modified: trunk/Source/WebKit/ChangeLog (274191 => 274192)
--- trunk/Source/WebKit/ChangeLog 2021-03-10 02:53:04 UTC (rev 274191)
+++ trunk/Source/WebKit/ChangeLog 2021-03-10 03:12:54 UTC (rev 274192)
@@ -1,3 +1,25 @@
+2021-03-09 Sam Weinig <wei...@apple.com>
+
+ Preferences do not need to be passed to the WebProcess via WebPageCreationParameters since the store already is
+ https://bugs.webkit.org/show_bug.cgi?id=222945
+
+ Reviewed by Simon Fraser.
+
+ needsInAppBrowserPrivacyQuirks and textInteractionEnabled were both being passed to the WebProcess twice,
+ once via the preferences store, and once via explicit serialization.
+
+ Use the preferences infrastructure to do this for us instead, and remove a bunch of unneeded code.
+
+ * Shared/WebPageCreationParameters.cpp:
+ (WebKit::WebPageCreationParameters::encode const):
+ (WebKit::WebPageCreationParameters::decode):
+ * Shared/WebPageCreationParameters.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::creationParameters):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::m_lastNavigationWasAppBound):
+ (WebKit::WebPage::updatePreferences):
+
2021-03-09 Brent Fulgham <bfulg...@apple.com>
REGRESSION (r274109): Catalina Perf tests failing due to unexpected output (222993)
Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp (274191 => 274192)
--- trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp 2021-03-10 02:53:04 UTC (rev 274191)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp 2021-03-10 03:12:54 UTC (rev 274192)
@@ -171,7 +171,6 @@
encoder << shouldEnableVP9Decoder;
encoder << shouldEnableVP9SWDecoder;
#if ENABLE(APP_BOUND_DOMAINS)
- encoder << needsInAppBrowserPrivacyQuirks;
encoder << limitsNavigationsToAppBoundDomains;
#endif
encoder << lastNavigationWasAppBound;
@@ -182,7 +181,6 @@
encoder << themeName;
#endif
- encoder << textInteractionEnabled;
encoder << httpsUpgradeEnabled;
#if PLATFORM(IOS)
encoder << allowsDeprecatedSynchronousXMLHttpRequestDuringUnload;
@@ -568,9 +566,6 @@
return WTF::nullopt;
#if ENABLE(APP_BOUND_DOMAINS)
- if (!decoder.decode(parameters.needsInAppBrowserPrivacyQuirks))
- return WTF::nullopt;
-
if (!decoder.decode(parameters.limitsNavigationsToAppBoundDomains))
return WTF::nullopt;
#endif
@@ -587,9 +582,6 @@
if (!decoder.decode(parameters.themeName))
return WTF::nullopt;
#endif
-
- if (!decoder.decode(parameters.textInteractionEnabled))
- return WTF::nullopt;
if (!decoder.decode(parameters.httpsUpgradeEnabled))
return WTF::nullopt;
Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.h (274191 => 274192)
--- trunk/Source/WebKit/Shared/WebPageCreationParameters.h 2021-03-10 02:53:04 UTC (rev 274191)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.h 2021-03-10 03:12:54 UTC (rev 274192)
@@ -242,7 +242,6 @@
bool shouldEnableVP9Decoder { false };
bool shouldEnableVP9SWDecoder { false };
#if ENABLE(APP_BOUND_DOMAINS)
- bool needsInAppBrowserPrivacyQuirks { false };
bool limitsNavigationsToAppBoundDomains { false };
#endif
bool lastNavigationWasAppBound { false };
@@ -253,10 +252,9 @@
#if PLATFORM(GTK)
String themeName;
#endif
+
+ bool httpsUpgradeEnabled { true };
- bool textInteractionEnabled { true };
- bool httpsUpgradeEnabled { true };
-
#if PLATFORM(IOS)
bool allowsDeprecatedSynchronousXMLHttpRequestDuringUnload { false };
#endif
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (274191 => 274192)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2021-03-10 02:53:04 UTC (rev 274191)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2021-03-10 03:12:54 UTC (rev 274192)
@@ -7922,8 +7922,10 @@
parameters.urlSchemesWithLegacyCustomProtocolHandlers = WebProcessPool::urlSchemesWithCustomProtocolHandlers();
#if ENABLE(WEB_RTC)
+ // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.iceCandidateFilteringEnabled = m_preferences->iceCandidateFilteringEnabled();
#if USE(LIBWEBRTC)
+ // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.enumeratingAllNetworkInterfacesEnabled = m_preferences->enumeratingAllNetworkInterfacesEnabled();
#endif
#endif
@@ -7949,20 +7951,31 @@
process.addWebUserContentControllerProxy(userContentController);
parameters.userContentControllerParameters = userContentController.get().parameters();
+ // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.shouldCaptureAudioInUIProcess = preferences().captureAudioInUIProcessEnabled();
+ // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.shouldCaptureAudioInGPUProcess = preferences().captureAudioInGPUProcessEnabled();
+ // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.shouldCaptureVideoInUIProcess = preferences().captureVideoInUIProcessEnabled();
+ // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.shouldCaptureVideoInGPUProcess = preferences().captureVideoInGPUProcessEnabled();
+ // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.shouldRenderCanvasInGPUProcess = preferences().useGPUProcessForCanvasRenderingEnabled();
+ // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.shouldRenderDOMInGPUProcess = preferences().useGPUProcessForDOMRenderingEnabled();
+ // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.shouldPlayMediaInGPUProcess = preferences().useGPUProcessForMediaEnabled();
#if ENABLE(WEBGL)
+ // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.shouldRenderWebGLInGPUProcess = preferences().useGPUProcessForWebGLEnabled();
#endif
+ // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.shouldEnableVP9Decoder = preferences().vp9DecoderEnabled();
#if ENABLE(VP9) && PLATFORM(COCOA)
+ // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.shouldEnableVP8Decoder = preferences().vp9DecoderEnabled();
+ // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.shouldEnableVP9SWDecoder = preferences().vp9DecoderEnabled() && (!WebCore::systemHasBattery() || preferences().vp9SWDecoderEnabledOnBattery());
#endif
parameters.shouldCaptureDisplayInUIProcess = m_process->processPool().configuration().shouldCaptureDisplayInUIProcess();
@@ -7984,14 +7997,10 @@
}
#endif
-#if ENABLE(APP_BOUND_DOMAINS)
- parameters.needsInAppBrowserPrivacyQuirks = preferences().needsInAppBrowserPrivacyQuirks();
-#endif
-
- parameters.textInteractionEnabled = preferences().textInteractionEnabled();
parameters.httpsUpgradeEnabled = preferences().upgradeKnownHostsToHTTPSEnabled() ? m_configuration->httpsUpgradeEnabled() : false;
#if PLATFORM(IOS)
+ // FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.allowsDeprecatedSynchronousXMLHttpRequestDuringUnload = allowsDeprecatedSynchronousXMLHttpRequestDuringUnload();
#endif
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (274191 => 274192)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2021-03-10 02:53:04 UTC (rev 274191)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2021-03-10 03:12:54 UTC (rev 274192)
@@ -452,9 +452,6 @@
#if ENABLE(WEBGL)
, m_shouldRenderWebGLInGPUProcess { parameters.shouldRenderWebGLInGPUProcess}
#endif
-#if ENABLE(APP_BOUND_DOMAINS)
- , m_needsInAppBrowserPrivacyQuirks { parameters.needsInAppBrowserPrivacyQuirks }
-#endif
, m_layerHostingMode(parameters.layerHostingMode)
#if ENABLE(PLATFORM_DRIVEN_TEXT_CHECKING)
, m_textCheckingControllerProxy(makeUniqueRef<TextCheckingControllerProxy>(*this))
@@ -602,8 +599,6 @@
pageConfiguration.shouldRelaxThirdPartyCookieBlocking = parameters.shouldRelaxThirdPartyCookieBlocking;
pageConfiguration.httpsUpgradeEnabled = parameters.httpsUpgradeEnabled;
- pageConfiguration.textInteractionEnabled = parameters.textInteractionEnabled;
-
if (!parameters.crossOriginAccessControlCheckEnabled)
CrossOriginAccessControlCheckDisabler::singleton().setCrossOriginAccessControlCheckEnabled(false);
@@ -3935,8 +3930,6 @@
m_ipcTestingAPIEnabled = store.getBoolValueForKey(WebPreferencesKey::ipcTestingAPIEnabledKey());
#endif
- m_page->setTextInteractionEnabled(store.getBoolValueForKey(WebPreferencesKey::textInteractionEnabledKey()));
-
#if ENABLE(WEB_AUTHN) && PLATFORM(IOS)
if (auto* connection = WebProcess::singleton().parentProcessConnection()) {
if (isParentProcessAFullWebBrowser(connection->getAuditToken()))