Rename experimental feature for process swap on navigation
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Sep 2018 02:36:54 +0000 (02:36 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Sep 2018 02:36:54 +0000 (02:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=189280

Reviewed by Antti Koivisto.

The "process swap on navigation" experimental feature on macOS Mojave does not work due to missing
browser changes, resulting in frequent load hangs. When enabling the experimental feature in WebKit
ToT or Safari Technology Preview for testing, it enables it as well for Mojave's system Safari which
is annoying.

This patch renames the experimental feature so that the feature stays disabled in Mojave's system
Safari even when enabled in WebKit ToT / STP.

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetProcessSwapOnNavigationEnabled):
(WKPreferencesGetProcessSwapOnNavigationEnabled):
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::updateBoolValueForExperimentalFeatureKey):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createWebPage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235656 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/UIProcess/API/C/WKPreferences.cpp
Source/WebKit/UIProcess/WebPreferences.cpp
Source/WebKit/UIProcess/WebProcessPool.cpp

index 690f39d..21eb296 100644 (file)
@@ -1,3 +1,27 @@
+2018-09-04  Chris Dumez  <cdumez@apple.com>
+
+        Rename experimental feature for process swap on navigation
+        https://bugs.webkit.org/show_bug.cgi?id=189280
+
+        Reviewed by Antti Koivisto.
+
+        The "process swap on navigation" experimental feature on macOS Mojave does not work due to missing
+        browser changes, resulting in frequent load hangs. When enabling the experimental feature in WebKit
+        ToT or Safari Technology Preview for testing, it enables it as well for Mojave's system Safari which
+        is annoying.
+
+        This patch renames the experimental feature so that the feature stays disabled in Mojave's system
+        Safari even when enabled in WebKit ToT / STP.
+
+        * Shared/WebPreferences.yaml:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetProcessSwapOnNavigationEnabled):
+        (WKPreferencesGetProcessSwapOnNavigationEnabled):
+        * UIProcess/WebPreferences.cpp:
+        (WebKit::WebPreferences::updateBoolValueForExperimentalFeatureKey):
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::createWebPage):
+
 2018-09-04  Dean Jackson  <dino@apple.com>
 
         Post review Weinig fix-ups
index cebcc76..8a476c4 100644 (file)
@@ -1316,11 +1316,11 @@ EncryptedMediaAPIEnabled:
   category: experimental
   condition: ENABLE(ENCRYPTED_MEDIA)
 
-ProcessSwapOnNavigationEnabled:
+ProcessSwapOnCrossSiteNavigationEnabled:
   type: bool
   defaultValue: false
-  humanReadableName: "Swap Processes on Navigation"
-  humanReadableDescription: "Swap WebContent processes on cross-origin navigations"
+  humanReadableName: "Swap Processes on Cross-Site Navigation"
+  humanReadableDescription: "Swap WebContent processes on cross-site navigations"
   category: experimental
   webcoreBinding: none
 
index dd271b5..da98fd5 100644 (file)
@@ -2079,12 +2079,12 @@ bool WKPreferencesGetColorFilterEnabled(WKPreferencesRef preferencesRef)
 
 void WKPreferencesSetProcessSwapOnNavigationEnabled(WKPreferencesRef preferencesRef, bool flag)
 {
-    toImpl(preferencesRef)->setProcessSwapOnNavigationEnabled(flag);
+    toImpl(preferencesRef)->setProcessSwapOnCrossSiteNavigationEnabled(flag);
 }
 
 bool WKPreferencesGetProcessSwapOnNavigationEnabled(WKPreferencesRef preferencesRef)
 {
-    return toImpl(preferencesRef)->processSwapOnNavigationEnabled();
+    return toImpl(preferencesRef)->processSwapOnCrossSiteNavigationEnabled();
 }
 
 void WKPreferencesSetPunchOutWhiteBackgroundsInDarkMode(WKPreferencesRef preferencesRef, bool flag)
index 62cadec..084bed3 100644 (file)
@@ -133,7 +133,7 @@ void WebPreferences::updateBoolValueForKey(const String& key, bool value)
 
 void WebPreferences::updateBoolValueForExperimentalFeatureKey(const String& key, bool value)
 {
-    if (key == WebPreferencesKey::processSwapOnNavigationEnabledKey()) {
+    if (key == WebPreferencesKey::processSwapOnCrossSiteNavigationEnabledKey()) {
         for (auto* page : m_pages)
             page->process().processPool().configuration().setProcessSwapsOnNavigation(value);
 
index 411fe61..2d2a98b 100644 (file)
@@ -1155,7 +1155,7 @@ Ref<WebPageProxy> WebProcessPool::createWebPage(PageClient& pageClient, Ref<API:
 #endif
 
     auto page = process->createWebPage(pageClient, WTFMove(pageConfiguration));
-    if (page->preferences().processSwapOnNavigationEnabled()) {
+    if (page->preferences().processSwapOnCrossSiteNavigationEnabled()) {
         m_configuration->setProcessSwapsOnNavigation(true);
         // FIXME: For now, turning on PSON from the experimental features menu also turns on
         // automatic process warming until clients can be updated.