Title: [269713] trunk
Revision
269713
Author
wei...@apple.com
Date
2020-11-11 18:34:10 -0800 (Wed, 11 Nov 2020)

Log Message

Move more WebKitLegacy preferences bound to Settings to WebPreferences.yaml
https://bugs.webkit.org/show_bug.cgi?id=218826

Reviewed by Tim Horton.

Source/WebCore:

* page/Settings.yaml:
Move AcceleratedCompositingForFixedPositionEnabled, ForceWebGLUsesLowPower,
RubberBandingForSubScrollableRegionsEnabled, ShrinksStandaloneImagesToFit and
VisualViewportEnabled to WebPreferences.yaml

Source/WebKitLegacy/mac:

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
Remove manual defaults for ShrinksStandaloneImagesToFit and ForceWebGLUsesLowPower
now they are generated.

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Remove manual setting of AcceleratedCompositingForFixedPositionEnabled, ForceWebGLUsesLowPower,
RubberBandingForSubScrollableRegionsEnabled, ShrinksStandaloneImagesToFit and
VisualViewportEnabled now that they are generated.

Source/WTF:

* Scripts/Preferences/WebPreferences.yaml:
Move AcceleratedCompositingForFixedPositionEnabled, ForceWebGLUsesLowPower,
RubberBandingForSubScrollableRegionsEnabled, ShrinksStandaloneImagesToFit and
VisualViewportEnabled to WebPreferences.yaml

Tools:

* DumpRenderTree/TestOptions.cpp:
(WTR::TestOptions::defaults):
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
Switch to using TestOptions for ShrinksStandaloneImagesToFit now that it is supported.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (269712 => 269713)


--- trunk/Source/WTF/ChangeLog	2020-11-12 02:04:28 UTC (rev 269712)
+++ trunk/Source/WTF/ChangeLog	2020-11-12 02:34:10 UTC (rev 269713)
@@ -1,3 +1,15 @@
+2020-11-11  Sam Weinig  <wei...@apple.com>
+
+        Move more WebKitLegacy preferences bound to Settings to WebPreferences.yaml
+        https://bugs.webkit.org/show_bug.cgi?id=218826
+
+        Reviewed by Tim Horton.
+
+        * Scripts/Preferences/WebPreferences.yaml:
+        Move AcceleratedCompositingForFixedPositionEnabled, ForceWebGLUsesLowPower, 
+        RubberBandingForSubScrollableRegionsEnabled, ShrinksStandaloneImagesToFit and
+        VisualViewportEnabled to WebPreferences.yaml
+
 2020-11-11  John Wilander  <wilan...@apple.com>
 
         PCM: Change from ad-click-attribution to private-click-measurement (in all forms, including .well-known URL)

Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml (269712 => 269713)


--- trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml	2020-11-12 02:04:28 UTC (rev 269712)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml	2020-11-12 02:34:10 UTC (rev 269713)
@@ -55,6 +55,18 @@
     WebCore:
       default: true
 
+AcceleratedCompositingForFixedPositionEnabled:
+  type: bool
+  defaultValue:
+    WebKitLegacy:
+      default: true
+    WebKit:
+      PLATFORM(IOS_FAMILY): true
+      default: false
+    WebCore:
+      PLATFORM(IOS_FAMILY): true
+      default: false
+
 AggressiveTileRetentionEnabled:
   type: bool
   defaultValue:
@@ -741,6 +753,16 @@
     WebCore:
       default: false
 
+ForceWebGLUsesLowPower:
+  type: bool
+  defaultValue:
+    WebKitLegacy:
+      default: true
+    WebKit:
+      default: false
+    WebCore:
+      default: false
+
 # FIXME: We should make autogeneration smart enough to deal with enums to avoid explicitly casting in this file and custom binding to WebCore.
 # FIXME: This should be reconciled with 'FrameFlatteningEnabled' in WebPreferencesInternal.yaml.
 FrameFlattening:
@@ -1680,6 +1702,17 @@
       "PLATFORM(IOS_FAMILY)": true
       default: false
 
+RubberBandingForSubScrollableRegionsEnabled:
+  type: bool
+  condition: ENABLE(RUBBER_BANDING)
+  defaultValue:
+    WebKitLegacy:
+      default: false
+    WebKit:
+      default: true
+    WebCore:
+      default: true
+
 SafeBrowsingEnabled:
   type: bool
   webcoreBinding: none
