Title: [275077] trunk/Source
Revision
275077
Author
[email protected]
Date
2021-03-25 22:09:24 -0700 (Thu, 25 Mar 2021)

Log Message

Have App Highlights be a Configuration Setting instead of an internal Preference setting.
https://bugs.webkit.org/show_bug.cgi?id=223720
rdar://75196085

Reviewed by Wenson Hsieh.

Source/WebKit:

* FeatureFlags/WebKit-appletvos.plist:
* FeatureFlags/WebKit-ios.plist:
* FeatureFlags/WebKit-macos.plist:
* FeatureFlags/WebKit-watchos.plist:
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultAppHighlightsEnabled): Deleted.
* Shared/WebPreferencesDefaultValues.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setupPageConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _setAppHighlightsEnabled:]):
(-[WKWebViewConfiguration _appHighlightsEnabled]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* WebProcess/WebPage/WebPage.h:

Source/WTF:

* Scripts/Preferences/WebPreferences.yaml:
* Scripts/Preferences/WebPreferencesInternal.yaml:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (275076 => 275077)


--- trunk/Source/WTF/ChangeLog	2021-03-26 03:27:16 UTC (rev 275076)
+++ trunk/Source/WTF/ChangeLog	2021-03-26 05:09:24 UTC (rev 275077)
@@ -1,3 +1,14 @@
+2021-03-25  Megan Gardner  <[email protected]>
+
+        Have App Highlights be a Configuration Setting instead of an internal Preference setting.
+        https://bugs.webkit.org/show_bug.cgi?id=223720
+        rdar://75196085
+
+        Reviewed by Wenson Hsieh.
+
+        * Scripts/Preferences/WebPreferences.yaml:
+        * Scripts/Preferences/WebPreferencesInternal.yaml:
+
 2021-03-25  Jessie Berlin  <[email protected]>
 
         Remove 10.13 DEPLOYMENT_TARGETs and SYSTEM_VERSION_PREFIXs

Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml (275076 => 275077)


--- trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml	2021-03-26 03:27:16 UTC (rev 275076)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml	2021-03-26 05:09:24 UTC (rev 275077)
@@ -251,6 +251,17 @@
       default: true
     WebCore:
       default: true
+      
+AppHighlightsEnabled:
+  type: bool
+  condition: ENABLE(APP_HIGHLIGHTS)
+  defaultValue:
+    WebKitLegacy:
+      default: false
+    WebKit:
+      default: false
+    WebCore:
+      default: false
 
 AppleMailPaginationQuirkEnabled:
   type: bool

Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml (275076 => 275077)


--- trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml	2021-03-26 03:27:16 UTC (rev 275076)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml	2021-03-26 05:09:24 UTC (rev 275077)
@@ -50,20 +50,6 @@
   defaultValue:
     WebKit:
       default: false
-      
-AppHighlightsEnabled:
-  type: bool
-  humanReadableName: "App Highlights"
-  humanReadableDescription: "Enable persistent highlights for apps"
-  condition: ENABLE(APP_HIGHLIGHTS)
-  exposed: [ WebKit ]
-  defaultValue:
-    WebKitLegacy:
-      default: false
-    WebKit:
-      default: WebKit::defaultAppHighlightsEnabled()
-    WebCore:
-      default: false
 
 # FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
 ApplePayRemoteUIEnabled:

Modified: trunk/Source/WebKit/ChangeLog (275076 => 275077)


--- trunk/Source/WebKit/ChangeLog	2021-03-26 03:27:16 UTC (rev 275076)
+++ trunk/Source/WebKit/ChangeLog	2021-03-26 05:09:24 UTC (rev 275077)
@@ -1,3 +1,28 @@
+2021-03-25  Megan Gardner  <[email protected]>
+
+        Have App Highlights be a Configuration Setting instead of an internal Preference setting.
+        https://bugs.webkit.org/show_bug.cgi?id=223720
+        rdar://75196085
+
+        Reviewed by Wenson Hsieh.
+
+        * FeatureFlags/WebKit-appletvos.plist:
+        * FeatureFlags/WebKit-ios.plist:
+        * FeatureFlags/WebKit-macos.plist:
+        * FeatureFlags/WebKit-watchos.plist:
+        * Shared/WebPreferencesDefaultValues.cpp:
+        (WebKit::defaultAppHighlightsEnabled): Deleted.
+        * Shared/WebPreferencesDefaultValues.h:
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _setupPageConfiguration:]):
+        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+        (-[WKWebViewConfiguration init]):
+        (-[WKWebViewConfiguration copyWithZone:]):
+        (-[WKWebViewConfiguration _setAppHighlightsEnabled:]):
+        (-[WKWebViewConfiguration _appHighlightsEnabled]):
+        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
+        * WebProcess/WebPage/WebPage.h:
+
 2021-03-25  Jessie Berlin  <[email protected]>
 
         Remove 10.13 DEPLOYMENT_TARGETs and SYSTEM_VERSION_PREFIXs