@@ -1942,6 +1975,16 @@
     WebCore:
       default: false
 
+ShrinksStandaloneImagesToFit:
+  type: bool
+  defaultValue:
+    WebKitLegacy:
+      default: false
+    WebKit:
+      default: true
+    WebCore:
+      default: true
+
 # FIXME: This is handled via WebView SPI rather than WebPreferences for WebKitLegacy. We should change the SPI to lookup the WebPreferences value instead.
 SmartInsertDeleteEnabled:
   type: bool
@@ -2223,6 +2266,18 @@
     WebCore:
       default: false
 
+VisualViewportEnabled:
+  type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
+  defaultValue:
+    WebKitLegacy:
+      PLATFORM(IOS_FAMILY): false
+      default: true
+    WebKit:
+      default: true
+    WebCore:
+      default: true
+
 WantsBalancedSetDefersLoadingBehavior:
   type: bool
   defaultValue:

Modified: trunk/Source/WebCore/ChangeLog (269712 => 269713)


--- trunk/Source/WebCore/ChangeLog	2020-11-12 02:04:28 UTC (rev 269712)
+++ trunk/Source/WebCore/ChangeLog	2020-11-12 02:34:10 UTC (rev 269713)
@@ -1,3 +1,15 @@
+2020-11-11  Sam Weinig  <wei...@apple.com>
+
+        Move more WebKitLegacy preferences bound to Settings to WebPreferences.yaml
+        https://bugs.webkit.org/show_bug.cgi?id=218826
+
+        Reviewed by Tim Horton.
+
+        * page/Settings.yaml:
+        Move AcceleratedCompositingForFixedPositionEnabled, ForceWebGLUsesLowPower, 
+        RubberBandingForSubScrollableRegionsEnabled, ShrinksStandaloneImagesToFit and
+        VisualViewportEnabled to WebPreferences.yaml
+
 2020-11-11  John Wilander  <wilan...@apple.com>
 
         PCM: Change from ad-click-attribution to private-click-measurement (in all forms, including .well-known URL)

Modified: trunk/Source/WebCore/page/Settings.yaml (269712 => 269713)


--- trunk/Source/WebCore/page/Settings.yaml	2020-11-12 02:04:28 UTC (rev 269712)
+++ trunk/Source/WebCore/page/Settings.yaml	2020-11-12 02:34:10 UTC (rev 269713)
@@ -29,13 +29,6 @@
     WebCore:
       default: true
 
-AcceleratedCompositingForFixedPositionEnabled:
-  type: bool
-  defaultValue:
-    WebCore:
-      PLATFORM(IOS_FAMILY): true
-      default: false
-
 AcceleratedFiltersEnabled:
   type: bool
   defaultValue:
@@ -234,12 +227,6 @@
     WebCore:
       default: false
 
-ForceWebGLUsesLowPower:
-  type: bool
-  defaultValue:
-    WebCore:
-      default: false
-
 ForcedColorsAreInvertedAccessibilityValue:
   type: uint32_t
   refinedType: ForcedAccessibilityValue
@@ -536,13 +523,6 @@
     WebCore:
       default: false
 
-RubberBandingForSubScrollableRegionsEnabled:
-  type: bool
-  condition: ENABLE(RUBBER_BANDING)
-  defaultValue:
-    WebCore:
-      default: true
-
 ScrollingCoordinatorEnabled:
   type: bool
   defaultValue:
@@ -602,12 +582,6 @@
     WebCore:
       default: false
 
-ShrinksStandaloneImagesToFit:
-  type: bool
-  defaultValue:
-    WebCore:
-      default: true
-
 StorageAccessAPIPerPageScopeEnabled:
   type: bool
   defaultValue:
@@ -749,13 +723,6 @@
       PLATFORM(IOS_FAMILY): true
       default: false
 