Modified: trunk/Source/WebKit/FeatureFlags/WebKit-appletvos.plist (275076 => 275077)


--- trunk/Source/WebKit/FeatureFlags/WebKit-appletvos.plist	2021-03-26 03:27:16 UTC (rev 275076)
+++ trunk/Source/WebKit/FeatureFlags/WebKit-appletvos.plist	2021-03-26 05:09:24 UTC (rev 275077)
@@ -2,11 +2,6 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
-	<key>app_highlights</key>
-	<dict>
-		<key>Enabled</key>
-		<true/>
-	</dict>
 	<key>async_frame_and_overflow_scrolling</key>
 	<dict>
 		<key>Enabled</key>

Modified: trunk/Source/WebKit/FeatureFlags/WebKit-ios.plist (275076 => 275077)


--- trunk/Source/WebKit/FeatureFlags/WebKit-ios.plist	2021-03-26 03:27:16 UTC (rev 275076)
+++ trunk/Source/WebKit/FeatureFlags/WebKit-ios.plist	2021-03-26 05:09:24 UTC (rev 275077)
@@ -2,11 +2,6 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
-	<key>app_highlights</key>
-	<dict>
-		<key>Enabled</key>
-		<true/>
-	</dict>
 	<key>async_frame_and_overflow_scrolling</key>
 	<dict>
 		<key>Enabled</key>

Modified: trunk/Source/WebKit/FeatureFlags/WebKit-macos.plist (275076 => 275077)


--- trunk/Source/WebKit/FeatureFlags/WebKit-macos.plist	2021-03-26 03:27:16 UTC (rev 275076)
+++ trunk/Source/WebKit/FeatureFlags/WebKit-macos.plist	2021-03-26 05:09:24 UTC (rev 275077)
@@ -2,11 +2,6 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
-	<key>app_highlights</key>
-	<dict>
-		<key>Enabled</key>
-		<true/>
-	</dict>
 	<key>async_frame_and_overflow_scrolling</key>
 	<dict>
 		<key>Enabled</key>

Modified: trunk/Source/WebKit/FeatureFlags/WebKit-watchos.plist (275076 => 275077)


--- trunk/Source/WebKit/FeatureFlags/WebKit-watchos.plist	2021-03-26 03:27:16 UTC (rev 275076)
+++ trunk/Source/WebKit/FeatureFlags/WebKit-watchos.plist	2021-03-26 05:09:24 UTC (rev 275077)
@@ -2,11 +2,6 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
-	<key>app_highlights</key>
-	<dict>
-		<key>Enabled</key>
-		<true/>
-	</dict>
 	<key>async_frame_and_overflow_scrolling</key>
 	<dict>
 		<key>Enabled</key>

Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (275076 => 275077)


--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2021-03-26 03:27:16 UTC (rev 275076)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2021-03-26 05:09:24 UTC (rev 275077)
@@ -129,16 +129,6 @@
     return defaultAsyncFrameAndOverflowScrollingEnabled();
 }
 
-#if ENABLE(APP_HIGHLIGHTS)
-bool defaultAppHighlightsEnabled()
-{
-#if HAVE(SYSTEM_FEATURE_FLAGS)
-    return isFeatureFlagEnabled("app_highlights");
-#endif
-    return false;
-}
-#endif
-
 #if ENABLE(GPU_PROCESS)
 
 bool defaultUseGPUProcessForCanvasRenderingEnabled()

Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h (275076 => 275077)


--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2021-03-26 03:27:16 UTC (rev 275076)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2021-03-26 05:09:24 UTC (rev 275077)
@@ -67,10 +67,6 @@
 bool defaultAsyncFrameScrollingEnabled();
 bool defaultAsyncOverflowScrollingEnabled();
 