-VisualViewportEnabled:
-  type: bool
-  webcoreOnChange: setNeedsRecalcStyleInAllFrames
-  defaultValue:
-    WebCore:
-      default: true
-
 WebGLErrorsToConsoleEnabled:
   type: bool
   defaultValue:

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (269712 => 269713)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2020-11-12 02:04:28 UTC (rev 269712)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2020-11-12 02:34:10 UTC (rev 269713)
@@ -1,3 +1,22 @@
+2020-11-11  Sam Weinig  <wei...@apple.com>
+
+        Move more WebKitLegacy preferences bound to Settings to WebPreferences.yaml
+        https://bugs.webkit.org/show_bug.cgi?id=218826
+
+        Reviewed by Tim Horton.
+
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        Remove manual defaults for ShrinksStandaloneImagesToFit and ForceWebGLUsesLowPower
+        now they are generated.
+
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+        Remove manual setting of AcceleratedCompositingForFixedPositionEnabled, ForceWebGLUsesLowPower, 
+        RubberBandingForSubScrollableRegionsEnabled, ShrinksStandaloneImagesToFit and
+        VisualViewportEnabled now that they are generated.
+
+
 2020-11-11  John Wilander  <wilan...@apple.com>
 
         PCM: Change from ad-click-attribution to private-click-measurement (in all forms, including .well-known URL)

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (269712 => 269713)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2020-11-12 02:04:28 UTC (rev 269712)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2020-11-12 02:34:10 UTC (rev 269713)
@@ -394,7 +394,6 @@
 
         @NO, WebKitUserStyleSheetEnabledPreferenceKey,
         @"", WebKitUserStyleSheetLocationPreferenceKey,
-        @NO, WebKitShrinksStandaloneImagesToFitPreferenceKey,
         @YES, WebKitAllowAnimatedImagesPreferenceKey,
         @YES, WebKitAllowAnimatedImageLoopingPreferenceKey,
         @"1800", WebKitBackForwardCacheExpirationIntervalKey,
@@ -401,7 +400,6 @@
         @NO, WebKitPrivateBrowsingEnabledPreferenceKey,
         @(cacheModelForMainBundle([[NSBundle mainBundle] bundleIdentifier])), WebKitCacheModelPreferenceKey,
         @YES, WebKitZoomsTextOnlyPreferenceKey,
-        @YES, WebKitForceWebGLUsesLowPowerPreferenceKey,
         @NO, WebKitUsePreHTML5ParserQuirksKey,
         [NSNumber numberWithLongLong:ApplicationCacheStorage::noQuota()], WebKitApplicationCacheTotalQuota,
 

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (269712 => 269713)


--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2020-11-12 02:04:28 UTC (rev 269712)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2020-11-12 02:34:10 UTC (rev 269713)
@@ -3049,6 +3049,8 @@
     settings.setEditableLinkBehavior(core([preferences editableLinkBehavior]));
     settings.setJavaScriptRuntimeFlags(JSC::RuntimeFlags([preferences _javascript_RuntimeFlags]));
     settings.setFrameFlattening((const WebCore::FrameFlattening)[preferences frameFlattening]);
+    settings.setTextDirectionSubmenuInclusionBehavior(core([preferences textDirectionSubmenuInclusionBehavior]));
+    settings.setBackForwardCacheExpirationInterval(Seconds { [preferences _backForwardCacheExpirationInterval] });
 
     BOOL mediaPlaybackRequiresUserGesture = [preferences mediaPlaybackRequiresUserGesture];
     settings.setVideoPlaybackRequiresUserGesture(mediaPlaybackRequiresUserGesture || [preferences videoPlaybackRequiresUserGesture]);
@@ -3060,10 +3062,6 @@
     _private->page->setSessionID([preferences privateBrowsingEnabled] ? PAL::SessionID::legacyPrivateSessionID() : PAL::SessionID::defaultSessionID());
     _private->group->storageNamespaceProvider().setSessionIDForTesting([preferences privateBrowsingEnabled] ? PAL::SessionID::legacyPrivateSessionID() : PAL::SessionID::defaultSessionID());
 
-    settings.setShrinksStandaloneImagesToFit([preferences shrinksStandaloneImagesToFit]);
-    settings.setTextDirectionSubmenuInclusionBehavior(core([preferences textDirectionSubmenuInclusionBehavior]));
-    settings.setBackForwardCacheExpirationInterval(Seconds { [preferences _backForwardCacheExpirationInterval] });
-    settings.setForceWebGLUsesLowPower([preferences forceLowPowerGPUForWebGL]);
     settings.setLoadDeferringEnabled(shouldEnableLoadDeferring());
     settings.setWindowFocusRestricted(shouldRestrictWindowFocus());
     settings.setUsePreHTML5ParserQuirks([self _needsPreHTML5ParserQuirks]);
@@ -3081,7 +3079,6 @@
     } else
         settings.setUserStyleSheetLocation([NSURL URLWithString:@""]);
 
-    settings.setAcceleratedCompositingForFixedPositionEnabled(true);
     settings.setNeedsAdobeFrameReloadingQuirk([self _needsAdobeFrameReloadingQuirk]);
     settings.setTreatsAnyTextCSSLinkAsStylesheet([self _needsLinkElementTextCSSQuirk]);
     settings.setNeedsFrameNameFallbackToIdQuirk([self _needsFrameNameFallbackToIdQuirk]);
@@ -3091,8 +3088,6 @@
 #endif
 
 #if PLATFORM(IOS_FAMILY)
-    settings.setVisualViewportEnabled(false);
-    settings.setVisualViewportAPIEnabled(false);
     WebCore::DeprecatedGlobalSettings::setAudioSessionCategoryOverride([preferences audioSessionCategoryOverride]);
     WebCore::DeprecatedGlobalSettings::setNetworkDataUsageTrackingEnabled([preferences networkDataUsageTrackingEnabled]);
     WebCore::DeprecatedGlobalSettings::setNetworkInterfaceName([preferences networkInterfaceName]);
@@ -3106,11 +3101,6 @@
     settings.setMediaKeysStorageDirectory([preferences mediaKeysStorageDirectory]);
 #endif
 
-#if ENABLE(RUBBER_BANDING)
-    // FIXME: https://bugs.webkit.org/show_bug.cgi?id=136131
-    settings.setRubberBandingForSubScrollableRegionsEnabled(false);
-#endif
-
     // FIXME: Is this relevent to WebKitLegacy? If not, we should remove it.
     WebCore::DeprecatedGlobalSettings::setResourceLoadStatisticsEnabled([preferences resourceLoadStatisticsEnabled]);
 

Modified: trunk/Tools/ChangeLog (269712 => 269713)


--- trunk/Tools/ChangeLog	2020-11-12 02:04:28 UTC (rev 269712)
+++ trunk/Tools/ChangeLog	2020-11-12 02:34:10 UTC (rev 269713)
@@ -1,3 +1,16 @@
+2020-11-11  Sam Weinig  <wei...@apple.com>
+
+        Move more WebKitLegacy preferences bound to Settings to WebPreferences.yaml
+        https://bugs.webkit.org/show_bug.cgi?id=218826
+
+        Reviewed by Tim Horton.
+
+        * DumpRenderTree/TestOptions.cpp:
+        (WTR::TestOptions::defaults):
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (resetWebPreferencesToConsistentValues):
+        Switch to using TestOptions for ShrinksStandaloneImagesToFit now that it is supported.
+
 2020-11-11  John Wilander  <wilan...@apple.com>
 
         PCM: Change from ad-click-attribution to private-click-measurement (in all forms, including .well-known URL)

Modified: trunk/Tools/DumpRenderTree/TestOptions.cpp (269712 => 269713)


--- trunk/Tools/DumpRenderTree/TestOptions.cpp	2020-11-12 02:04:28 UTC (rev 269712)
+++ trunk/Tools/DumpRenderTree/TestOptions.cpp	2020-11-12 02:34:10 UTC (rev 269713)
@@ -99,6 +99,7 @@
             { "RequestIdleCallbackEnabled", false },
             { "ResizeObserverEnabled", false },
             { "SelectionAcrossShadowBoundariesEnabled", true },
+            { "ShrinksStandaloneImagesToFit", true },
             { "SpatialNavigationEnabled", false },
             { "TabsToLinks", false },
             { "TelephoneNumberParsingEnabled", false },

Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (269712 => 269713)


--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2020-11-12 02:04:28 UTC (rev 269712)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2020-11-12 02:34:10 UTC (rev 269713)
@@ -882,7 +882,6 @@
     [preferences setSansSerifFontFamily:@"Helvetica"];
     [preferences setSelectionAcrossShadowBoundariesEnabled:YES];
     [preferences setSerifFontFamily:@"Times"];
-    [preferences setShrinksStandaloneImagesToFit:YES];
     [preferences setSourceBufferChangeTypeEnabled:YES];
     [preferences setStandardFontFamily:@"Times"];
     [preferences setSubpixelAntialiasedLayerTextEnabled:NO];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to