-#if ENABLE(APP_HIGHLIGHTS)
-bool defaultAppHighlightsEnabled();
-#endif
-
 #if ENABLE(GPU_PROCESS)
 bool defaultUseGPUProcessForCanvasRenderingEnabled();
 bool defaultUseGPUProcessForDOMRenderingEnabled();

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (275076 => 275077)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2021-03-26 03:27:16 UTC (rev 275076)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2021-03-26 05:09:24 UTC (rev 275077)
@@ -542,6 +542,10 @@
     pageConfiguration->preferences()->setColorFilterEnabled(!![_configuration _colorFilterEnabled]);
 
     pageConfiguration->preferences()->setUndoManagerAPIEnabled(!![_configuration _undoManagerAPIEnabled]);
+    
+#if ENABLE(APP_HIGHLIGHTS)
+    pageConfiguration->preferences()->setAppHighlightsEnabled(!![_configuration _appHighlightsEnabled]);
+#endif
 
 #if ENABLE(LEGACY_ENCRYPTED_MEDIA)
     pageConfiguration->preferences()->setLegacyEncryptedMediaAPIEnabled(!![_configuration _legacyEncryptedMediaAPIEnabled]);
@@ -1389,7 +1393,6 @@
 
 #endif // ENABLE(ATTACHMENT_ELEMENT)
 
-
 - (id <_WKAppHighlightDelegate>)_appHighlightDelegate
 {
 #if ENABLE(APP_HIGHLIGHTS)

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (275076 => 275077)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm	2021-03-26 03:27:16 UTC (rev 275076)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm	2021-03-26 05:09:24 UTC (rev 275077)
@@ -174,6 +174,9 @@
     BOOL _shouldDeferAsynchronousScriptsUntilAfterDocumentLoad;
     BOOL _drawsBackground;
     BOOL _undoManagerAPIEnabled;
+#if ENABLE(APP_HIGHLIGHTS)
+    BOOL _appHighlightsEnabled;
+#endif
 
     RetainPtr<NSString> _mediaContentTypesRequiringHardwareSupport;
     RetainPtr<NSArray<NSString *>> _additionalSupportedImageTypes;
@@ -269,6 +272,9 @@
     _applePayEnabled = DEFAULT_VALUE_FOR_ApplePayEnabled;
 #endif
 
+#if ENABLE(APP_HIGHLIGHTS)
+    _appHighlightsEnabled = DEFAULT_VALUE_FOR_AppHighlightsEnabled;
+#endif
     return self;
 }
 
@@ -443,6 +449,9 @@
     configuration->_drawsBackground = self->_drawsBackground;
 
     configuration->_undoManagerAPIEnabled = self->_undoManagerAPIEnabled;
+#if ENABLE(APP_HIGHLIGHTS)
+    configuration->_appHighlightsEnabled = self->_appHighlightsEnabled;
+#endif
 
     return configuration;
 }
@@ -1219,6 +1228,22 @@
     return _undoManagerAPIEnabled;
 }
 
+- (void)_setAppHighlightsEnabled:(BOOL)enabled
+{
+#if ENABLE(APP_HIGHLIGHTS)
+    _appHighlightsEnabled = enabled;
+#endif
+}
+
+- (BOOL)_appHighlightsEnabled
+{
+#if ENABLE(APP_HIGHLIGHTS)
+    return _appHighlightsEnabled;
+#else
+    return NO;
+#endif
+}
+
 - (BOOL)_shouldRelaxThirdPartyCookieBlocking
 {
     return _pageConfiguration->shouldRelaxThirdPartyCookieBlocking() == WebCore::ShouldRelaxThirdPartyCookieBlocking::Yes;

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h (275076 => 275077)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h	2021-03-26 03:27:16 UTC (rev 275076)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h	2021-03-26 05:09:24 UTC (rev 275077)
@@ -121,6 +121,8 @@
 @property (nonatomic, setter=_setShouldRelaxThirdPartyCookieBlocking:) BOOL _shouldRelaxThirdPartyCookieBlocking WK_API_AVAILABLE(macos(11.0), ios(14.0));
 @property (nonatomic, setter=_setProcessDisplayName:) NSString *_processDisplayName WK_API_AVAILABLE(macos(11.0), ios(14.0));
 
+@property (nonatomic, setter=_setAppHighlightsEnabled:) BOOL _appHighlightsEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
+
 @end
 
 #if TARGET_OS_IPHONE
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to