Use WebPreference definitions from shared configuration files in WebCore (Part 1)
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Oct 2020 19:49:55 +0000 (19:49 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Oct 2020 19:49:55 +0000 (19:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=217551

Reviewed by Darin Adler.

Source/WebCore:

This begins using the WebPreferences*.yaml files for the generation of
WebCore's Settings and InternalSettings classes. In this first part, we
only are moving settings that already exist in the WebPreferences*.yaml
files. A subsequent change will migrate the remaining additional settings
over.

* Configurations/WebCore.xcconfig:
Add variable (already used by WebKit) to access the WTF build scripts
directory for access to the WebPreferences*.yaml files in DerivedSources.make

* DerivedSources-input.xcfilelist:
Update with new input files, the WebPreferences*.yaml files.

* WebCoreMacros.cmake:
* DerivedSources.make:
Update GenerateSettings.rb call with new parameters.

* Scripts/GenerateSettings.rb:
Adds support for generating Settings based on preferences in the
WebPreferences*.yaml files while maintaining support for the additional
settings from Settings.yaml. Adds support for a new key, 'webcoreImplementation'
to continue supporting custom implementations in SettingsBase.

* Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb:
* Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb:
* Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb:
* Scripts/SettingsTemplates/Settings.cpp.erb:
* Scripts/SettingsTemplates/Settings.h.erb:
Update to account for new names (@allSettingsSet) and differentiation
between custom and non-custom implementations.

* editing/EditorCommand.cpp:
* page/Frame.cpp:
Update for new name. DOMPasteAllowed -> domPasteAllowed, which matches convention.

* page/Settings.yaml:
Moved settings that were bound by WebPreferences to WebPreferences. Sorted remaining
ones left.

* page/SettingsDefaultValues.h:
Remove defaults that were the same on all platforms. These are now hardcoded in
WebPreferences.

* style/StyleFontSizeFunctions.cpp:
(WebCore::Style::fontSizeForKeyword):
Add explicit type, now that minimumLogicalFontSize is a double, not an int in WebCore
(it was already a double at the WebKit/WebKitLegacy level).

Source/WebKit:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::sendViewportAttributesChanged):
Add explicit type to support layoutFallbackWidth now being an unsigned int
in Settings (it was already an unsigned int at the WebKit level).

Source/WTF:

This begins using the WebPreferences*.yaml files for the generation of
WebCore's Settings and InternalSettings classes. In this first part, we
only are moving settings that already exist in the WebPreferences*.yaml
files. A subsequent change will migrate the remaining additional settings
over.

To do this we must add default values for 'WebCore', which are unfortunately
still needed for things like the empty client based SVGImage and sanitizing
web content functionality. We only need default WebCore values for preferences
that are bound to WebCore::Settings. It would be good to eliminate the need
for these eventually, but that is not a goal of this change.

This also adds some new keys from WebCore's Settings.yaml:
- 'webcoreOnChange: *' called by WebCore::Settings when the setting changes.
- 'inspectorOverride: true' used to allow the inspector to override the setting.
- 'webcoreImplementation: custom' used to indicate that WebCore::SettingsBase
  implements the setting.
- 'webcoreGetter: *' used to provide an alternate name for the getter in WebCore::Settings.
- 'webcoreExcludeFromInternalSettings: true' used to exclude from WebCore's InternalSettings
  bindings.

* Scripts/GeneratePreferences.rb:
Adds check that if the preference is bound to WebCore, it includes defaults for all
three front generators, 'WebKit', WebKitLegacy', and 'WebCore'.

* Scripts/Preferences/WebPreferences.yaml:
* Scripts/Preferences/WebPreferencesDebug.yaml:
* Scripts/Preferences/WebPreferencesExperimental.yaml:
* Scripts/Preferences/WebPreferencesInternal.yaml:
Migrates defaults and additional keys from Settings.yaml.

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

26 files changed:
Source/WTF/ChangeLog
Source/WTF/Scripts/GeneratePreferences.rb
Source/WTF/Scripts/Preferences/WebPreferences.yaml
Source/WTF/Scripts/Preferences/WebPreferencesDebug.yaml
Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml
Source/WebCore/ChangeLog
Source/WebCore/Configurations/WebCore.xcconfig
Source/WebCore/DerivedSources-input.xcfilelist
Source/WebCore/DerivedSources.make
Source/WebCore/Scripts/GenerateSettings.rb
Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb
Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb
Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb
Source/WebCore/Scripts/SettingsTemplates/Settings.cpp.erb
Source/WebCore/Scripts/SettingsTemplates/Settings.h.erb
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/WebCoreMacros.cmake
Source/WebCore/editing/EditorCommand.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/Settings.yaml
Source/WebCore/page/SettingsDefaultValues.h
Source/WebCore/style/StyleFontSizeFunctions.cpp
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit/WebProcess/WebPage/WebPage.cpp

index 7bde3cc84f41e063f229391af82a870777494717..14ff3185098dd10a72876dbf27b694076efa99e1 100644 (file)
@@ -1,3 +1,41 @@
+2020-10-10  Sam Weinig  <weinig@apple.com>
+
+        Use WebPreference definitions from shared configuration files in WebCore (Part 1)
+        https://bugs.webkit.org/show_bug.cgi?id=217551
+
+        Reviewed by Darin Adler.
+
+        This begins using the WebPreferences*.yaml files for the generation of 
+        WebCore's Settings and InternalSettings classes. In this first part, we 
+        only are moving settings that already exist in the WebPreferences*.yaml 
+        files. A subsequent change will migrate the remaining additional settings
+        over.
+
+        To do this we must add default values for 'WebCore', which are unfortunately
+        still needed for things like the empty client based SVGImage and sanitizing 
+        web content functionality. We only need default WebCore values for preferences 
+        that are bound to WebCore::Settings. It would be good to eliminate the need
+        for these eventually, but that is not a goal of this change.
+
+        This also adds some new keys from WebCore's Settings.yaml:
+        - 'webcoreOnChange: *' called by WebCore::Settings when the setting changes.
+        - 'inspectorOverride: true' used to allow the inspector to override the setting.
+        - 'webcoreImplementation: custom' used to indicate that WebCore::SettingsBase 
+          implements the setting.
+        - 'webcoreGetter: *' used to provide an alternate name for the getter in WebCore::Settings.
+        - 'webcoreExcludeFromInternalSettings: true' used to exclude from WebCore's InternalSettings
+          bindings.
+
+        * Scripts/GeneratePreferences.rb:
+        Adds check that if the preference is bound to WebCore, it includes defaults for all
+        three front generators, 'WebKit', WebKitLegacy', and 'WebCore'.
+
+        * Scripts/Preferences/WebPreferences.yaml:
+        * Scripts/Preferences/WebPreferencesDebug.yaml:
+        * Scripts/Preferences/WebPreferencesExperimental.yaml:
+        * Scripts/Preferences/WebPreferencesInternal.yaml:
+        Migrates defaults and additional keys from Settings.yaml.
+
 2020-10-09  Keith Miller  <keith_miller@apple.com>
 
         Finalizers shouldn't run if events can't fire
index 8fa2e1d0996fdb9e9b79d64da1a86f2cdf9bdf7e..e26e60df1f7528975c00f54f7c5cecbe178c5129 100644 (file)
@@ -201,6 +201,9 @@ class Preferences
     result = []
     if parsedPreferences
       parsedPreferences.each do |name, options|
+        if !options["webcoreBinding"] && options["defaultValue"].size != 3
+          raise "ERROR: Preferences bound to WebCore::Settings must have default values for all frontends: #{name}"
+        end
         if !options["exposed"] or options["exposed"].include?(@frontend)
           preference = Preference.new(name, options, @frontend)
           @preferences << preference
index aee36b257f4eb5c7fb8db2211ca69ee66b66a68c..ed47cf16831ea8d2071ad0274fbf200a26f6814b 100644 (file)
@@ -51,14 +51,19 @@ Accelerated2dCanvasEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 AcceleratedCompositingEnabled:
   type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   defaultValue:
     WebKitLegacy:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 AggressiveTileRetentionEnabled:
   type: bool
@@ -67,6 +72,8 @@ AggressiveTileRetentionEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 AllowCrossOriginSubresourcesToAskForCredentials:
   type: bool
@@ -75,6 +82,8 @@ AllowCrossOriginSubresourcesToAskForCredentials:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 AllowFileAccessFromFileURLs:
   type: bool
@@ -83,6 +92,8 @@ AllowFileAccessFromFileURLs:
       default: true
     WebKit:
       default: false
+    WebCore:
+      default: true
 
 AllowMediaContentTypesRequiringHardwareSupportAsFallback:
   type: bool
@@ -94,6 +105,8 @@ AllowMediaContentTypesRequiringHardwareSupportAsFallback:
     WebKit:
       "PLATFORM(COCOA)": true
       default: false
+    WebCore:
+      default: false
 
 AllowMultiElementImplicitSubmission:
   type: bool
@@ -103,6 +116,8 @@ AllowMultiElementImplicitSubmission:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 AllowSettingAnyXHRHeaderFromFileURLs:
   type: bool
@@ -111,6 +126,8 @@ AllowSettingAnyXHRHeaderFromFileURLs:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 AllowTopNavigationToDataURLs:
   type: bool
@@ -119,6 +136,8 @@ AllowTopNavigationToDataURLs:
       default: true
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 AllowUniversalAccessFromFileURLs:
   type: bool
@@ -127,6 +146,8 @@ AllowUniversalAccessFromFileURLs:
       default: true
     WebKit:
       default: false
+    WebCore:
+      default: true
 
 AllowsAirPlayForMediaPlayback:
   type: bool
@@ -137,6 +158,8 @@ AllowsAirPlayForMediaPlayback:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 AllowsInlineMediaPlayback:
   type: bool
@@ -148,6 +171,10 @@ AllowsInlineMediaPlayback:
     WebKit:
       "PLATFORM(IOS_FAMILY)": false
       default: true
+    WebCore:
+      default: true
+    WebCore:
+      default: defaultAllowsInlineMediaPlayback
 
 AllowsInlineMediaPlaybackAfterFullscreen:
   type: bool
@@ -158,6 +185,8 @@ AllowsInlineMediaPlaybackAfterFullscreen:
     WebKit:
       "PLATFORM(IOS_FAMILY)": true
       default: false
+    WebCore:
+      default: true
 
 AllowsPictureInPictureMediaPlayback:
   type: bool
@@ -168,6 +197,8 @@ AllowsPictureInPictureMediaPlayback:
     WebKit:
       "PLATFORM(IOS_FAMILY)": true
       default: false
+    WebCore:
+      default: true
 
 AlwaysUseAcceleratedOverflowScroll:
   type: bool
@@ -176,6 +207,8 @@ AlwaysUseAcceleratedOverflowScroll:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 AnimatedImageAsyncDecodingEnabled:
   type: bool
@@ -184,6 +217,8 @@ AnimatedImageAsyncDecodingEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely (though we should still set the default value to false when initializing settings).
 ApplePayCapabilityDisclosureAllowed:
@@ -194,6 +229,8 @@ ApplePayCapabilityDisclosureAllowed:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely (though we should still set the default value to false when initializing settings).
 ApplePayEnabled:
@@ -206,6 +243,8 @@ ApplePayEnabled:
     WebKit:
       "ENABLE(APPLE_PAY_REMOTE_UI)": true
       default: false
+    WebCore:
+      default: defaultApplePayEnabled
 
 ArtificialPluginInitializationDelayEnabled:
   type: bool
@@ -238,6 +277,8 @@ AsynchronousSpellCheckingEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 AttachmentElementEnabled:
   type: bool
@@ -252,11 +293,15 @@ AttachmentElementEnabled:
 AuthorAndUserStylesEnabled:
   type: bool
   webKitLegacyPreferenceKey: WebKitAuthorAndUserStylesEnabledPreferenceKey
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
+  inspectorOverride: true
   defaultValue:
     WebKitLegacy:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 AutostartOriginPlugInSnapshottingEnabled:
   type: bool
@@ -265,6 +310,8 @@ AutostartOriginPlugInSnapshottingEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 BackForwardCacheSupportsPlugins:
   type: bool
@@ -274,6 +321,8 @@ BackForwardCacheSupportsPlugins:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 BackspaceKeyNavigationEnabled:
   type: bool
@@ -284,6 +333,8 @@ BackspaceKeyNavigationEnabled:
     WebKit:
       "PLATFORM(IOS_FAMILY)": false
       default: true
+    WebCore:
+      default: true
 
 # FIXME: This is on by default in WebKit2. Perhaps we should consider turning it on for WebKitLegacy as well.
 BeaconAPIEnabled:
@@ -295,6 +346,8 @@ BeaconAPIEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 # FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely (though we should still set the default value to false when initializing settings).
 CacheAPIEnabled:
@@ -314,6 +367,8 @@ CanvasUsesAcceleratedDrawing:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 CaretBrowsingEnabled:
   type: bool
@@ -322,15 +377,21 @@ CaretBrowsingEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ColorFilterEnabled:
   type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   defaultValue:
     WebKitLegacy:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
+# FIXME: This needs a more clear name to explain that it is a CSS related preference. (Maybe we need namespacing? CSS.ConstantPropertiesEnabled?)
 ConstantPropertiesEnabled:
   type: bool
   defaultValue:
@@ -338,6 +399,8 @@ ConstantPropertiesEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 ContentChangeObserverEnabled:
   type: bool
@@ -347,6 +410,8 @@ ContentChangeObserverEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: defaultContentChangeObserverEnabled()
 
 # FIXME: This is handled via WebView SPI rather than WebPreferences for WebKitLegacy. We should change the SPI to lookup the WebPreferences value instead.
 CookieEnabled:
@@ -355,10 +420,15 @@ CookieEnabled:
   defaultValue:
     WebKit:
       default: true
+    WebKitLegacy:
+      default: true
+    WebCore:
+      default: true
 
 CursiveFontFamily:
   type: String
   webKitLegacyPreferenceKey: WebKitCursiveFont
+  webcoreImplementation: custom
   defaultValue:
     WebKitLegacy:
       "PLATFORM(IOS_FAMILY)": '"Snell Roundhand"'
@@ -367,6 +437,8 @@ CursiveFontFamily:
       "PLATFORM(COCOA) && PLATFORM(IOS_FAMILY)": '"Snell Roundhand"'
       "PLATFORM(COCOA) && !PLATFORM(IOS_FAMILY)": '"Apple Chancery"'
       default: '"Comic Sans MS"'
+    WebCore:
+      default: '""'
 
 CustomPasteboardDataEnabled:
   type: bool
@@ -382,11 +454,14 @@ CustomPasteboardDataEnabled:
   
 DNSPrefetchingEnabled:
   type: bool
+  webcoreOnChange: dnsPrefetchingEnabledChanged
   defaultValue:
     WebKitLegacy:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 DOMPasteAllowed:
   type: bool
@@ -396,6 +471,8 @@ DOMPasteAllowed:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 DOMTimersThrottlingEnabled:
   type: bool
@@ -405,6 +482,8 @@ DOMTimersThrottlingEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 # FIXME: There is no custom binding implemented for WebKitLegacy.
 DataDetectorTypes:
@@ -427,6 +506,8 @@ DataTransferItemsEnabled:
     WebKit:
       "PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)": true
       default: false
+    WebCore:
+      default: false
 
 DatabasesEnabled:
   type: bool
@@ -440,19 +521,25 @@ DatabasesEnabled:
 
 DefaultFixedFontSize:
   type: double
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   defaultValue:
     WebKitLegacy:
       default: 13
     WebKit:
       default: 13
+    WebCore:
+      default: 13
 
 DefaultFontSize:
   type: double
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   defaultValue:
     WebKitLegacy:
       default: 16
     WebKit:
       default: 16
+    WebCore:
+      default: 16
 
 DefaultTextEncodingName:
   type: String
@@ -461,6 +548,8 @@ DefaultTextEncodingName:
       default: '"ISO-8859-1"'
     WebKit:
       default: WebCore::defaultTextEncodingNameForSystemLanguage()
+    WebCore:
+      default:
 
 DeferredCSSParserEnabled:
   type: bool
@@ -469,6 +558,8 @@ DeferredCSSParserEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 DeviceHeight:
   type: uint32_t
@@ -477,6 +568,8 @@ DeviceHeight:
       default: 0
     WebKit:
       default: 0
+    WebCore:
+      default: 0
 
 DeviceOrientationEventEnabled:
   type: bool
@@ -486,6 +579,8 @@ DeviceOrientationEventEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 DeviceOrientationPermissionAPIEnabled:
   type: bool
@@ -495,6 +590,8 @@ DeviceOrientationPermissionAPIEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 DeviceWidth:
   type: uint32_t
@@ -503,6 +600,8 @@ DeviceWidth:
       default: 0
     WebKit:
       default: 0
+    WebCore:
+      default: 0
 
 DiagnosticLoggingEnabled:
   type: bool
@@ -511,6 +610,8 @@ DiagnosticLoggingEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 DirectoryUploadEnabled:
   type: bool
@@ -532,6 +633,8 @@ DisabledAdaptationsMetaTagEnabled:
     WebKit:
       "PLATFORM(WATCHOS)": true
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This is on by default in WebKit2. Perhaps we should consider turning it on for WebKitLegacy as well.
 DownloadAttributeEnabled:
@@ -542,6 +645,8 @@ DownloadAttributeEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 EditableLinkBehavior:
   type: uint32_t
@@ -559,6 +664,8 @@ EnableInheritURIQueryComponent:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 EncryptedMediaAPIEnabled:
   type: bool
@@ -568,6 +675,8 @@ EncryptedMediaAPIEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 EnumeratingAllNetworkInterfacesEnabled:
   type: bool
@@ -584,26 +693,34 @@ FTPDirectoryTemplatePath:
       default: '""'
     WebKit:
       default: '""'
+    WebCore:
+      default: '""'
 
 FantasyFontFamily:
   type: String
   webKitLegacyPreferenceKey: WebKitFantasyFont
+  webcoreImplementation: custom
   defaultValue:
     WebKitLegacy:
       default: '"Papyrus"'
     WebKit:
       "PLATFORM(COCOA)": '"Papyrus"'
       default: '"Impact"'
+    WebCore:
+      default: '""'
 
 FixedFontFamily:
   type: String
   webKitLegacyPreferenceKey: WebKitFixedFont
+  webcoreImplementation: custom
   defaultValue:
     WebKitLegacy:
       default: '"Courier"'
     WebKit:
       "PLATFORM(COCOA)": '"Courier"'
       default: '"Courier New"'
+    WebCore:
+      default: '""'
 
 ForceCompositingMode:
   type: bool
@@ -620,6 +737,8 @@ ForceFTPDirectoryListings:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ForceUpdateScrollbarsOnMainThreadForPerformanceTesting:
   type: bool
@@ -628,6 +747,8 @@ ForceUpdateScrollbarsOnMainThreadForPerformanceTesting:
       default: false
     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.
@@ -660,6 +781,8 @@ GamepadsEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 HTTPEquivEnabled:
   type: bool
@@ -669,32 +792,43 @@ HTTPEquivEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 HiddenPageCSSAnimationSuspensionEnabled:
   type: bool
+  webcoreOnChange: hiddenPageCSSAnimationSuspensionEnabledChanged
   defaultValue:
     WebKitLegacy:
       default: true
     WebKit:
       "PLATFORM(COCOA) || PLATFORM(GTK)": true
       default: false
+    WebCore:
+      default: false
 
 HiddenPageDOMTimerThrottlingAutoIncreases:
   type: bool
+  webcoreOnChange: hiddenPageDOMTimerThrottlingStateChanged
   defaultValue:
     WebKitLegacy:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 HiddenPageDOMTimerThrottlingEnabled:
   type: bool
+  webcoreOnChange: hiddenPageDOMTimerThrottlingStateChanged
   defaultValue:
     WebKitLegacy:
       default: false
     WebKit:
       "PLATFORM(COCOA) || PLATFORM(GTK)": true
       default: false
+    WebCore:
+      default: false
 
 HyperlinkAuditingEnabled:
   type: bool
@@ -703,6 +837,8 @@ HyperlinkAuditingEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 ImageControlsEnabled:
   type: bool
@@ -712,6 +848,8 @@ ImageControlsEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 InactiveMediaCaptureSteamRepromptIntervalInMinutes:
   type: double
@@ -729,6 +867,8 @@ IncompleteImageBorderEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 IncrementalRenderingSuppressionTimeout:
   type: double
@@ -739,6 +879,8 @@ IncrementalRenderingSuppressionTimeout:
       default: 5
     WebKit:
       default: 5
+    WebCore:
+      default: 5
 
 InlineMediaPlaybackRequiresPlaysInlineAttribute:
   type: bool
@@ -749,6 +891,8 @@ InlineMediaPlaybackRequiresPlaysInlineAttribute:
     WebKit:
       "PLATFORM(IOS_FAMILY)": true
       default: false
+    WebCore:
+      default: defaultInlineMediaPlaybackRequiresPlaysInlineAttribute
 
 InputEventsEnabled:
   type: bool
@@ -759,6 +903,8 @@ InputEventsEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 InspectorAdditionsEnabled:
   type: bool
@@ -820,6 +966,10 @@ InteractiveFormValidationEnabled:
   defaultValue:
     WebKit:
       default: true
+    WebKitLegacy:
+      default: false
+    WebCore:
+      default: false
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely (though we should still set the default value to false when initializing settings).
 InterruptAudioOnPageVisibilityChangeEnabled:
@@ -830,6 +980,8 @@ InterruptAudioOnPageVisibilityChangeEnabled:
       default: false
     WebKit:
       default: WebCore::RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange()
+    WebCore:
+      default: false
 
 InvisibleAutoplayNotPermitted:
   type: bool
@@ -840,6 +992,8 @@ InvisibleAutoplayNotPermitted:
     WebKit:
       "PLATFORM(IOS_FAMILY)": true
       default: false
+    WebCore:
+      default: false
 
 IsAccessibilityIsolatedTreeEnabled:
   type: bool
@@ -852,6 +1006,8 @@ IsAccessibilityIsolatedTreeEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely (though we should still set the default value to false when initializing settings).
 ItpDebugModeEnabled:
@@ -867,20 +1023,26 @@ ItpDebugModeEnabled:
 
 JavaEnabled:
   type: bool
+  webcoreGetter: isJavaEnabled
   defaultValue:
     WebKitLegacy:
       "PLATFORM(IOS_FAMILY)": false
       default: true
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 JavaEnabledForLocalFiles:
   type: bool
+  webcoreGetter: isJavaEnabledForLocalFiles
   defaultValue:
     WebKitLegacy:
       default: true
     WebKit:
       default: false
+    WebCore:
+      default: true
 
 JavaScriptCanAccessClipboard:
   type: bool
@@ -889,6 +1051,8 @@ JavaScriptCanAccessClipboard:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 JavaScriptCanOpenWindowsAutomatically:
   type: bool
@@ -899,16 +1063,23 @@ JavaScriptCanOpenWindowsAutomatically:
     WebKit:
       "PLATFORM(IOS_FAMILY)": false
       default: true
-  
+    WebCore:
+      default: false
+
 JavaScriptEnabled:
   type: bool
+  inspectorOverride: true
+  webcoreGetter: isScriptEnabled
   webcoreName: scriptEnabled
   defaultValue:
     WebKitLegacy:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: false
 
+# NOTE: Clients should use per-navigation "allowsContentJavaScript" policies instead
 JavaScriptMarkupEnabled:
   type: bool
   webcoreName: scriptMarkupEnabled
@@ -917,6 +1088,8 @@ JavaScriptMarkupEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 JavaScriptRuntimeFlags:
   type: uint32_t
@@ -935,6 +1108,8 @@ LargeImageAsyncDecodingEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 LayoutFallbackWidth:
   type: uint32_t
@@ -943,16 +1118,21 @@ LayoutFallbackWidth:
       default: 980
     WebKit:
       default: 980
+    WebCore:
+      default: 980
 
 LayoutViewportHeightExpansionFactor:
   type: double
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   defaultValue:
     WebKitLegacy:
       default: 0
     WebKit:
       "PLATFORM(WATCHOS)": 1
       default: 0
-  
+    WebCore:
+      default: 0
+
 LegacyEncryptedMediaAPIEnabled:
   type: bool
   humanReadableName: "Enable Legacy EME API"
@@ -963,6 +1143,8 @@ LegacyEncryptedMediaAPIEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 LinkPreconnect:
   type: bool
@@ -973,6 +1155,8 @@ LinkPreconnect:
     WebKit:
       "ENABLE(SERVER_PRECONNECT)": true
       default: false
+    WebCore:
+      default: false
 
 LinkPreloadEnabled:
   type: bool
@@ -981,16 +1165,24 @@ LinkPreloadEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: true
 
+# This only suppresses the network load of the image URL. A cached image will still be rendered if requested.
 LoadsImagesAutomatically:
   type: bool
+  webcoreOnChange: imagesEnabledChanged
   webKitLegacyPreferenceKey: WebKitDisplayImagesKey
   defaultValue:
     WebKitLegacy:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: false
 
+# This preference only affects site icon image loading if the LoadsImagesAutomatically preference is false and
+# this preference is true. All other permutations still heed LoadsImagesAutomatically preference.
 LoadsSiteIconsIgnoringImageLoadingPreference:
   type: bool
   webKitLegacyPreferenceKey: WebKitLoadSiteIconsKey
@@ -1000,6 +1192,8 @@ LoadsSiteIconsIgnoringImageLoadingPreference:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 LocalFileContentSniffingEnabled:
   type: bool
@@ -1009,6 +1203,8 @@ LocalFileContentSniffingEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 LocalStorageEnabled:
   type: bool
@@ -1018,6 +1214,8 @@ LocalStorageEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 LongRunningMediaCaptureStreamRepromptIntervalInHours:
   type: double
@@ -1043,6 +1241,8 @@ MainContentUserGestureOverrideEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 MaxParseDuration:
   type: double
@@ -1052,6 +1252,8 @@ MaxParseDuration:
       default: -1
     WebKit:
       default: -1
+    WebCore:
+      default: -1
 
 MediaCapabilitiesEnabled:
   type: bool
@@ -1060,14 +1262,20 @@ MediaCapabilitiesEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 MediaContentTypesRequiringHardwareSupport:
   type: String
+  webcoreExcludeFromInternalSettings: true
+  webcoreImplementation: custom
   defaultValue:
     WebKitLegacy:
       default: '""'
     WebKit:
       default: '""'
+    WebCore:
+      default: '""'
 
 MediaControlsScaleWithPageZoom:
   type: bool
@@ -1078,7 +1286,9 @@ MediaControlsScaleWithPageZoom:
     WebKit:
       "PLATFORM(IOS_FAMILY)": false
       default: true
-  
+    WebCore:
+      default: true
+
 MediaDataLoadsAutomatically:
   type: bool
   defaultValue:
@@ -1088,6 +1298,8 @@ MediaDataLoadsAutomatically:
     WebKit:
       "PLATFORM(IOS_FAMILY)": false
       default: true
+    WebCore:
+      default: defaultMediaDataLoadsAutomatically
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely (though we should still set the default value to false when initializing settings).
 MediaDevicesEnabled:
@@ -1098,6 +1310,8 @@ MediaDevicesEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 MediaEnabled:
   type: bool
@@ -1107,6 +1321,8 @@ MediaEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: defaultMediaEnabled
 
 MediaPreloadingEnabled:
   type: bool
@@ -1115,6 +1331,8 @@ MediaPreloadingEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 MediaSourceEnabled:
   type: bool
@@ -1126,8 +1344,11 @@ MediaSourceEnabled:
       "PLATFORM(COCOA) && PLATFORM(MAC)": true
       "PLATFORM(COCOA) && !PLATFORM(MAC)": false
       default: true
+    WebCore:
+      default: platformDefaultMediaSourceEnabled()
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely (though we should still set the default value to false when initializing settings).
+# FIXME: Seems to be unused. Remove once verified.
 MediaStreamEnabled:
   type: bool
   condition: ENABLE(MEDIA_STREAM)
@@ -1136,6 +1357,8 @@ MediaStreamEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 MediaUserGestureInheritsFromDocument:
   type: bool
@@ -1144,6 +1367,8 @@ MediaUserGestureInheritsFromDocument:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 MenuItemElementEnabled:
   type: bool
@@ -1156,19 +1381,25 @@ MenuItemElementEnabled:
 
 MinimumFontSize:
   type: double
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   defaultValue:
     WebKitLegacy:
       default: 0
     WebKit:
       default: 0
+    WebCore:
+      default: 0
 
 MinimumLogicalFontSize:
   type: double
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   defaultValue:
     WebKitLegacy:
       default: 9
     WebKit:
       default: 9
+    WebCore:
+      default: 0
 
 MinimumZoomFontSize:
   type: double
@@ -1180,6 +1411,8 @@ MinimumZoomFontSize:
     WebKit:
       "PLATFORM(WATCHOS)": 30
       default: 15
+    WebCore:
+      default: defaultMinimumZoomFontSize()
 
 MockCaptureDevicesPromptEnabled:
   type: bool
@@ -1213,11 +1446,14 @@ ModernMediaControlsEnabled:
 NeedsSiteSpecificQuirks:
   type: bool
   webKitLegacyPreferenceKey: WebKitUseSiteSpecificSpoofing
+  inspectorOverride: true
   defaultValue:
     WebKitLegacy:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 NeedsStorageAccessFromFileURLsQuirk:
   type: bool
@@ -1226,6 +1462,8 @@ NeedsStorageAccessFromFileURLsQuirk:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 NotificationsEnabled:
   type: bool
@@ -1235,6 +1473,8 @@ NotificationsEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 OfflineWebApplicationCacheEnabled:
   type: bool
@@ -1243,6 +1483,8 @@ OfflineWebApplicationCacheEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 PDFPluginEnabled:
   type: bool
@@ -1268,6 +1510,8 @@ PaginateDuringLayoutEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 PassiveTouchListenersAsDefaultOnDocument:
   type: bool
@@ -1278,6 +1522,8 @@ PassiveTouchListenersAsDefaultOnDocument:
     WebKit:
       "PLATFORM(IOS_FAMILY)": WebKit::defaultPassiveTouchListenersAsDefaultOnDocument()
       default: true
+    WebCore:
+      default: true
 
 PasswordEchoDuration:
   type: double
@@ -1289,6 +1535,8 @@ PasswordEchoDuration:
       default: 1
     WebKit:
       default: 2
+    WebCore:
+      default: 1
 
 PasswordEchoEnabled:
   type: bool
@@ -1300,6 +1548,8 @@ PasswordEchoEnabled:
     WebKit:
       "PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)": true
       default: false
+    WebCore:
+      default: false
 
 PeerConnectionEnabled:
   type: bool
@@ -1314,6 +1564,7 @@ PeerConnectionEnabled:
 PictographFontFamily:
   type: String
   webKitLegacyPreferenceKey: WebKitPictographFont
+  webcoreImplementation: custom
   defaultValue:
     WebKitLegacy:
       "PLATFORM(IOS_FAMILY)": '"AppleColorEmoji"'
@@ -1322,6 +1573,8 @@ PictographFontFamily:
       "PLATFORM(COCOA) && PLATFORM(IOS_FAMILY)": '"AppleColorEmoji"'
       "PLATFORM(COCOA) && !PLATFORM(IOS_FAMILY)": '"Apple Color Emoji"'
       default: '"Times"'
+    WebCore:
+      default: '""'
 
 PictureInPictureAPIEnabled:
   type: bool
@@ -1331,6 +1584,8 @@ PictureInPictureAPIEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 PlugInSnapshottingEnabled:
   type: bool
@@ -1339,14 +1594,20 @@ PlugInSnapshottingEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 PluginsEnabled:
   type: bool
+  webcoreGetter: arePluginsEnabled
+  webcoreOnChange: pluginsEnabledChanged
   defaultValue:
     WebKitLegacy:
       default: true
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 PrimaryPlugInSnapshotDetectionEnabled:
   type: bool
@@ -1355,14 +1616,19 @@ PrimaryPlugInSnapshotDetectionEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 PunchOutWhiteBackgroundsInDarkMode:
   type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   defaultValue:
     WebKitLegacy:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 RequestAnimationFrameEnabled:
   type: bool
@@ -1371,6 +1637,8 @@ RequestAnimationFrameEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 RequiresUserGestureForAudioPlayback:
   type: bool
@@ -1411,6 +1679,8 @@ RequiresUserGestureToLoadVideo:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: defaultRequiresUserGestureToLoadVideo
   
 SafeBrowsingEnabled:
   type: bool
@@ -1423,11 +1693,14 @@ SafeBrowsingEnabled:
 SansSerifFontFamily:
   type: String
   webKitLegacyPreferenceKey: WebKitSansSerifFont
+  webcoreImplementation: custom
   defaultValue:
     WebKitLegacy:
       default: '"Helvetica"'
     WebKit:
       default: '"Helvetica"'
+    WebCore:
+      default: '""'
 
 ScrollAnimatorEnabled:
   type: bool
@@ -1437,10 +1710,13 @@ ScrollAnimatorEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely (though we should still set the default value to false when initializing settings).
 ScrollingPerformanceLoggingEnabled:
   type: bool
+  webcoreOnChange: scrollingPerformanceLoggingEnabledChanged
   webcoreBinding: custom
   defaultValue:
     WebKitLegacy:
@@ -1455,6 +1731,10 @@ SelectTrailingWhitespaceEnabled:
   defaultValue:
     WebKit:
       default: false
+    WebKitLegacy:
+      default: false
+    WebCore:
+      default: false
 
 SelectionPaintingWithoutSelectionGapsEnabled:
   type: bool
@@ -1463,15 +1743,20 @@ SelectionPaintingWithoutSelectionGapsEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 SerifFontFamily:
   type: String
   webKitLegacyPreferenceKey: WebKitSerifFont
+  webcoreImplementation: custom
   defaultValue:
     WebKitLegacy:
       default: '"Times"'
     WebKit:
       default: '"Times"'
+    WebCore:
+      default: '""'
 
 ServiceControlsEnabled:
   type: bool
@@ -1481,6 +1766,8 @@ ServiceControlsEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ServiceWorkerEntitlementDisabledForTesting:
   type: bool
@@ -1492,11 +1779,14 @@ ServiceWorkerEntitlementDisabledForTesting:
 
 ShouldAllowUserInstalledFonts:
   type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   defaultValue:
     WebKitLegacy:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 ShouldConvertPositionStyleOnCopy:
   type: bool
@@ -1505,6 +1795,8 @@ ShouldConvertPositionStyleOnCopy:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ShouldDecidePolicyBeforeLoadingQuickLookPreview:
   type: bool
@@ -1513,6 +1805,8 @@ ShouldDecidePolicyBeforeLoadingQuickLookPreview:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ShouldDisplayCaptions:
   type: bool
@@ -1522,6 +1816,8 @@ ShouldDisplayCaptions:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ShouldDisplaySubtitles:
   type: bool
@@ -1531,6 +1827,8 @@ ShouldDisplaySubtitles:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ShouldDisplayTextDescriptions:
   type: bool
@@ -1540,15 +1838,20 @@ ShouldDisplayTextDescriptions:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ShouldEnableTextAutosizingBoost:
   type: bool
+  webcoreOnChange: shouldEnableTextAutosizingBoostChanged
   condition: ENABLE(TEXT_AUTOSIZING)
   defaultValue:
     WebKitLegacy:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely (though we should still set the default value to false when initializing settings).
 ShouldIgnoreMetaViewport:
@@ -1558,6 +1861,8 @@ ShouldIgnoreMetaViewport:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ShouldPrintBackgrounds:
   type: bool
@@ -1569,6 +1874,8 @@ ShouldPrintBackgrounds:
     WebKit:
       "PLATFORM(IOS_FAMILY)": true
       default: false
+    WebCore:
+      default: false
 
 ShouldRespectImageOrientation:
   type: bool
@@ -1579,6 +1886,8 @@ ShouldRespectImageOrientation:
     WebKit:
       "PLATFORM(IOS_FAMILY)": true
       default: false
+    WebCore:
+      default: defaultShouldRespectImageOrientation
 
 ShouldRestrictBaseURLSchemes:
   type: bool
@@ -1587,6 +1896,8 @@ ShouldRestrictBaseURLSchemes:
       default: WebKit::defaultShouldRestrictBaseURLSchemes()
     WebKit:
       default: false
+    WebCore:
+      default: true
 
 ShouldSuppressTextInputFromEditingDuringProvisionalNavigation:
   type: bool
@@ -1595,6 +1906,8 @@ ShouldSuppressTextInputFromEditingDuringProvisionalNavigation:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely (though we should still set the default value to false when initializing settings).
 # FIXME: This is not used in WebCore, so should not have a binding to WebCore::Settings.
@@ -1605,6 +1918,8 @@ ShouldUseServiceWorkerShortTimeout:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ShowsToolTipOverTruncatedText:
   type: bool
@@ -1613,6 +1928,8 @@ ShowsToolTipOverTruncatedText:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ShowsURLsInToolTipsEnabled:
   type: bool
@@ -1623,6 +1940,8 @@ ShowsURLsInToolTipsEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This is handled via WebView SPI rather than WebPreferences for WebKitLegacy. We should change the SPI to lookup the WebPreferences value instead.
 SmartInsertDeleteEnabled:
@@ -1631,6 +1950,10 @@ SmartInsertDeleteEnabled:
   defaultValue:
     WebKit:
       default: true
+    WebKitLegacy:
+      default: true
+    WebCore:
+      default: true
 
 SnapshotAllPlugIns:
   type: bool
@@ -1639,6 +1962,8 @@ SnapshotAllPlugIns:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 SourceBufferChangeTypeEnabled:
   type: bool
@@ -1648,6 +1973,8 @@ SourceBufferChangeTypeEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 SpatialNavigationEnabled:
   type: bool
@@ -1656,6 +1983,8 @@ SpatialNavigationEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 Standalone:
   type: bool
@@ -1665,16 +1994,21 @@ Standalone:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 StandardFontFamily:
   type: String
   webKitLegacyPreferenceKey: WebKitStandardFont
+  webcoreImplementation: custom
   defaultValue:
     WebKitLegacy:
       default: '"Times"'
     WebKit:
       "PLATFORM(WATCHOS)": '"system-ui"'
       default: '"Times"'
+    WebCore:
+      default: '""'
 
 StorageAccessAPIEnabled:
   type: bool
@@ -1683,9 +2017,12 @@ StorageAccessAPIEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 StorageBlockingPolicy:
   type: uint32_t
+  webcoreOnChange: storageBlockingPolicyChanged
   webcoreBinding: custom
   defaultValue:
     WebKitLegacy:
@@ -1700,6 +2037,8 @@ SubresourceIntegrityEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 SuppressesIncrementalRendering:
   type: bool
@@ -1708,6 +2047,8 @@ SuppressesIncrementalRendering:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: There is no custom binding implemented for WebKitLegacy.
 SystemLayoutDirection:
@@ -1728,6 +2069,8 @@ SystemPreviewEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This should be reconciled with 'TabsToLinks'.
 TabToLinksEnabled:
@@ -1758,6 +2101,8 @@ TelephoneNumberParsingEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 TemporaryTileCohortRetentionEnabled:
   type: bool
@@ -1767,18 +2112,24 @@ TemporaryTileCohortRetentionEnabled:
     WebKit:
       "PLATFORM(IOS_FAMILY)": false
       default: true
+    WebCore:
+      default: true
 
 TextAreasAreResizable:
   type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   defaultValue:
     WebKitLegacy:
       default: false
     WebKit:
       "PLATFORM(IOS_FAMILY)": false
       default: true
+    WebCore:
+      default: false
 
 TextAutosizingEnabled:
   type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   condition: ENABLE(TEXT_AUTOSIZING)
   defaultValue:
     WebKitLegacy:
@@ -1787,6 +2138,8 @@ TextAutosizingEnabled:
     WebKit:
       "PLATFORM(IOS_FAMILY)": true
       default: false
+    WebCore:
+      default: defaultTextAutosizingEnabled()
 
 ThreadedScrollingEnabled:
   type: bool
@@ -1803,6 +2156,8 @@ UseGiantTiles:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 UseLegacyTextAlignPositionedElementBehavior:
   type: bool
@@ -1811,6 +2166,8 @@ UseLegacyTextAlignPositionedElementBehavior:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: There is no custom binding implemented for WebKitLegacy.
 UserInterfaceDirectionPolicy:
@@ -1824,12 +2181,16 @@ UserInterfaceDirectionPolicy:
 
 UsesBackForwardCache:
   type: bool
+  webcoreOnChange: usesBackForwardCacheChanged
+  webcoreExcludeFromInternalSettings: true
   webKitLegacyPreferenceKey: WebKitUsesPageCachePreferenceKey
   defaultValue:
     WebKitLegacy:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 UsesEncodingDetector:
   type: bool
@@ -1838,6 +2199,8 @@ UsesEncodingDetector:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 VideoQualityIncludesDisplayCompositingEnabled:
   type: bool
@@ -1847,6 +2210,8 @@ VideoQualityIncludesDisplayCompositingEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ViewGestureDebuggingEnabled:
   type: bool
@@ -1865,6 +2230,8 @@ ViewportFitEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 WantsBalancedSetDefersLoadingBehavior:
   type: bool
@@ -1873,6 +2240,8 @@ WantsBalancedSetDefersLoadingBehavior:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 WebArchiveDebugModeEnabled:
   type: bool
@@ -1883,6 +2252,8 @@ WebArchiveDebugModeEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 WebAudioEnabled:
   type: bool
@@ -1893,6 +2264,8 @@ WebAudioEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 WebGLEnabled:
   type: bool
@@ -1901,14 +2274,19 @@ WebGLEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 WebSecurityEnabled:
   type: bool
+  inspectorOverride: true
   defaultValue:
     WebKitLegacy:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely (though we should still set the default value to false when initializing settings).
 WebShareEnabled:
@@ -1921,6 +2299,8 @@ WebShareEnabled:
     WebKit:
       "PLATFORM(COCOA) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)": true
       default: false
+    WebCore:
+      default: false
 
 XSSAuditorEnabled:
   type: bool
@@ -1929,3 +2309,5 @@ XSSAuditorEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: false
index 813c08f80910dcf6249e5d7e94922ce42a04c880..fb62b7ff1e2ec4f1dd4d766b5ce432f5fbfacf70 100644 (file)
@@ -29,28 +29,38 @@ AcceleratedDrawingEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 # FIXME: WebKit has an alternate name for this called 'ShowDebugBorders'. We should standardize on one name.
 CompositingBordersVisible:
   type: bool
   webKitLegacyPreferenceKey: WebKitShowDebugBorders
   webcoreName: showDebugBorders
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
+  inspectorOverride: true
   defaultValue:
     WebKitLegacy:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: WebKit has an alternate name for this called 'ShowRepaintCounter'. We should standardize on one name.
 CompositingRepaintCountersVisible:
   type: bool
   webKitLegacyPreferenceKey: WebKitShowRepaintCounter
   webcoreName: showRepaintCounter
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
+  inspectorOverride: true
   defaultValue:
     WebKitLegacy:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 DeveloperExtrasEnabled:
   type: bool
@@ -60,6 +70,8 @@ DeveloperExtrasEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: Starting the preference name with "Disable" is inconsistent with most other preferences and should be changed.
 DisableScreenSizeOverride:
@@ -71,6 +83,8 @@ DisableScreenSizeOverride:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 DisplayListDrawingEnabled:
   type: bool
@@ -79,6 +93,8 @@ DisplayListDrawingEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ForceAlwaysUserScalable:
   type: bool
@@ -96,8 +112,11 @@ LogsPageMessagesToSystemConsoleEnabled:
       default: false
     WebKit:
       default: false
+    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"
@@ -107,26 +126,35 @@ NeedsInAppBrowserPrivacyQuirks:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ResourceUsageOverlayVisible:
   type: bool
   condition: ENABLE(RESOURCE_USAGE)
+  webcoreOnChange: resourceUsageOverlayVisibleChanged
   defaultValue:
     WebKitLegacy:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 SimpleLineLayoutDebugBordersEnabled:
   type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   defaultValue:
     WebKitLegacy:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 SubpixelAntialiasedLayerTextEnabled:
   type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   defaultValue:
     WebKitLegacy:
       "PLATFORM(MAC)": true
@@ -134,6 +162,8 @@ SubpixelAntialiasedLayerTextEnabled:
     WebKit:
       "PLATFORM(MAC)": true
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
 TiledScrollingIndicatorVisible:
@@ -144,12 +174,17 @@ TiledScrollingIndicatorVisible:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 VisibleDebugOverlayRegions:
   type: uint32_t
+  webcoreType: DebugOverlayRegions
   defaultValue:
     WebKitLegacy:
       default: 0
     WebKit:
       default: 0
+    WebCore:
+      default: 0
 
index 9500726db25da53613193f3db147b2d8e6ae94b4..efccc814771426bc205fe47d0acf73b788a91fa2 100644 (file)
@@ -57,6 +57,8 @@ AdClickAttributionEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This is on by default in WebKit2. Perhaps we should consider turning it on for WebKitLegacy as well.
 AspectRatioOfImgFromWidthAndHeightEnabled:
@@ -68,6 +70,8 @@ AspectRatioOfImgFromWidthAndHeightEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 # FIXME: This is on by default in WebKit2 PLATFORM(COCOA). Perhaps we should consider turning it on for WebKitLegacy as well.
 AsyncClipboardAPIEnabled:
@@ -80,6 +84,8 @@ AsyncClipboardAPIEnabled:
     WebKit:
       "PLATFORM(COCOA)" : true
       default: false
+    WebCore:
+      default: false
 
 AudioWorkletEnabled:
   type: bool
@@ -91,6 +97,8 @@ AudioWorkletEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 BlankAnchorTargetImpliesNoOpenerEnabled:
   type: bool
@@ -101,6 +109,8 @@ BlankAnchorTargetImpliesNoOpenerEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 CSSCustomPropertiesAndValuesEnabled:
   type: bool
@@ -111,6 +121,8 @@ CSSCustomPropertiesAndValuesEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This is enabled when ENABLE(EXPERIMENTAL_FEATURES) is true in WebKit2. Perhaps we should consider using that for WebKitLegacy as well.
 CSSIndividualTransformPropertiesEnabled:
@@ -123,6 +135,8 @@ CSSIndividualTransformPropertiesEnabled:
     WebKit:
       "ENABLE(EXPERIMENTAL_FEATURES)" : true
       default: false
+    WebCore:
+      default: false
 
 CSSOMViewSmoothScrollingEnabled:
   type: bool
@@ -133,6 +147,8 @@ CSSOMViewSmoothScrollingEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 CSSPaintingAPIEnabled:
   type: bool
@@ -169,9 +185,12 @@ ContactPickerAPIEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 CoreImageAcceleratedFilterRenderEnabled:
   type: bool
+  webcoreOnChange: setNeedsRelayoutAllFrames
   humanReadableName: "CoreImage-Accelerated Filter Rendering"
   humanReadableDescription: "Accelerated CSS and SVG filter rendering using CoreImage"
   condition: ENABLE(CORE_IMAGE_ACCELERATED_FILTER_RENDER)
@@ -180,9 +199,12 @@ CoreImageAcceleratedFilterRenderEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 CoreMathMLEnabled:
   type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   humanReadableName: "MathML Core"
   humanReadableDescription: "Disable features removed from the MathML Core spec."
   defaultValue:
@@ -191,6 +213,8 @@ CoreMathMLEnabled:
     WebKit:
       "PLATFORM(GTK) || PLATFORM(WPE)": true
       default: false
+    WebCore:
+      default: false
 
 DialogElementEnabled:
   type: bool
@@ -227,6 +251,8 @@ DisallowSyncXHRDuringPageDismissalEnabled:
     WebKit:
       "PLATFORM(MAC) || PLATFORM(IOS_FAMILY)": WebKit::defaultDisallowSyncXHRDuringPageDismissalEnabled()
       default: true
+    WebCore:
+      default: true
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
 ExposeSpeakersEnabled:
@@ -239,6 +265,8 @@ ExposeSpeakersEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This seems to be accidentally enabled for WebKit1 right now due to the old code using the
 # wrong preference key in some places. We should identify whether it really makes sense to keep this
@@ -265,6 +293,8 @@ GenericCueAPIEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 GoogleAntiFlickerOptimizationQuirkEnabled:
   type: bool
@@ -275,6 +305,8 @@ GoogleAntiFlickerOptimizationQuirkEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 # FIXME: This is on by default in WebKit2. Perhaps we should consider turning it on for WebKitLegacy as well.
 HDRMediaCapabilitiesEnabled:
@@ -286,6 +318,8 @@ HDRMediaCapabilitiesEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 HTTP3Enabled:
   type: bool
@@ -308,6 +342,8 @@ HTTPSUpgradeEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 HighlightAPIEnabled:
   type: bool
@@ -343,6 +379,8 @@ InProcessCookieCacheEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 IncrementalPDFLoadingEnabled:
   type: bool
@@ -367,6 +405,8 @@ IntersectionObserverEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 # FIXME: The 'Is' prefix is inconsistent with most other preferences and should be removed.
 IsFirstPartyWebsiteDataRemovalDisabled:
@@ -378,6 +418,8 @@ IsFirstPartyWebsiteDataRemovalDisabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: The 'Is' prefix is inconsistent with most other preferences and should be removed.
 IsLoggedInAPIEnabled:
@@ -389,6 +431,8 @@ IsLoggedInAPIEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: The 'Is' prefix is inconsistent with most other preferences and should be removed.
 # FIXME: This is not implemented for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
@@ -414,6 +458,8 @@ IsSameSiteStrictEnforcementEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: The 'Is' prefix is inconsistent with most other preferences and should be removed.
 IsThirdPartyCookieBlockingDisabled:
@@ -425,6 +471,8 @@ IsThirdPartyCookieBlockingDisabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 LazyIframeLoadingEnabled:
   type: bool
@@ -435,6 +483,8 @@ LazyIframeLoadingEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 LazyImageLoadingEnabled:
   type: bool
@@ -445,6 +495,8 @@ LazyImageLoadingEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 LinkPrefetchEnabled:
   type: bool
@@ -455,6 +507,8 @@ LinkPrefetchEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 LinkPreloadResponsiveImagesEnabled:
   type: bool
@@ -465,6 +519,8 @@ LinkPreloadResponsiveImagesEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 MaskWebGLStringsEnabled:
   type: bool
@@ -488,6 +544,8 @@ MediaCapabilitiesExtensionsEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
 MediaRecorderEnabled:
@@ -501,6 +559,8 @@ MediaRecorderEnabled:
     WebKit:
       "HAVE(AVASSETWRITERDELEGATE)": true
       default: false
+    WebCore:
+      default: false
 
 ModernUnprefixedWebAudioEnabled:
   type: bool
@@ -513,6 +573,8 @@ ModernUnprefixedWebAudioEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 PageAtRuleSupportEnabled:
   type: bool
@@ -548,6 +610,8 @@ PerElementSpeakerSelectionEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ProcessSwapOnCrossSiteNavigationEnabled:
   type: bool
@@ -581,6 +645,8 @@ ReferrerPolicyAttributeEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 # FIXME: This is on by default in WebKit2. Perhaps we should consider turning it on for WebKitLegacy as well.
 RemotePlaybackEnabled:
@@ -593,6 +659,8 @@ RemotePlaybackEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 RequestIdleCallbackEnabled:
   type: bool
@@ -603,6 +671,8 @@ RequestIdleCallbackEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This is on by default in WebKit2. Perhaps we should consider turning it on for WebKitLegacy as well.
 ResizeObserverEnabled:
@@ -615,18 +685,24 @@ ResizeObserverEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
+# FIXME: This should have it's own ENABLE.
 ScreenCaptureEnabled:
   type: bool
-  condition: ENABLE(MEDIA_STREAM) && PLATFORM(MAC)
+  condition: ENABLE(MEDIA_STREAM)
   humanReadableName: "ScreenCapture"
   humanReadableDescription: "Enable ScreenCapture"
   defaultValue:
     WebKitLegacy:
       default: false
     WebKit:
-      default: true
+      "PLATFORM(MAC)": true
+      default: false
+    WebCore:
+      default: false
 
 ServerTimingEnabled:
   type: bool
@@ -649,6 +725,8 @@ ShouldDeferAsynchronousScriptsUntilAfterDocumentLoadOrFirstPaint:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 # FIXME: This is enabled when ENABLE(EXPERIMENTAL_FEATURES) is true in WebKit2. Perhaps we should consider using that for WebKitLegacy as well.
 SpringTimingFunctionEnabled:
@@ -661,6 +739,8 @@ SpringTimingFunctionEnabled:
     WebKit:
       "ENABLE(EXPERIMENTAL_FEATURES)" : true
       default: false
+    WebCore:
+      default: false
 
 SyntheticEditingCommandsEnabled:
   type: bool
@@ -671,6 +751,8 @@ SyntheticEditingCommandsEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 ThirdPartyIframeRedirectBlockingEnabled:
   type: bool
@@ -681,6 +763,8 @@ ThirdPartyIframeRedirectBlockingEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 TransformStreamAPIEnabled:
   type: bool
@@ -740,6 +824,8 @@ VisualViewportAPIEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: false
 
 # FIXME: This is enabled when ENABLE(EXPERIMENTAL_FEATURES) is true in WebKit2. Perhaps we should consider using that for WebKitLegacy as well.
 WebAnimationsCompositeOperationsEnabled:
@@ -778,6 +864,8 @@ WebAuthenticationEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
 WebAuthenticationLocalAuthenticatorEnabled:
@@ -790,6 +878,8 @@ WebAuthenticationLocalAuthenticatorEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 WebGL2Enabled:
   type: bool
@@ -911,6 +1001,8 @@ WebShareFileAPIEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 WebXREnabled:
   type: bool
index 2943afed213392d072b86d567d63855a2faa3a6d..ad120d62655f8dfbb367ff45cfe124f8e00dc70f 100644 (file)
@@ -37,6 +37,8 @@ AllowViewportShrinkToFitContent:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 AlwaysZoomOnDoubleTap:
   type: bool
@@ -60,6 +62,8 @@ ApplePayRemoteUIEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 AriaReflectionEnabled:
   type: bool
@@ -74,6 +78,7 @@ AriaReflectionEnabled:
 
 AsyncFrameScrollingEnabled:
   type: bool
+  webcoreOnChange: setNeedsRelayoutAllFrames
   humanReadableName: "Async Frame Scrolling"
   humanReadableDescription: "Perform frame scrolling off the main thread"
   defaultValue:
@@ -83,9 +88,12 @@ AsyncFrameScrollingEnabled:
       "USE(NICOSIA)": true
       "PLATFORM(IOS_FAMILY)": true
       default: WebKit::defaultAsyncFrameScrollingEnabled()
+    WebCore:
+      default: false
 
 AsyncOverflowScrollingEnabled:
   type: bool
+  webcoreOnChange: setNeedsRelayoutAllFrames
   humanReadableName: "Async Overflow Scrolling"
   humanReadableDescription: "Perform overflow scrolling off the main thread"
   defaultValue:
@@ -94,6 +102,8 @@ AsyncOverflowScrollingEnabled:
     WebKit:
       "PLATFORM(IOS_FAMILY)": true
       default: WebKit::defaultAsyncFrameScrollingEnabled()
+    WebCore:
+      default: false
 
 # FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
 BlockingOfSmallPluginsEnabled:
@@ -105,6 +115,8 @@ BlockingOfSmallPluginsEnabled:
       default: false
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 CSSLogicalEnabled:
   type: bool
@@ -127,6 +139,8 @@ CSSOMViewScrollingAPIEnabled:
     WebKit:
       "PLATFORM(IOS_FAMILY)": WebKit::defaultCSSOMViewScrollingAPIEnabled()
       default: true
+    WebCore:
+      default: false
 
 CaptureAudioInGPUProcessEnabled:
   type: bool
@@ -182,6 +196,8 @@ DOMPasteAccessRequestsEnabled:
     WebKit:
       "PLATFORM(IOS) || PLATFORM(MAC)": true
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This is on by default in WebKit2 (for everything but WatchOS). Perhaps we should consider turning it on for WebKitLegacy as well.
 DataListElementEnabled:
@@ -209,10 +225,11 @@ DateTimeInputsEditableComponentsEnabled:
     WebKit:
       "PLATFORM(MAC)": true
       default: false
+    WebCore:
+      default: false
 
 EnterKeyHintEnabled:
   type: bool
-  defaultValue: DEFAULT_ENTER_KEY_HINT_ENABLED
   humanReadableName: "Enter Key Hint"
   humanReadableDescription: "Enable the enterKeyHint HTML attribute"
   defaultValue:
@@ -221,6 +238,8 @@ EnterKeyHintEnabled:
     WebKit:
       "PLATFORM(COCOA)": true
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
 ExperimentalPlugInSandboxProfilesEnabled:
@@ -268,9 +287,13 @@ FullScreenEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 ICECandidateFilteringEnabled:
   type: bool
+  webcoreOnChange: iceCandidateFilteringEnabledChanged
+  inspectorOverride: true
   humanReadableName: "Enable ICE Candidate Filtering"
   humanReadableDescription: "Enable ICE Candidate Filtering"
   defaultValue:
@@ -278,6 +301,8 @@ ICECandidateFilteringEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 IPCTestingAPIEnabled:
   type: bool
@@ -301,6 +326,8 @@ InputTypeColorEnabled:
     WebKit:
       "PLATFORM(WATCHOS)": false
       default: true
+    WebCore:
+      default: false
 
 InputTypeDateEnabled:
   type: bool
@@ -314,7 +341,9 @@ InputTypeDateEnabled:
     WebKit:
       "PLATFORM(MACCATALYST) || PLATFORM(APPLETV)": false
       default: true
-  
+    WebCore:
+      default: false
+
 InputTypeDateTimeLocalEnabled:
   type: bool
   humanReadableName: "datetime-local Inputs"
@@ -327,6 +356,8 @@ InputTypeDateTimeLocalEnabled:
     WebKit:
       "PLATFORM(MACCATALYST) || PLATFORM(APPLETV)": false
       default: true
+    WebCore:
+      default: false
 
 InputTypeMonthEnabled:
   type: bool
@@ -340,6 +371,8 @@ InputTypeMonthEnabled:
     WebKit:
       "!PLATFORM(MAC) && !PLATFORM(MACCATALYST) && !PLATFORM(APPLETV)": true
       default: false
+    WebCore:
+      default: false
 
 InputTypeTimeEnabled:
   type: bool
@@ -353,6 +386,8 @@ InputTypeTimeEnabled:
     WebKit:
       "PLATFORM(MACCATALYST) || PLATFORM(APPLETV)": false
       default: true
+    WebCore:
+      default: false
 
 InputTypeWeekEnabled:
   type: bool
@@ -365,6 +400,8 @@ InputTypeWeekEnabled:
     WebKit:
       "!PLATFORM(MAC) && !PLATFORM(MACCATALYST) && !PLATFORM(APPLETV)": true
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
 IsFirstPartyWebsiteDataRemovalLiveOnTestingEnabled:
@@ -376,6 +413,8 @@ IsFirstPartyWebsiteDataRemovalLiveOnTestingEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
 IsFirstPartyWebsiteDataRemovalReproTestingEnabled:
@@ -387,6 +426,8 @@ IsFirstPartyWebsiteDataRemovalReproTestingEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 KeygenElementEnabled:
   type: bool
@@ -426,6 +467,7 @@ LayoutFormattingContextIntegrationEnabled:
 
 LegacyOverflowScrollingTouchEnabled:
   type: bool
+  webcoreOnChange: setNeedsRelayoutAllFrames
   humanReadableName: "Legacy -webkit-overflow-scrolling property"
   humanReadableDescription: "Support the legacy -webkit-overflow-scrolling CSS property"
   condition: ENABLE(OVERFLOW_SCROLLING_TOUCH)
@@ -434,6 +476,8 @@ LegacyOverflowScrollingTouchEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 LineHeightUnitsEnabled:
   type: bool
@@ -448,7 +492,6 @@ LineHeightUnitsEnabled:
 
 LiveRangeSelectionEnabled:
   type: bool
-  defaultValue: false
   humanReadableName: "Live Ranges in Selection"
   humanReadableDescription: "Live range behavior for ranges in the Selection object"
   defaultValue:
@@ -456,9 +499,12 @@ LiveRangeSelectionEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 MediaCaptureRequiresSecureConnection:
   type: bool
+  inspectorOverride: true
   humanReadableName: "Limit Media Capture to Secure Sites"
   humanReadableDescription: "Limit Media Capture to Secure Sites"
   condition: ENABLE(MEDIA_STREAM)
@@ -467,10 +513,13 @@ MediaCaptureRequiresSecureConnection:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 MockCaptureDevicesEnabled:
   type: bool
-  defaultValue: DEFAULT_MOCK_CAPTURE_DEVICES_ENABLED
+  webcoreOnChange: mockCaptureDevicesEnabledChanged
+  inspectorOverride: true
   condition: ENABLE(MEDIA_STREAM)
   humanReadableName: "Enable Mock Capture Devices"
   humanReadableDescription: "Enable Mock Capture Devices"
@@ -480,6 +529,8 @@ MockCaptureDevicesEnabled:
     WebKit:
       "PLATFORM(IOS_FAMILY_SIMULATOR)": true
       default: false
+    WebCore:
+      default: false
 
 MouseEventsSimulationEnabled:
   type: bool
@@ -528,6 +579,8 @@ PrefixedWebAudioEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 # FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
 RestrictedHTTPResponseAccess:
@@ -561,6 +614,8 @@ SelectionAcrossShadowBoundariesEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 # FIXME: This is not implemented for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
 ServiceWorkersEnabled:
@@ -579,6 +634,7 @@ ServiceWorkersEnabled:
 
 SimpleLineLayoutEnabled:
   type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   humanReadableName: "Simple line layout"
   humanReadableDescription: "Enable simple line layout path (SLL)"
   defaultValue:
@@ -586,6 +642,8 @@ SimpleLineLayoutEnabled:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
 SpeakerSelectionRequiresUserGesture:
@@ -598,10 +656,13 @@ SpeakerSelectionRequiresUserGesture:
       default: true
     WebKit:
       default: true
+    WebCore:
+      default: true
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
 TextAutosizingUsesIdempotentMode:
   type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
   humanReadableName: "Idempotent Text Autosizing"
   humanReadableDescription: "Use idempotent text autosizing mode"
   condition: ENABLE(TEXT_AUTOSIZING)
@@ -611,11 +672,12 @@ TextAutosizingUsesIdempotentMode:
     WebKit:
       "PLATFORM(IOS_FAMILY)": defaultTextAutosizingUsesIdempotentMode()
       default: false
+    WebCore:
+      default: false
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
 UndoManagerAPIEnabled:
   type: bool
-  defaultValue: false
   humanReadableName: "UndoManager DOM API"
   humanReadableDescription: "Enable the UndoManager DOM API"
   defaultValue:
@@ -623,6 +685,8 @@ UndoManagerAPIEnabled:
       default: false
     WebKit:
       default: false
+    WebCore:
+      default: false
 
 UseGPUProcessForCanvasRenderingEnabled:
   type: bool
@@ -655,6 +719,10 @@ UseGPUProcessForMediaEnabled:
   defaultValue:
     WebKit:
       default: defaultUseGPUProcessForMediaEnabled()
+    WebKitLegacy:
+      default: false
+    WebCore:
+      default: false
 
 UseGPUProcessForWebGLEnabled:
   type: bool
index 27bd005e2d8bc2a8651531c636fa8c970c479410..abdd57436706df69ac6537890b5d5f07aab0eb47 100644 (file)
@@ -1,3 +1,58 @@
+2020-10-10  Sam Weinig  <weinig@apple.com>
+
+        Use WebPreference definitions from shared configuration files in WebCore (Part 1)
+        https://bugs.webkit.org/show_bug.cgi?id=217551
+
+        Reviewed by Darin Adler.
+
+        This begins using the WebPreferences*.yaml files for the generation of 
+        WebCore's Settings and InternalSettings classes. In this first part, we 
+        only are moving settings that already exist in the WebPreferences*.yaml 
+        files. A subsequent change will migrate the remaining additional settings
+        over.
+
+        * Configurations/WebCore.xcconfig:
+        Add variable (already used by WebKit) to access the WTF build scripts
+        directory for access to the WebPreferences*.yaml files in DerivedSources.make
+
+        * DerivedSources-input.xcfilelist:
+        Update with new input files, the WebPreferences*.yaml files.
+
+        * WebCoreMacros.cmake:
+        * DerivedSources.make:
+        Update GenerateSettings.rb call with new parameters.
+
+        * Scripts/GenerateSettings.rb:
+        Adds support for generating Settings based on preferences in the 
+        WebPreferences*.yaml files while maintaining support for the additional
+        settings from Settings.yaml. Adds support for a new key, 'webcoreImplementation'
+        to continue supporting custom implementations in SettingsBase.
+
+        * Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb:
+        * Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb:
+        * Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb:
+        * Scripts/SettingsTemplates/Settings.cpp.erb:
+        * Scripts/SettingsTemplates/Settings.h.erb:
+        Update to account for new names (@allSettingsSet) and differentiation
+        between custom and non-custom implementations.
+
+        * editing/EditorCommand.cpp:
+        * page/Frame.cpp:
+        Update for new name. DOMPasteAllowed -> domPasteAllowed, which matches convention.
+
+        * page/Settings.yaml:
+        Moved settings that were bound by WebPreferences to WebPreferences. Sorted remaining
+        ones left.
+
+        * page/SettingsDefaultValues.h:
+        Remove defaults that were the same on all platforms. These are now hardcoded in 
+        WebPreferences.
+
+        * style/StyleFontSizeFunctions.cpp:
+        (WebCore::Style::fontSizeForKeyword):
+        Add explicit type, now that minimumLogicalFontSize is a double, not an int in WebCore
+        (it was already a double at the WebKit/WebKitLegacy level).
+
 2020-10-10  Adrian Perez de Castro  <aperez@igalia.com>
 
         [GTK] Build broken with ENABLE_GAMEPAD enabled
index 50ff558860096817daec88c5ac6bc16329e41b1f..77ce4c5eac362ec67bdfb28906bfc8e3a2ce21ff 100644 (file)
@@ -139,6 +139,14 @@ PRODUCTION_FRAMEWORKS_DIR_COCOA_TOUCH_NO = $(PRODUCTION_FRAMEWORKS_DIR_USE_OVERR
 PRODUCTION_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(NORMAL_PRODUCTION_FRAMEWORKS_DIR);
 PRODUCTION_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
 
+WTF_BUILD_SCRIPTS_DIR = $(WTF_BUILD_SCRIPTS_DIR_$(CONFIGURATION));
+WTF_BUILD_SCRIPTS_DIR_Release = $(WTF_BUILD_SCRIPTS_DIR_engineering);
+WTF_BUILD_SCRIPTS_DIR_Debug = $(WTF_BUILD_SCRIPTS_DIR_engineering);
+WTF_BUILD_SCRIPTS_DIR_Production = $(WTF_BUILD_SCRIPTS_DIR_Production_COCOA_TOUCH_$(WK_IS_COCOA_TOUCH));
+WTF_BUILD_SCRIPTS_DIR_Production_COCOA_TOUCH_YES = $(SDKROOT)$(WK_ALTERNATE_WEBKIT_SDK_PATH)/usr/local/include/wtf/Scripts;
+WTF_BUILD_SCRIPTS_DIR_Production_COCOA_TOUCH_NO = $(SDKROOT)/usr/local/include/wtf/Scripts;
+WTF_BUILD_SCRIPTS_DIR_engineering = $(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/Scripts;
+
 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR = $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_$(CONFIGURATION));
 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Release = $(JAVASCRIPTCORE_PRIVATE_HEADERS_engineering);
 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Debug = $(JAVASCRIPTCORE_PRIVATE_HEADERS_engineering);
index d7c97164d2e06611451daad56d4c141867da392b..86a07741f38447920aa0e92762bd4e0e6e62dd70 100644 (file)
@@ -1,4 +1,8 @@
 # This file is generated by the generate-xcfilelists script.
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/Scripts/Preferences/WebPreferences.yaml
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/Scripts/Preferences/WebPreferencesDebug.yaml
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/Scripts/Preferences/WebPreferencesExperimental.yaml
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/Scripts/Preferences/WebPreferencesInternal.yaml
 $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR)/UpdateContents.py
 $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR)/builtins_generate_combined_header.py
 $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR)/builtins_generate_combined_implementation.py
index 13a6100cdb2a37ae733d52eea48e6f6f0103d61e..6513b8bec3517f7dbc46302dd6992d24e8a20dd4 100644 (file)
@@ -1701,6 +1701,13 @@ $(MATH_ML_GENERATED_PATTERNS) : dom/make_names.pl bindings/scripts/Hasher.pm bin
 
 # Internal Settings
 
+WEB_PREFERENCES_INPUT_FILES = \
+    ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferences.yaml \
+    ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesDebug.yaml \
+    ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesExperimental.yaml \
+    ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesInternal.yaml \
+#
+
 GENERATE_SETTINGS_TEMPLATES = \
     $(WebCore)/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb \
     $(WebCore)/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb \
@@ -1712,8 +1719,8 @@ GENERATE_SETTINGS_FILES = $(basename $(notdir $(GENERATE_SETTINGS_TEMPLATES)))
 GENERATE_SETTINGS_PATTERNS = $(subst .,%,$(GENERATE_SETTINGS_FILES))
 
 all : $(GENERATE_SETTINGS_FILES)
-$(GENERATE_SETTINGS_PATTERNS) : $(WebCore)/Scripts/GenerateSettings.rb $(GENERATE_SETTINGS_TEMPLATES) page/Settings.yaml
-       $(RUBY) $< --input $(WebCore)/page/Settings.yaml
+$(GENERATE_SETTINGS_PATTERNS) : $(WebCore)/Scripts/GenerateSettings.rb $(GENERATE_SETTINGS_TEMPLATES) $(WEB_PREFERENCES_INPUT_FILES) page/Settings.yaml
+       $(RUBY) $< --additionalSettings $(WebCore)/page/Settings.yaml --base ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferences.yaml --debug ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesDebug.yaml --experimental ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesExperimental.yaml --internal ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesInternal.yaml
 
 # --------
 
index 9a4fb26f244db33b9c705d4a5e7dba5bb0433374..3c9264023f348e86b188e0815a0e6b08f099b26a 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
 #
-# Copyright (c) 2017 Apple Inc. All rights reserved.
+# Copyright (c) 2017-2020 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -29,7 +29,11 @@ require 'optparse'
 require 'yaml'
 
 options = { 
-  :input => nil,
+  :additionalSettings => nil,
+  :basePreferences => nil,
+  :debugPreferences => nil,
+  :experimentalPreferences => nil,
+  :internalPreferences => nil,
   :outputDirectory => nil
 }
 optparse = OptionParser.new do |opts|
@@ -37,13 +41,17 @@ optparse = OptionParser.new do |opts|
 
     opts.separator ""
 
-    opts.on("--input input", "file to generate settings from") { |input| options[:input] = input }
+    opts.on("--additionalSettings input", "file to generate settings from") { |additionalSettings| options[:additionalSettings] = additionalSettings }
+    opts.on("--base input", "file to generate settings from") { |basePreferences| options[:basePreferences] = basePreferences }
+    opts.on("--debug input", "file to generate debug settings from") { |debugPreferences| options[:debugPreferences] = debugPreferences }
+    opts.on("--experimental input", "file to generate experimental settings from") { |experimentalPreferences| options[:experimentalPreferences] = experimentalPreferences }
+    opts.on("--internal input", "file to generate internal settings from") { |internalPreferences| options[:internalPreferences] = internalPreferences }
     opts.on("--outputDir output", "directory to generate file in") { |output| options[:outputDirectory] = output }
 end
 
 optparse.parse!
 
-if !options[:input]
+if !options[:additionalSettings] || !options[:basePreferences] || !options[:debugPreferences] || !options[:experimentalPreferences] || !options[:internalPreferences]
   puts optparse
   exit -1
 end
@@ -55,14 +63,42 @@ end
 FileUtils.mkdir_p(options[:outputDirectory])
 
 parsedSettings = begin
-  YAML.load_file(options[:input])
+  YAML.load_file(options[:additionalSettings])
 rescue ArgumentError => e
   puts "Could not parse input file: #{e.message}"
   exit(-1)
 end
 
-class Setting
+def load(path)
+  parsed = begin
+    YAML.load_file(path)
+  rescue ArgumentError => e
+    puts "ERROR: Could not parse input file: #{e.message}"
+    exit(-1)
+  end
+
+  previousName = nil
+  parsed.keys.each do |name|
+    if previousName != nil and previousName > name
+      puts "ERROR: Input file #{path} is not sorted. First out of order name found is '#{name}'."
+      exit(-1)
+    end
+    previousName = name
+  end
+
+  parsed
+end
+
+parsedPreferences = {}
+parsedPreferences.merge!(load(options[:basePreferences]))
+parsedPreferences.merge!(load(options[:debugPreferences]))
+parsedPreferences.merge!(load(options[:experimentalPreferences]))
+parsedPreferences.merge!(load(options[:internalPreferences]))
+
+
+class SettingFromWebPreferences
   attr_accessor :name
+  attr_accessor :options
   attr_accessor :type
   attr_accessor :initial
   attr_accessor :excludeFromInternalSettings
@@ -70,16 +106,112 @@ class Setting
   attr_accessor :onChange
   attr_accessor :getter
   attr_accessor :inspectorOverride
+  attr_accessor :customImplementation
+
+  def initialize(name, options)
+    @name = normalizeNameForWebCore(name, options)
+    @options = options
+    @type = options["type"]
+    @initial = options["defaultValue"]["WebCore"]["default"]
+    @excludeFromInternalSettings = options["webcoreExcludeFromInternalSettings"] || false
+    @conditional = options["condition"]
+    @onChange = options["webcoreOnChange"]
+    @getter = options["webcoreGetter"]
+    @inspectorOverride = options["inspectorOverride"]
+    @customImplementation = options["webcoreImplementation"] == "custom"
+  end
+
+  def normalizeNameForWebCore(name, options)
+    if options["webcoreName"]
+      options["webcoreName"]
+    elsif name.start_with?("VP")
+      name[0..1].downcase + name[2..name.length]
+    elsif name.start_with?("CSSOM", "HTTPS")
+      name
+    elsif name.start_with?("CSS", "XSS", "FTP", "DOM", "DNS", "PDF", "ICE", "HDR")
+      name[0..2].downcase + name[3..name.length]
+    elsif name.start_with?("HTTP")
+      name[0..3].downcase + name[4..name.length]
+    else
+      name[0].downcase + name[1..name.length]
+    end
+  end
+
+  def valueType?
+    @type != "String" && @type != "URL"
+  end
+
+  def idlType
+    # FIXME: Add support for more types including enum types.
+    if @type == "uint32_t"
+      "unsigned long"
+    elsif @type == "double"
+      "double"
+    elsif @type == "String"
+      "DOMString"
+    elsif @type == "bool"
+      "boolean"
+    else
+      nil
+    end
+  end
+
+  def parameterType
+    if valueType?
+      @type
+    else
+      "const #{@type}&"
+    end
+  end
+
+  def hasComplexSetter?
+    @onChange != nil
+  end
+
+  def hasComplexGetter?
+    hasInspectorOverride?
+  end
+
+  def setterFunctionName
+    if @name.start_with?("css", "xss", "ftp", "dom", "dns", "ice", "hdr")
+      "set" + @name[0..2].upcase + @name[3..@name.length]
+    else
+      "set" + @name[0].upcase + @name[1..@name.length]
+    end
+  end
+
+  def getterFunctionName
+    @getter || @name
+  end
+
+  def hasInspectorOverride?
+    @inspectorOverride == true
+  end
+end
+
+
+class SettingFromWebCore
+  attr_accessor :name
+  attr_accessor :options
+  attr_accessor :type
+  attr_accessor :initial
+  attr_accessor :excludeFromInternalSettings
+  attr_accessor :conditional
+  attr_accessor :onChange
+  attr_accessor :getter
+  attr_accessor :inspectorOverride
+  attr_accessor :customImplementation
   
-  def initialize(name, opts)
+  def initialize(name, options)
     @name = name
-    @type = opts["type"] || "bool"
-    @initial = opts["initial"]
-    @excludeFromInternalSettings = opts["excludeFromInternalSettings"] || false
-    @conditional = opts["conditional"]
-    @onChange = opts["onChange"]
-    @getter = opts["getter"]
-    @inspectorOverride = opts["inspectorOverride"]
+    @options = options
+    @type = options["type"] || "bool"
+    @initial = options["initial"]
+    @excludeFromInternalSettings = options["excludeFromInternalSettings"] || false
+    @conditional = options["conditional"]
+    @onChange = options["onChange"]
+    @getter = options["getter"]
+    @inspectorOverride = options["inspectorOverride"]
   end
 
   def valueType?
@@ -87,15 +219,11 @@ class Setting
   end
 
   def idlType
-    # FIXME: Add support for more types including enumerate types.
-    if @type == "int"
-      "long"
-    elsif @type == "unsigned"
+    # FIXME: Add support for more types including enum types.
+    if @type == "uint32_t"
       "unsigned long"
     elsif @type == "double"
       "double"
-    elsif @type == "float"
-      "float"
     elsif @type == "String"
       "DOMString"
     elsif @type == "bool"
@@ -141,43 +269,45 @@ end
 class Conditional
   attr_accessor :condition
   attr_accessor :settings
+  attr_accessor :settingsNeedingImplementation
   attr_accessor :boolSettings
+  attr_accessor :boolSettingsNeedingImplementation
   attr_accessor :nonBoolSettings
+  attr_accessor :nonBoolSettingsNeedingImplementation
   attr_accessor :settingsWithComplexGetters
+  attr_accessor :settingsWithComplexGettersNeedingImplementation
   attr_accessor :settingsWithComplexSetters
+  attr_accessor :settingsWithComplexSettersNeedingImplementation
 
   def initialize(condition, settings)
     @condition = condition
+
     @settings = settings
+    @settingsNeedingImplementation = @settings.reject { |setting| setting.customImplementation }
     
     @boolSettings = @settings.select { |setting| setting.type == "bool" }
+    @boolSettingsNeedingImplementation = @boolSettings.reject { |setting| setting.customImplementation }
+  
     @nonBoolSettings = @settings.reject { |setting| setting.type == "bool" }
+    @nonBoolSettingsNeedingImplementation = @nonBoolSettings.reject { |setting| setting.customImplementation }
+
     @settingsWithComplexGetters = @settings.select { |setting| setting.hasComplexGetter? }
+    @settingsWithComplexGettersNeedingImplementation = @settingsWithComplexGetters.reject { |setting| setting.customImplementation }
+
     @settingsWithComplexSetters = @settings.select { |setting| setting.hasComplexSetter? }
+    @settingsWithComplexSettersNeedingImplementation = @settingsWithComplexSetters.reject { |setting| setting.customImplementation }
   end
 end
 
-class Settings
+class SettingSet
   attr_accessor :settings
-  attr_accessor :unconditionalSetting
-  attr_accessor :unconditionalBoolSetting
-  attr_accessor :unconditionalNonBoolSetting
-  attr_accessor :unconditionalSettingWithComplexGetters
-  attr_accessor :unconditionalSettingWithComplexSetters
+  attr_accessor :inspectorOverrideSettings
   attr_accessor :conditionals
-  
-  def initialize(hash)
-    @settings = []
-    hash.each do |name, options|
-      @settings << Setting.new(name, options)
-    end
+
+  def initialize(settings)
+    @settings = settings
     @settings.sort! { |x, y| x.name <=> y.name }
-    
-    @unconditionalSetting = @settings.reject { |setting| setting.conditional }
-    @unconditionalBoolSetting = @unconditionalSetting.select { |setting| setting.type == "bool" }
-    @unconditionalNonBoolSetting = @unconditionalSetting.reject { |setting| setting.type == "bool" }
-    @unconditionalSettingWithComplexGetters = @unconditionalSetting.select { |setting| setting.hasComplexGetter? }
-    @unconditionalSettingWithComplexSetters = @unconditionalSetting.select { |setting| setting.hasComplexSetter? }
+
     @inspectorOverrideSettings = @settings.select { |setting| setting.hasInspectorOverride? }
 
     @conditionals = []
@@ -193,6 +323,30 @@ class Settings
       @conditionals << Conditional.new(key, value)
     end
     @conditionals.sort! { |x, y| x.condition <=> y.condition }
+
+    # We also add the unconditional settings as the first element in the conditional array.
+    @conditionals.unshift(Conditional.new(nil, @settings.reject { |setting| setting.conditional }))
+  end
+end
+
+class Settings
+  attr_accessor :allSettingsSet
+  
+  def initialize(parsedSettingsFromWebCore, parsedSettingsFromWebPreferences)
+    settingsFromWebPreferences = []
+    parsedSettingsFromWebPreferences.each do |name, options|
+      # An empty "webcoreBinding" entry indicates this preference uses the default, which is bound to Settings.
+      if !options["webcoreBinding"]
+        settingsFromWebPreferences << SettingFromWebPreferences.new(name, options)
+      end
+    end
+
+    settingsFromWebCore = []
+    parsedSettingsFromWebCore.each do |name, options|
+      settingsFromWebCore << SettingFromWebCore.new(name, options)
+    end
+
+    @allSettingsSet = SettingSet.new(settingsFromWebPreferences + settingsFromWebCore)
   end
 
   def renderToFile(template, file)
@@ -205,7 +359,7 @@ class Settings
   end
 end
 
-settings = Settings.new(parsedSettings)
+settings = Settings.new(parsedSettings, parsedPreferences)
 settings.renderToFile("SettingsTemplates/Settings.h.erb", File.join(options[:outputDirectory], "Settings.h"))
 settings.renderToFile("SettingsTemplates/Settings.cpp.erb", File.join(options[:outputDirectory], "Settings.cpp"))
 settings.renderToFile("SettingsTemplates/InternalSettingsGenerated.idl.erb", File.join(options[:outputDirectory], "InternalSettingsGenerated.idl"))
index 62a0152ba1d9e43ebc1138e7f9b0af7949121ba3..214e71762d373407a29cc73293a5250f151dc805 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT.
  *
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -35,7 +35,7 @@ namespace WebCore {
 
 InternalSettingsGenerated::InternalSettingsGenerated(Page* page)
     : m_page(page)
-<%- for @setting in @settings do -%>
+<%- for @setting in @allSettingsSet.settings do -%>
 <%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
 <%- if @setting.conditional -%>
 #if <%= @setting.conditional %>
@@ -55,7 +55,7 @@ InternalSettingsGenerated::~InternalSettingsGenerated()
 
 void InternalSettingsGenerated::resetToConsistentState()
 {
-<%- for @setting in @settings do -%>
+<%- for @setting in @allSettingsSet.settings do -%>
 <%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
 <%- if @setting.conditional -%>
 #if <%= @setting.conditional %>
@@ -68,7 +68,7 @@ void InternalSettingsGenerated::resetToConsistentState()
 <%- end -%>
 }
 
-<%- for @setting in @settings do -%>
+<%- for @setting in @allSettingsSet.settings do -%>
 <%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
 void InternalSettingsGenerated::<%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>)
 {
index aa716bf393accf163e6f0a3019026924b793f42b..0f455a046594e57322e9bb409af66e20f260c632 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT.
  *
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -41,7 +41,7 @@ public:
 
     void resetToConsistentState();
 
-<%- for @setting in @settings do -%>
+<%- for @setting in @allSettingsSet.settings do -%>
 <%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
     void <%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>);
 <%- end -%>
@@ -50,7 +50,7 @@ public:
 private:
     Page* m_page;
 
-<%- for @setting in @settings do -%>
+<%- for @setting in @allSettingsSet.settings do -%>
 <%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
 <%- if @setting.conditional -%>
 #if <%= @setting.conditional %>
index 138ece8947d4a8d09878b3779870d763a12dcbee..cd6a073918bf85d44aa1ae3b9b00f0dc0f87f828 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT.
  *
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -29,7 +29,7 @@
     LegacyNoInterfaceObject,
     ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,
 ] interface InternalSettingsGenerated {
-<%- for @setting in @settings do -%>
+<%- for @setting in @allSettingsSet.settings do -%>
 <%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
     undefined <%= @setting.setterFunctionName %>(<%= @setting.idlType %> <%= @setting.name %>);
 <%- end -%>
index a3659381007f728c1484841db34f9802c009bb05..5599b0eedcdb047fa8e0d2e0b6b883b3a8515e1f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT.
  *
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -41,64 +41,46 @@ Ref<Settings> Settings::create(Page* page)
 
 Settings::Settings(Page* page)
     : SettingsBase(page)
-<%- for @setting in @unconditionalNonBoolSetting do -%>
-    , m_<%= @setting.name %>(<%= @setting.initial %>)
-<%- end -%>
-<%- for @conditional in @conditionals do -%>
-<%- if @conditional.nonBoolSettings.length != 0 -%>
+<%- for @conditional in @allSettingsSet.conditionals do -%>
+<%- if @conditional.nonBoolSettingsNeedingImplementation.length != 0 -%>
+<%- if @conditional.condition -%>
 #if <%= @conditional.condition %>
-<%- for @setting in @conditional.nonBoolSettings -%>
+<%- end -%>
+<%- for @setting in @conditional.nonBoolSettingsNeedingImplementation -%>
     , m_<%= @setting.name %>(<%= @setting.initial %>)
 <%- end -%>
+<%- if @conditional.condition -%>
 #endif
 <%- end -%>
 <%- end -%>
-<%- for @setting in @unconditionalBoolSetting do -%>
-    , m_<%= @setting.name %>(<%= @setting.initial %>)
 <%- end -%>
-<%- for @conditional in @conditionals do -%>
-<%- if @conditional.boolSettings.length != 0 -%>
+<%- for @conditional in @allSettingsSet.conditionals do -%>
+<%- if @conditional.boolSettingsNeedingImplementation.length != 0 -%>
+<%- if @conditional.condition -%>
 #if <%= @conditional.condition %>
-<%- for @setting in @conditional.boolSettings -%>
+<%- end -%>
+<%- for @setting in @conditional.boolSettingsNeedingImplementation -%>
     , m_<%= @setting.name %>(<%= @setting.initial %>)
 <%- end -%>
+<%- if @conditional.condition -%>
 #endif
 <%- end -%>
 <%- end -%>
-{
-}
-
-Settings::~Settings()
-{
-}
+<%- end -%>
 
-<%- for @setting in @unconditionalSettingWithComplexGetters do -%>
-<%= @setting.parameterType %> Settings::<%= @setting.getterFunctionName %>() const
 {
-<%- if @setting.hasInspectorOverride? -%>
-    if (UNLIKELY(m_<%= @setting.name %>InspectorOverride)) {
-        ASSERT(InspectorInstrumentation::hasFrontends());
-        return m_<%= @setting.name %>InspectorOverride.value();
-    }
-<%- end -%>
-    return m_<%= @setting.name %>;
 }
 
-<%- end -%>
-<%- for @setting in @unconditionalSettingWithComplexSetters do -%>
-void Settings::<%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>)
+Settings::~Settings()
 {
-    if (m_<%= @setting.name %> == <%= @setting.name %>)
-        return;
-    m_<%= @setting.name %> = <%= @setting.name %>;
-    <%= @setting.onChange %>();
 }
 
-<%- end -%>
-<%- for @conditional in @conditionals do -%>
-<%- if @conditional.settingsWithComplexGetters.length != 0 or @conditional.settingsWithComplexSetters.length != 0-%>
+<%- for @conditional in @allSettingsSet.conditionals do -%>
+<%- if @conditional.settingsWithComplexGettersNeedingImplementation.length != 0 or @conditional.settingsWithComplexSettersNeedingImplementation.length != 0 -%>
+<%- if @conditional.condition -%>
 #if <%= @conditional.condition %>
-<%- for @setting in @conditional.settingsWithComplexGetters do -%>
+<%- end -%>
+<%- for @setting in @conditional.settingsWithComplexGettersNeedingImplementation do -%>
 <%= @setting.parameterType %> Settings::<%= @setting.getterFunctionName %>() const
 {
 <%- if @setting.hasInspectorOverride? -%>
@@ -110,7 +92,8 @@ void Settings::<%= @setting.setterFunctionName %>(<%= @setting.parameterType %>
     return m_<%= @setting.name %>;
 }
 <%- end -%>
-<%- for @setting in @conditional.settingsWithComplexSetters -%>
+
+<%- for @setting in @conditional.settingsWithComplexSettersNeedingImplementation -%>
 void Settings::<%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>)
 {
     if (m_<%= @setting.name %> == <%= @setting.name %>)
@@ -119,11 +102,13 @@ void Settings::<%= @setting.setterFunctionName %>(<%= @setting.parameterType %>
     <%= @setting.onChange %>();
 }
 <%- end -%>
+<%- if @conditional.condition -%>
 #endif
-
 <%- end -%>
 <%- end -%>
-<%- for @setting in @inspectorOverrideSettings do -%>
+<%- end -%>
+
+<%- for @setting in @allSettingsSet.inspectorOverrideSettings do -%>
 <%- if @setting.hasComplexSetter? -%>
 void Settings::<%= @setting.setterFunctionName %>InspectorOverride(Optional<<%= @setting.parameterType %>> <%= @setting.name %>InspectorOverride)
 {
@@ -135,8 +120,10 @@ void Settings::<%= @setting.setterFunctionName %>InspectorOverride(Optional<<%=
 <%- end -%>
     <%= @setting.onChange %>();
 <%- if @setting.conditional -%>
+<%- if @conditional.condition -%>
 #endif
 <%- end -%>
+<%- end -%>
 }
 
 <%- end -%>
index a1bd4197d91770263786200e27e9758158d4953c..5aea9581605e8fe18f20d003d8e60158d9eb828d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT.
  *
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -40,22 +40,11 @@ public:
     WEBCORE_EXPORT static Ref<Settings> create(Page*);
     WEBCORE_EXPORT ~Settings();
 
-<%- for @setting in @unconditionalSetting do -%>
-    <%- if @setting.hasComplexGetter? -%>
-    WEBCORE_EXPORT <%= @setting.parameterType %> <%= @setting.getterFunctionName %>() const;
-    <%- else -%>
-    <%= @setting.parameterType %> <%= @setting.getterFunctionName %>() const { return m_<%= @setting.name %>; } 
-    <%- end -%>
-    <%- if @setting.hasComplexSetter? -%>
-    WEBCORE_EXPORT void <%= @setting.setterFunctionName %>(<%= @setting.parameterType %>);
-    <%- else -%>
-    void <%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>) { m_<%= @setting.name %> = <%= @setting.name %>; }
-    <%- end -%>
-<%- end -%>
-
-<%- for @conditional in @conditionals do -%>
+<%- for @conditional in @allSettingsSet.conditionals do -%>
+<%- if @conditional.condition -%>
 #if <%= @conditional.condition %>
-<%- for @setting in @conditional.settings do -%>
+<%- end -%>
+<%- for @setting in @conditional.settingsNeedingImplementation do -%>
     <%- if @setting.hasComplexGetter? -%>
     WEBCORE_EXPORT <%= @setting.parameterType %> <%= @setting.getterFunctionName %>() const;
     <%- else -%>
@@ -67,10 +56,12 @@ public:
     void <%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>) { m_<%= @setting.name %> = <%= @setting.name %>; }
     <%- end -%>
 <%- end -%>
+<%- if @conditional.condition -%>
 #endif
-
 <%- end -%>
-<%- for @setting in @inspectorOverrideSettings do -%>
+<%- end -%>
+
+<%- for @setting in @allSettingsSet.inspectorOverrideSettings do -%>
     <%- if @setting.hasComplexSetter? -%>
     WEBCORE_EXPORT void <%= @setting.setterFunctionName %>InspectorOverride(Optional<<%= @setting.parameterType %>>);
     <%- else -%>
@@ -81,37 +72,38 @@ public:
 private:
     WEBCORE_EXPORT explicit Settings(Page*);
 
-<%- for @setting in @inspectorOverrideSettings do -%>
+<%- for @setting in @allSettingsSet.inspectorOverrideSettings do -%>
     Optional<<%= @setting.type %>> m_<%= @setting.name %>InspectorOverride;
 <%- end -%>
 
-<%- for @setting in @unconditionalNonBoolSetting do -%>
-    <%= @setting.type %> m_<%= @setting.name %>;
-<%- end -%>
-
-<%- for @conditional in @conditionals do -%>
-<%- if @conditional.nonBoolSettings.length != 0 -%>
+<%- for @conditional in @allSettingsSet.conditionals do -%>
+<%- if @conditional.nonBoolSettingsNeedingImplementation.length != 0 -%>
+<%- if @conditional.condition -%>
 #if <%= @conditional.condition %>
-<%- for @setting in @conditional.nonBoolSettings -%>
+<%- end -%>
+<%- for @setting in @conditional.nonBoolSettingsNeedingImplementation -%>
     <%= @setting.type %> m_<%= @setting.name %>;
 <%- end -%>
+<%- if @conditional.condition -%>
 #endif
 <%- end -%>
 <%- end -%>
-
-<%- for @setting in @unconditionalBoolSetting do -%>
-    <%= @setting.type %> m_<%= @setting.name %> : 1;
 <%- end -%>
 
-<%- for @conditional in @conditionals do -%>
-<%- if @conditional.boolSettings.length != 0 -%>
+<%- for @conditional in @allSettingsSet.conditionals do -%>
+<%- if @conditional.boolSettingsNeedingImplementation.length != 0 -%>
+<%- if @conditional.condition -%>
 #if <%= @conditional.condition %>
-<%- for @setting in @conditional.boolSettings -%>
+<%- end -%>
+<%- for @setting in @conditional.boolSettingsNeedingImplementation -%>
     <%= @setting.type %> m_<%= @setting.name %> : 1;
 <%- end -%>
+<%- if @conditional.condition -%>
 #endif
 <%- end -%>
 <%- end -%>
+<%- end -%>
+
 };
 
 }
index 5c2c8b3f53192f9dcfb7fb055f26d8d7644f49b7..593d62bf19d47131b97de36d02ece39d91f22d6f 100644 (file)
                7C011F3F24FAD360005BEF10 /* InternalSettingsGenerated.idl.erb */ = {isa = PBXFileReference; lastKnownFileType = text; path = InternalSettingsGenerated.idl.erb; sourceTree = "<group>"; };
                7C011F4024FAD360005BEF10 /* Settings.h.erb */ = {isa = PBXFileReference; lastKnownFileType = text; path = Settings.h.erb; sourceTree = "<group>"; };
                7C011F4124FAD360005BEF10 /* InternalSettingsGenerated.h.erb */ = {isa = PBXFileReference; lastKnownFileType = text; path = InternalSettingsGenerated.h.erb; sourceTree = "<group>"; };
-               7C011F4324FAD361005BEF10 /* GenerateSettings.rb */ = {isa = PBXFileReference; lastKnownFileType = text.script.ruby; name = GenerateSettings.rb; path = Scripts/GenerateSettings.rb; sourceTree = "<group>"; };
+               7C011F4324FAD361005BEF10 /* GenerateSettings.rb */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = text.script.ruby; name = GenerateSettings.rb; path = Scripts/GenerateSettings.rb; sourceTree = "<group>"; };
                7C017C3D24969F1300DC0C02 /* NavigatorPlugins.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = NavigatorPlugins.idl; sourceTree = "<group>"; };
                7C023200251A524800BA7BB6 /* DocumentSVG.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DocumentSVG.h; sourceTree = "<group>"; };
                7C023201251A524800BA7BB6 /* DocumentSVG.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentSVG.cpp; sourceTree = "<group>"; };
index aa295ba4ba8db8bec83791df655d116c0e50caa3..1e8f336b0a51864568f0a87a2c53fc547806aab4 100644 (file)
@@ -203,11 +203,20 @@ macro(GENERATE_SETTINGS_MACROS _infile _outfile)
         ${WEBCORE_DIR}/Scripts/SettingsTemplates/Settings.h.erb
     )
 
+    set(WTF_WEB_PREFERENCES
+        ${WTF_SCRIPTS_DIR}/Preferences/WebPreferences.yaml
+        ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesDebug.yaml
+        ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesExperimental.yaml
+        ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesInternal.yaml
+    )
+
+    set_source_files_properties(${WTF_WEB_PREFERENCES} PROPERTIES GENERATED TRUE)
+
     add_custom_command(
         OUTPUT ${WebCore_DERIVED_SOURCES_DIR}/${_outfile} ${_extra_output}
         MAIN_DEPENDENCY ${_infile}
-        DEPENDS ${NAMES_GENERATOR} ${GENERATE_SETTINGS_SCRIPTS} ${SCRIPTS_BINDINGS}
-        COMMAND ${RUBY_EXECUTABLE} ${NAMES_GENERATOR} --input ${_infile} --outputDir ${WebCore_DERIVED_SOURCES_DIR}
+        DEPENDS ${NAMES_GENERATOR} ${GENERATE_SETTINGS_SCRIPTS} ${SCRIPTS_BINDINGS} ${WTF_WEB_PREFERENCES} WTF_CopyPreferences
+        COMMAND ${RUBY_EXECUTABLE} ${NAMES_GENERATOR} --additionalSettings ${_infile} --base ${WTF_SCRIPTS_DIR}/Preferences/WebPreferences.yaml --debug ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesDebug.yaml --experimental ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesExperimental.yaml --internal ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesInternal.yaml --outputDir ${WebCore_DERIVED_SOURCES_DIR}
         VERBATIM ${_args})
 endmacro()
 
index c94eac0ecd3aee069e21ee6456d23e7e3952ee68..df7c7f2c7bb5bfe7276ec69111ea6a692a5702d2 100644 (file)
@@ -1227,7 +1227,7 @@ static bool supportedCopyCut(Frame* frame)
 static bool defaultValueForSupportedPaste(Frame& frame)
 {
     auto& settings = frame.settings();
-    if (settings.javaScriptCanAccessClipboard() && settings.DOMPasteAllowed())
+    if (settings.javaScriptCanAccessClipboard() && settings.domPasteAllowed())
         return true;
 
     return settings.domPasteAccessRequestsEnabled();
@@ -1370,7 +1370,7 @@ static bool enabledInRichlyEditableText(Frame& frame, Event*, EditorCommandSourc
 static bool allowPasteFromDOM(Frame& frame)
 {
     auto& settings = frame.settings();
-    if (settings.javaScriptCanAccessClipboard() && settings.DOMPasteAllowed())
+    if (settings.javaScriptCanAccessClipboard() && settings.domPasteAllowed())
         return true;
 
     return settings.domPasteAccessRequestsEnabled() && UserGestureIndicator::processingUserGesture();
index bd3497c1a220015656e002045e4e6177c39398b5..caa94c4bb287a82f79fd8956430a97d82157a3ba 100644 (file)
@@ -534,7 +534,7 @@ bool Frame::selectionChangeCallbacksDisabled() const
 
 bool Frame::requestDOMPasteAccess()
 {
-    if (m_settings->javaScriptCanAccessClipboard() && m_settings->DOMPasteAllowed())
+    if (m_settings->javaScriptCanAccessClipboard() && m_settings->domPasteAllowed())
         return true;
 
     if (!m_doc)
index ba41a6bfe452390faea37e6ada7a62734f6c7eca..aaa385a718e873aed081cd3b372c49f92a93aada 100644 (file)
-# FIXME: Add support for global settings.
-# FIXME: Add support for custom getters/setters.
+#
+# Copyright (c) 2020 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+# THE POSSIBILITY OF SUCH DAMAGE.
 
-defaultTextEncodingName:
-  type: String
-ftpDirectoryTemplatePath:
-  type: String
-localStorageDatabasePath:
-  type: String
-editableLinkBehavior:
-  type: EditableLinkBehavior
-  initial: EditableLinkDefaultBehavior
-textDirectionSubmenuInclusionBehavior:
-  type: TextDirectionSubmenuInclusionBehavior
-  initial: TextDirectionSubmenuAutomaticallyIncluded
-pdfImageCachingPolicy:
-  type: PDFImageCachingPolicy
-  initial: PDFImageCachingDefault
-passwordEchoDurationInSeconds:
-  type: double
-  initial: 1
-
-# Sets the magnification value for validation message timer.  If the
-# magnification value is N, a validation message disappears automatically after
-# <message length> * N / 1000 seconds.  If N is equal to or less than 0, a
-# validation message doesn't disappears automaticaly.
-validationMessageTimerMagnification:
-  type: int
-  initial: 50
-
-# Number of pixels below which 2D canvas is rendered in software
-# even if hardware acceleration is enabled.
-# Hardware acceleration is useful for large canvases where it can avoid the
-# pixel bandwidth between the CPU and GPU. But GPU acceleration comes at
-# a price - extra back-buffer and texture copy. Small canvases are also
-# widely used for stylized fonts. Anti-aliasing text in hardware at that
-# scale is generally slower. So below a certain size it is better to
-# draw canvas in software.
-minimumAccelerated2dCanvasSize:
-  type: int
-  initial: 257*256
-
-maximumAccelerated2dCanvasSize:
-  type: unsigned
-  initial: 5120*2880
-
-layoutFallbackWidth:
-  type: int
-  initial: 980
-deviceWidth:
-  type: int
-  initial: 0
-deviceHeight:
-  type: int
-  initial: 0
-
-disallowSyncXHRDuringPageDismissalEnabled:
-  type: bool
-  initial: true
-
-# Allow clients concerned with memory consumption to set a quota on session storage
-# since the memory used won't be released until the Page is destroyed.
-sessionStorageQuota:
-  type: unsigned
-  initial: StorageMap::noQuota
-
-minimumFontSize:
-  type: int
-  initial: 0
-  onChange: setNeedsRecalcStyleInAllFrames
-minimumLogicalFontSize:
-  type: int
-  initial: 0
-  onChange: setNeedsRecalcStyleInAllFrames
-defaultFontSize:
-  type: int
-  initial: 16
-  onChange: setNeedsRecalcStyleInAllFrames
-defaultFixedFontSize:
-  type: int
-  initial: 13
-  onChange: setNeedsRecalcStyleInAllFrames
-
-editingBehaviorType:
-  type: EditingBehaviorType
-  initial: editingBehaviorTypeForPlatform()
-maximumHTMLParserDOMTreeDepth:
-  type: unsigned
-  initial: defaultMaximumHTMLParserDOMTreeDepth
-
-# This setting only affects site icon image loading if loadsImagesAutomatically setting is false and this setting is true.
-# All other permutations still heed loadsImagesAutomatically setting.
-loadsSiteIconsIgnoringImageLoadingSetting:
-  initial: false
-
-caretBrowsingEnabled:
-  initial: false
-preventKeyboardDOMEventDispatch:
-  initial: false
-localStorageEnabled:
-  initial: false
-allowUniversalAccessFromFileURLs:
-  initial: true
-allowFileAccessFromFileURLs:
-  initial: true
-allowSettingAnyXHRHeaderFromFileURLs:
-  initial: false
-allowCrossOriginSubresourcesToAskForCredentials:
-  initial: false
-allowTopNavigationToDataURLs:
-  initial: false
-needsStorageAccessFromFileURLsQuirk:
-  initial: true
-needsFrameNameFallbackToIdQuirk:
-  initial: false
-useAnonymousModeWhenFetchingMaskImages:
-  initial: true
-javaScriptCanOpenWindowsAutomatically:
-  initial: false
-javaScriptCanAccessClipboard:
-  initial: false
-shouldPrintBackgrounds:
-  initial: false
-clipboardAccessPolicy:
-  type: ClipboardAccessPolicy
-  initial: ClipboardAccessPolicy::RequiresUserGesture
-asyncClipboardAPIEnabled:
-  initial: false
-shouldRestrictBaseURLSchemes:
-  initial: true
-
-textAreasAreResizable:
-  initial: false
-  onChange: setNeedsRecalcStyleInAllFrames
-authorAndUserStylesEnabled:
-  initial: true
-  onChange: setNeedsRecalcStyleInAllFrames
-  inspectorOverride: true
-userStyleSheetLocation:
-  type: URL
-  onChange: userStyleSheetLocationChanged
-acceleratedCompositingEnabled:
-  initial: true
-  onChange: setNeedsRecalcStyleInAllFrames
-acceleratedCompositedAnimationsEnabled:
-  initial: true
-  onChange: setNeedsRecalcStyleInAllFrames
-showDebugBorders:
-  initial: false
-  onChange: setNeedsRecalcStyleInAllFrames
-  inspectorOverride: true
-showRepaintCounter:
-  initial: false
-  onChange: setNeedsRecalcStyleInAllFrames
-  inspectorOverride: true
-visibleDebugOverlayRegions:
-  type: DebugOverlayRegions
-  initial: 0
-showTiledScrollingIndicator:
-  initial: false
-resourceUsageOverlayVisible:
-  initial: false
-  onChange: resourceUsageOverlayVisibleChanged
-  condition: RESOURCE_USAGE
-disableScreenSizeOverride:
-  initial: false
-
-googleAntiFlickerOptimizationQuirkEnabled:
-  initial: true
-
-# This is a quirk we are pro-actively applying to old applications. It changes keyboard event dispatching,
-# making keyIdentifier available on keypress events, making charCode available on keydown/keyup events,
-# and getting keypress dispatched in more cases.
-needsKeyboardEventDisambiguationQuirks:
-  initial: false
-
-# This is an iOS-specific quirk. Unlike Mac, keyboard operations are asynchronous and hence a DOM update as
-# a result of text insertion or deletion does not occur within the same event loop iteration as a dispatched
-# DOM keydown event. Some sites, notably Google Sheets, schedule timers on keypress and expect on a DOM update
-# to have occurred on expiration. When enabled, this quirk puts all such scheduled timers in a holding tank
-# until the keyboard performs the insertion or deletion. This gives Google Sheets the illusion that the DOM
-# update happened within the same event loop iteration that the keypress event was dispatched in.
-needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommandQuirk:
-  initial: false
-
-treatsAnyTextCSSLinkAsStylesheet:
-  initial: false
-shrinksStandaloneImagesToFit:
-  initial: true
-backForwardCacheSupportsPlugins:
-  initial: false
-showsURLsInToolTips:
-  initial: false
-showsToolTipOverTruncatedText:
-  initial: false
-forceFTPDirectoryListings:
-  initial: false
-developerExtrasEnabled:
-  initial: false
-needsSiteSpecificQuirks:
-  initial: false
-  inspectorOverride: true
-domTimersThrottlingEnabled:
-  initial: true
-webArchiveDebugModeEnabled:
-  initial: false
-  conditional: ENABLE(WEB_ARCHIVE)
-localFileContentSniffingEnabled:
-  initial: false
-offlineWebApplicationCacheEnabled:
-  initial: false
-enforceCSSMIMETypeInNoQuirksMode:
-  initial: true
-usesEncodingDetector:
-  initial: false
-canvasUsesAcceleratedDrawing:
-  initial: false
-acceleratedDrawingEnabled:
-  initial: false
-displayListDrawingEnabled:
-  initial: false
-acceleratedFiltersEnabled:
-  initial: false
-useLegacyTextAlignPositionedElementBehavior:
-  initial: false
-javaScriptRuntimeFlags:
-  type: JSC::RuntimeFlags
-
-# FIXME: This should really be disabled by default as it makes platforms that don't support the feature download files
-# they can't use by. Leaving enabled for now to not change existing behavior.
-downloadableBinaryFontsEnabled:
-  initial: defaultDownloadableBinaryFontsEnabled()
-
-xssAuditorEnabled:
-  initial: false
-acceleratedCompositingForFixedPositionEnabled:
-  initial: defaultAcceleratedCompositingForFixedPositionEnabled
-rubberBandingForSubScrollableRegionsEnabled:
-  initial: true
-  conditional: ENABLE(RUBBER_BANDING)
-
-experimentalNotificationsEnabled:
-  initial: false
-webGLEnabled:
-  initial: false
-webGLErrorsToConsoleEnabled:
-  initial: true
-unhandledPromiseRejectionToConsoleEnabled:
-  initial: true
-forceWebGLUsesLowPower:
-  initial: false
-accelerated2dCanvasEnabled:
-  initial: false
-loadDeferringEnabled:
-  initial: true
-webAudioEnabled:
-  initial: false
-prefixedWebAudioEnabled:
-  initial: false
-modernUnprefixedWebAudioEnabled:
-  initial: false
-audioWorkletEnabled:
-  initial: false
-paginateDuringLayoutEnabled:
-  initial: false
-fullScreenEnabled:
-  initial: false
-  conditional: ENABLE(FULLSCREEN_API)
-asynchronousSpellCheckingEnabled:
-  initial: false
-
-# This feature requires an implementation of ValidationMessageClient.
-interactiveFormValidationEnabled:
-  initial: false
-
-usePreHTML5ParserQuirks:
-  initial: false
-hyperlinkAuditingEnabled:
-  initial: false
-crossOriginCheckInGetMatchedCSSRulesDisabled:
-  initial: false
-forceCompositingMode:
-  initial: false
-shouldInjectUserScriptsInInitialEmptyDocument:
-  initial: false
-fixedElementsLayoutRelativeToFrame:
-  initial: false
-allowDisplayOfInsecureContent:
-  initial: false
-allowRunningOfInsecureContent:
-  initial: false
-requiresUserGestureToLoadVideo:
-  initial: defaultRequiresUserGestureToLoadVideo
-videoPlaybackRequiresUserGesture:
-  initial: defaultVideoPlaybackRequiresUserGesture
-audioPlaybackRequiresUserGesture:
-  initial: defaultAudioPlaybackRequiresUserGesture
-mainContentUserGestureOverrideEnabled:
-  initial: false
-mediaUserGestureInheritsFromDocument:
-  initial: false
-allowsInlineMediaPlayback:
-  initial: defaultAllowsInlineMediaPlayback
-allowsInlineMediaPlaybackAfterFullscreen:
-  initial: true
-inlineMediaPlaybackRequiresPlaysInlineAttribute:
-  initial: defaultInlineMediaPlaybackRequiresPlaysInlineAttribute
-allowsPictureInPictureMediaPlayback:
-  initial: defaultAllowsPictureInPictureMediaPlayback
-pictureInPictureAPIEnabled:
-  initial: true
-mediaControlsScaleWithPageZoom:
-  initial: defaultMediaControlsScaleWithPageZoom
-invisibleAutoplayNotPermitted:
-  initial: false
-passwordEchoEnabled:
-  initial: false
-suppressesIncrementalRendering:
-  initial: false
-incrementalRenderingSuppressionTimeoutInSeconds:
-  type: double
-  initial: defaultIncrementalRenderingSuppressionTimeoutInSeconds
-backspaceKeyNavigationEnabled:
-  initial: true
-shouldDisplaySubtitles:
-  initial: false
-  conditional: ENABLE(VIDEO)
-shouldDisplayCaptions:
-  initial: false
-  conditional: ENABLE(VIDEO)
-shouldDisplayTextDescriptions:
-  initial: false
-  conditional: ENABLE(VIDEO)
-genericCueAPIEnabled:
-  initial: false
-  conditional: ENABLE(VIDEO)
-useGPUProcessForMediaEnabled:
-  initial: false
-  conditional: ENABLE(GPU_PROCESS)
-scrollingCoordinatorEnabled:
-  initial: false
-scrollingTreeIncludesFrames:
-  initial: defaultScrollingTreeIncludesFrames
-scrollAnimatorEnabled:
-  initial: true
-  conditional: ENABLE(SMOOTH_SCROLLING)
-forceUpdateScrollbarsOnMainThreadForPerformanceTesting:
-  initial: false
-notificationsEnabled:
-  initial: true
-lazyIframeLoadingEnabled:
-  initial: false
-
-# Some apps needs isLoadingInAPISense to account for active subresource loaders.
-needsIsLoadingInAPISenseQuirk:
-  initial: false
-
-shouldRespectImageOrientation:
-  initial: defaultShouldRespectImageOrientation
-imageSubsamplingEnabled:
-  initial: defaultImageSubsamplingEnabled
-wantsBalancedSetDefersLoadingBehavior:
-  initial: false
-requestAnimationFrameEnabled:
-  initial: true
-requestIdleCallbackEnabled:
-  initial: false
-
-HTTPSUpgradeEnabled:
-  initial: false
-
-inProcessCookieCacheEnabled:
-  initial: false
-
-thirdPartyIframeRedirectBlockingEnabled:
-  initial: true
-
-cookieEnabled:
-  initial: true
-mediaEnabled:
-  initial: defaultMediaEnabled
-DOMPasteAllowed:
-  initial: false
-
-domPasteAccessRequestsEnabled:
-  initial: false
-
-# When enabled, window.blur() does not change focus, and
-# window.focus() only changes focus when invoked from the context that
-# created the window.
-windowFocusRestricted:
-  initial: true
-
-diagnosticLoggingEnabled:
-  initial: false
-
-plugInSnapshottingEnabled:
-  initial: false
-
-snapshotAllPlugIns:
-  initial: false
-
-autostartOriginPlugInSnapshottingEnabled:
-  initial: true
-
-primaryPlugInSnapshotDetectionEnabled:
-  initial: true
-
-maximumPlugInSnapshotAttempts:
-  type: unsigned
-  initial: 20
-
-frameFlattening:
-  type: FrameFlattening
-  initial: FrameFlattening::Disabled
-  onChange: setNeedsRelayoutAllFrames
-
-asyncFrameScrollingEnabled:
-  initial: false
-  onChange: setNeedsRelayoutAllFrames
-
-asyncOverflowScrollingEnabled:
-  initial: false
-  onChange: setNeedsRelayoutAllFrames
-
-coreImageAcceleratedFilterRenderEnabled:
-  initial: false
-  onChange: setNeedsRelayoutAllFrames
-
-legacyOverflowScrollingTouchEnabled:
-  initial: true
-  onChange: setNeedsRelayoutAllFrames
-  conditional: ENABLE(OVERFLOW_SCROLLING_TOUCH)
-
-webSecurityEnabled:
-  initial: true
-  inspectorOverride: true
-spatialNavigationEnabled:
-  initial: false
-
-autoscrollForDragAndDropEnabled:
-  initial: false
-
-unifiedTextCheckerEnabled:
-  initial: defaultUnifiedTextCheckerEnabled
-
-logsPageMessagesToSystemConsoleEnabled:
-  initial: false
-
-backForwardCacheExpirationInterval:
-  type: Seconds
-  initial: 30_min
-
-# Some apps could have a default video poster if it is not set.
-defaultVideoPosterURL:
-  type: String
-
-smartInsertDeleteEnabled:
-  initial: defaultSmartInsertDeleteEnabled
-selectTrailingWhitespaceEnabled:
-  initial: defaultSelectTrailingWhitespaceEnabled
-selectionAcrossShadowBoundariesEnabled:
-  initial: true
-
-useLegacyBackgroundSizeShorthandBehavior:
-  initial: false
-fixedBackgroundsPaintRelativeToDocument:
-  initial: defaultFixedBackgroundsPaintRelativeToDocument
-
-textAutosizingEnabled:
-  initial: defaultTextAutosizingEnabled()
-  onChange: setNeedsRecalcStyleInAllFrames
-  conditional: ENABLE(TEXT_AUTOSIZING)
-textAutosizingWindowSizeOverride:
-  type: IntSize
-  onChange: setNeedsRecalcStyleInAllFrames
-  conditional: ENABLE(TEXT_AUTOSIZING)
-minimumZoomFontSize:
-  type: float
-  initial: defaultMinimumZoomFontSize()
-  conditional: ENABLE(TEXT_AUTOSIZING)
-textAutosizingUsesIdempotentMode:
-  initial: false
-  onChange: setNeedsRecalcStyleInAllFrames
-  conditional: ENABLE(TEXT_AUTOSIZING)
-idempotentModeAutosizingOnlyHonorsPercentages:
-  initial: false
-  conditional: ENABLE(TEXT_AUTOSIZING)
-  # This is only set before the main frame load, so there's no need to specify setNeedsRecalcStyleInAllFrames.
-
-subpixelAntialiasedLayerTextEnabled:
-  initial: false
-  onChange: setNeedsRecalcStyleInAllFrames
-simpleLineLayoutEnabled:
+acceleratedCompositedAnimationsEnabled:
   initial: true
   onChange: setNeedsRecalcStyleInAllFrames
-simpleLineLayoutDebugBordersEnabled:
-  initial: false
-  onChange: setNeedsRecalcStyleInAllFrames
-
-contentChangeObserverEnabled:
-  initial: defaultContentChangeObserverEnabled()
-
-useGiantTiles:
-  initial: false
-
-mediaSourceEnabled:
-  initial: platformDefaultMediaSourceEnabled()
-  conditional: ENABLE(MEDIA_SOURCE)
 
-sourceBufferChangeTypeEnabled:
-  initial: true
-  conditional: ENABLE(MEDIA_SOURCE)
+acceleratedCompositingForFixedPositionEnabled:
+  initial: defaultAcceleratedCompositingForFixedPositionEnabled
 
-# FIXME: Rename to allowMultiElementImplicitFormSubmission once we upstream the iOS changes to WebView.mm.
-allowMultiElementImplicitSubmission:
+acceleratedFiltersEnabled:
   initial: false
 
-allowsAirPlayForMediaPlayback:
-  initial: true
-  conditional: ENABLE(WIRELESS_PLAYBACK_TARGET)
-
-remotePlaybackEnabled:
-  initial: true
-  conditional: ENABLE(WIRELESS_PLAYBACK_TARGET)
-
-shouldConvertPositionStyleOnCopy:
+allowContentSecurityPolicySourceStarToMatchAnyProtocol:
   initial: false
 
-maxParseDuration:
-  type: double
-  initial: -1
-standalone:
-  initial: false
-telephoneNumberParsingEnabled:
-  initial: false
-mediaDataLoadsAutomatically:
-  initial: defaultMediaDataLoadsAutomatically
-alwaysUseAcceleratedOverflowScroll:
-  initial: false
-imageControlsEnabled:
+allowDisplayOfInsecureContent:
   initial: false
-  conditional: ENABLE(SERVICE_CONTROLS)
 
-enableInheritURIQueryComponent:
+allowRunningOfInsecureContent:
   initial: false
 
-aggressiveTileRetentionEnabled:
+animatedImageDebugCanvasDrawingEnabled:
   initial: false
-temporaryTileCohortRetentionEnabled:
-  initial: true
 
-useImageDocumentForSubframePDF:
+appleMailPaginationQuirkEnabled:
   initial: false
-dataDetectorTypes:
-  type: DataDetectorTypes
-  initial: 
-  conditional: ENABLE(DATA_DETECTION)
 
-# Allow SourceBuffers to store up to 304MB each, enough for approximately five minutes
-# of 1080p video and stereo audio.
-maximumSourceBufferSize:
-  type: int
-  initial: 318767104
-  conditional: ENABLE(MEDIA_SOURCE)
+audioPlaybackRequiresUserGesture:
+  initial: defaultAudioPlaybackRequiresUserGesture
 
-serviceControlsEnabled:
+autoscrollForDragAndDropEnabled:
   initial: false
-  conditional: ENABLE(SERVICE_CONTROLS)
 
-appleMailPaginationQuirkEnabled:
-  initial: false
+backForwardCacheExpirationInterval:
+  type: Seconds
+  initial: 30_min
 
-deferredCSSParserEnabled:
+backgroundShouldExtendBeyondPage:
   initial: false
+  onChange: backgroundShouldExtendBeyondPageChanged
 
-repaintOutsideLayoutEnabled:
+clientCoordinatesRelativeToLayoutViewport:
   initial: false
+  onChange: setNeedsRecalcStyleInAllFrames
 
-httpEquivEnabled:
-  initial: true
+clipboardAccessPolicy:
+  type: ClipboardAccessPolicy
+  initial: ClipboardAccessPolicy::RequiresUserGesture
 
 # Some ports (e.g. iOS) might choose to display attachments inline, regardless of whether the response includes the
 # HTTP header "Content-Disposition: attachment". This setting enables a sandbox around these attachments. The sandbox
@@ -587,126 +76,46 @@ httpEquivEnabled:
 contentDispositionAttachmentSandboxEnabled:
   initial: false
 
-userInterfaceDirectionPolicy:
-  type: UserInterfaceDirectionPolicy
-  initial: UserInterfaceDirectionPolicy::Content
-systemLayoutDirection:
-  type: TextDirection
-  initial: TextDirection::LTR
-
-allowContentSecurityPolicySourceStarToMatchAnyProtocol:
-  initial: false
-
-selectionPaintingWithoutSelectionGapsEnabled:
-  initial: false
-
-shouldConvertInvalidURLsToBlank:
-  initial: true
-
-springTimingFunctionEnabled:
-  initial: false
-
-colorFilterEnabled:
-  initial: false
-  onChange: setNeedsRecalcStyleInAllFrames
-
-punchOutWhiteBackgroundsInDarkMode:
-  initial: false
-  onChange: setNeedsRecalcStyleInAllFrames
-
-treatIPAddressAsDomain:
-  initial: false
-
-mediaPreloadingEnabled:
-  initial: false
-
-layoutViewportHeightExpansionFactor:
-  type: double
-  initial: 0
-  onChange: setNeedsRecalcStyleInAllFrames
-
-visualViewportEnabled:
-  initial: true
-  onChange: setNeedsRecalcStyleInAllFrames
-
-visualViewportAPIEnabled:
-  initial: false
-
-syntheticEditingCommandsEnabled:
-  initial: true
-
-CSSOMViewScrollingAPIEnabled:
-  initial: false
-
-CSSOMViewSmoothScrollingEnabled:
+crossOriginCheckInGetMatchedCSSRulesDisabled:
   initial: false
 
-inputEventsEnabled:
-  initial: true
-
-quickTimePluginReplacementEnabled:
-  initial: defaultQuickTimePluginReplacementEnabled
-youTubeFlashPluginReplacementEnabled:
-  initial: defaultYouTubeFlashPluginReplacementEnabled
-
-forcedColorsAreInvertedAccessibilityValue:
-  type: ForcedAccessibilityValue
-  initial: defaultForcedColorsAreInvertedAccessibilityValue
-forcedDisplayIsMonochromeAccessibilityValue:
-  type: ForcedAccessibilityValue
-  initial: defaultForcedDisplayIsMonochromeAccessibilityValue
-forcedPrefersReducedMotionAccessibilityValue:
-  type: ForcedAccessibilityValue
-  initial: defaultForcedPrefersReducedMotionAccessibilityValue
-forcedSupportsHighDynamicRangeValue:
-  type: ForcedAccessibilityValue
-  initial: defaultForcedSupportsHighDynamicRangeValue
-  onChange: setNeedsRecalcStyleInAllFrames
-
-largeImageAsyncDecodingEnabled:
-  initial: true
-animatedImageAsyncDecodingEnabled:
-  initial: true
-webkitImageReadyEventEnabled:
-  initial: false
+dataDetectorTypes:
+  type: DataDetectorTypes
+  initial:
+  conditional: ENABLE(DATA_DETECTION)
 
-shouldSuppressTextInputFromEditingDuringProvisionalNavigation:
-  initial: false
+# Some apps could have a default video poster if it is not set.
+defaultVideoPosterURL:
+  type: String
 
-langAttributeAwareFormControlUIEnabled:
+disableScreenSizeOverride:
   initial: false
 
-subresourceIntegrityEnabled:
-  initial: true
+# FIXME: This should really be disabled by default as it makes platforms that don't support the feature download files
+# they can't use by. Leaving enabled for now to not change existing behavior.
+downloadableBinaryFontsEnabled:
+  initial: defaultDownloadableBinaryFontsEnabled()
 
-linkPreconnectEnabled:
-  initial: false
+editableLinkBehavior:
+  type: EditableLinkBehavior
+  initial: EditableLinkDefaultBehavior
 
-beaconAPIEnabled:
-  initial: false
+editingBehaviorType:
+  type: EditingBehaviorType
+  initial: editingBehaviorTypeForPlatform()
 
-geolocationFloorLevelEnabled:
+enforceCSSMIMETypeInNoQuirksMode:
   initial: true
 
-constantPropertiesEnabled:
+experimentalNotificationsEnabled:
   initial: false
 
-viewportFitEnabled:
-  initial: false
+fixedBackgroundsPaintRelativeToDocument:
+  initial: defaultFixedBackgroundsPaintRelativeToDocument
 
-allowMediaContentTypesRequiringHardwareSupportAsFallback:
+fixedElementsLayoutRelativeToFrame:
   initial: false
 
-storageAccessAPIEnabled:
-  initial: true
-
-storageAccessAPIPerPageScopeEnabled:
-  initial: true
-
-timeWithoutMouseMovementBeforeHidingControls:
-  type: Seconds
-  initial: 3_s
-
 fontFallbackPrefersPictographs:
   initial: false
   onChange: setNeedsRecalcStyleInAllFrames
@@ -714,410 +123,318 @@ fontFallbackPrefersPictographs:
 fontLoadTimingOverride:
   type: FontLoadTimingOverride
   initial: FontLoadTimingOverride::None
-shouldIgnoreFontLoadCompletions:
-  initial: false
-
-applePayCapabilityDisclosureAllowed:
-  conditional: ENABLE(APPLE_PAY)
-  initial: true
-applePayEnabled:
-  conditional: ENABLE(APPLE_PAY)
-  initial: defaultApplePayEnabled
-applePayRemoteUIEnabled:
-  conditional: ENABLE(APPLE_PAY_REMOTE_UI)
-  initial: true
-paymentRequestEnabled:
-  conditional: ENABLE(PAYMENT_REQUEST)
-  initial: false
-
-javaEnabled:
-  initial: false
-  getter: isJavaEnabled
-javaEnabledForLocalFiles:
-  initial: true
-  getter: isJavaEnabledForLocalFiles
-
-# Unlike the imagesEnabled setting, this only suppresses the network load of
-# the image URL. A cached image will still be rendered if requested.
-loadsImagesAutomatically:
-  initial: false
-  onChange: imagesEnabledChanged
-imagesEnabled:
-  initial: true
-  getter: areImagesEnabled
-  onChange: imagesEnabledChanged
-  inspectorOverride: true
-scriptEnabled:
-  initial: false
-  getter: isScriptEnabled
-  inspectorOverride: true
-parserScriptingFlagPolicy:
-  type: ParserScriptingFlagPolicy
-  initial: ParserScriptingFlagPolicy::OnlyIfScriptIsEnabled
-pluginsEnabled:
-  initial: false
-  getter: arePluginsEnabled
-  onChange: pluginsEnabledChanged
-
-usesBackForwardCache:
-  initial: false
-  onChange: usesBackForwardCacheChanged
-  excludeFromInternalSettings: true
-
-dnsPrefetchingEnabled:
-  initial: false
-  onChange: dnsPrefetchingEnabledChanged
-
-backgroundShouldExtendBeyondPage:
-  initial: false
-  onChange: backgroundShouldExtendBeyondPageChanged
-
-scrollingPerformanceLoggingEnabled:
-  initial: false
-  onChange: scrollingPerformanceLoggingEnabledChanged
-
-hiddenPageDOMTimerThrottlingEnabled:
-  initial: false
-  onChange: hiddenPageDOMTimerThrottlingStateChanged
-hiddenPageDOMTimerThrottlingAutoIncreases:
-  initial: false
-  onChange: hiddenPageDOMTimerThrottlingStateChanged
-hiddenPageCSSAnimationSuspensionEnabled:
-  initial: false
-  onChange: hiddenPageCSSAnimationSuspensionEnabledChanged
-
-storageBlockingPolicy:
-  type: SecurityOrigin::StorageBlockingPolicy
-  initial: SecurityOrigin::AllowAllStorage
-  onChange: storageBlockingPolicyChanged
-
-shouldAllowUserInstalledFonts:
-  initial: true
-  onChange: setNeedsRecalcStyleInAllFrames
-
-resizeObserverEnabled:
-  initial: false
-  conditional: ENABLE(RESIZE_OBSERVER)
-
-# Only set by Layout Tests.
-mediaTypeOverride:
-  type: String
-  initial: '"screen"'
-  onChange: mediaTypeOverrideChanged
-
-animatedImageDebugCanvasDrawingEnabled:
-  initial: false
 
 fontRenderingMode:
   type: FontRenderingMode
   initial: FontRenderingMode::Normal
 
-preferMIMETypeForImages:
+forceCompositingMode:
   initial: false
 
 forcePendingWebGLPolicy:
   initial: false
   getter: isForcePendingWebGLPolicy
 
-mediaKeysStorageDirectory:
-  type: String
-
-exposeSpeakersEnabled:
-  initial: false
-
-perElementSpeakerSelectionEnabled:
+forceWebGLUsesLowPower:
   initial: false
 
-speakerSelectionRequiresUserGesture:
-  initial: true
+forcedColorsAreInvertedAccessibilityValue:
+  type: ForcedAccessibilityValue
+  initial: defaultForcedColorsAreInvertedAccessibilityValue
 
-mediaDeviceIdentifierStorageDirectory:
-  type: String
-  conditional: ENABLE(MEDIA_STREAM)
+forcedDisplayIsMonochromeAccessibilityValue:
+  type: ForcedAccessibilityValue
+  initial: defaultForcedDisplayIsMonochromeAccessibilityValue
 
-# FIXME: This quirk is needed because of Radar 4674537 and 5211271. We need to phase it out once Adobe
-# can fix the bug from their end.
-needsAdobeFrameReloadingQuirk:
-  initial: false
-  getter: needsAcrobatFrameReloadingQuirk
+forcedPrefersReducedMotionAccessibilityValue:
+  type: ForcedAccessibilityValue
+  initial: defaultForcedPrefersReducedMotionAccessibilityValue
 
-passiveTouchListenersAsDefaultOnDocument:
-  initial: true
+forcedSupportsHighDynamicRangeValue:
+  type: ForcedAccessibilityValue
+  initial: defaultForcedSupportsHighDynamicRangeValue
+  onChange: setNeedsRecalcStyleInAllFrames
 
-touchEventEmulationEnabled:
-  initial: false
-  getter: isTouchEventEmulationEnabled
-  conditional: ENABLE(TOUCH_EVENTS)
+frameFlattening:
+  type: FrameFlattening
+  initial: FrameFlattening::Disabled
+  onChange: setNeedsRelayoutAllFrames
 
-deviceOrientationEventEnabled:
-  type: bool
+geolocationFloorLevelEnabled:
   initial: true
-  conditional: ENABLE(DEVICE_ORIENTATION)
 
-deviceOrientationPermissionAPIEnabled:
-  type: bool
-  initial: false
-  conditional: ENABLE(DEVICE_ORIENTATION)
-
-shouldEnableTextAutosizingBoost:
-  type: bool
+idempotentModeAutosizingOnlyHonorsPercentages:
   initial: false
   conditional: ENABLE(TEXT_AUTOSIZING)
-  onChange: shouldEnableTextAutosizingBoostChanged
 
-mediaCapabilitiesEnabled:
-  initial: false
+imageSubsamplingEnabled:
+  initial: defaultImageSubsamplingEnabled
 
-mediaCapabilitiesExtensionsEnabled:
-  type: bool
-  initial: false
+imagesEnabled:
+  initial: true
+  getter: areImagesEnabled
+  onChange: imagesEnabledChanged
+  inspectorOverride: true
 
-hdrMediaCapabilitiesEnabled:
-  type: bool
+isAccessibilityIsolatedTreeEnabled:
   initial: false
 
-clientCoordinatesRelativeToLayoutViewport:
-  initial: false
-  onChange: setNeedsRecalcStyleInAllFrames
+isPerActivityStateCPUUsageMeasurementEnabled:
+  initial: defaultPerActivityStateCPUUsageMeasurementEnabled
 
-incompleteImageBorderEnabled:
-  initial: false
+isPostBackgroundingCPUUsageMeasurementEnabled:
+  initial: defaultPostBackgroundingCPUUsageMeasurementEnabled
 
-shouldDeferAsynchronousScriptsUntilAfterDocumentLoadOrFirstPaint:
-  initial: true
+isPostBackgroundingMemoryUsageMeasurementEnabled:
+  initial: defaultPostBackgroundingMemoryUsageMeasurementEnabled
 
-shouldIgnoreMetaViewport:
-  initial: false
+isPostLoadCPUUsageMeasurementEnabled:
+  initial: defaultPostLoadCPUUsageMeasurementEnabled
 
-videoQualityIncludesDisplayCompositingEnabled:
-  initial: false
-  conditional: ENABLE(VIDEO)
+isPostLoadMemoryUsageMeasurementEnabled:
+  initial: defaultPostLoadMemoryUsageMeasurementEnabled
+
+javaScriptRuntimeFlags:
+  type: JSC::RuntimeFlags
 
-adClickAttributionEnabled:
+langAttributeAwareFormControlUIEnabled:
   initial: false
 
-coreMathMLEnabled:
+# FIMXE: This does not appear to ever be set to true. Remove once verified.
+legacyBeforeLoadEventEnabled:
   initial: false
-  onChange: setNeedsRecalcStyleInAllFrames
 
-blockingOfSmallPluginsEnabled:
+loadDeferringEnabled:
   initial: true
 
-shouldDecidePolicyBeforeLoadingQuickLookPreview:
-  initial: false
+localStorageDatabasePath:
+  type: String
 
-shouldDispatchSyntheticMouseEventsWhenModifyingSelection:
-  initial: false
+maximumAccelerated2dCanvasSize:
+  type: uint32_t
+  initial: 5120*2880
 
-shouldDispatchSyntheticMouseOutAfterSyntheticClick:
-  initial: false
+maximumHTMLParserDOMTreeDepth:
+  type: uint32_t
+  initial: defaultMaximumHTMLParserDOMTreeDepth
 
-allowViewportShrinkToFitContent:
-  initial: true
+maximumPlugInSnapshotAttempts:
+  type: uint32_t
+  initial: 20
 
-webRTCEncryptionEnabled:
-  initial: true
-  inspectorOverride: true
+# Allow SourceBuffers to store up to 304MB each, enough for approximately five minutes
+# of 1080p video and stereo audio.
+maximumSourceBufferSize:
+  type: uint32_t
+  initial: 318767104
+  conditional: ENABLE(MEDIA_SOURCE)
 
-isThirdPartyCookieBlockingDisabled:
-  initial: false
+mediaDeviceIdentifierStorageDirectory:
+  type: String
+  conditional: ENABLE(MEDIA_STREAM)
 
-isFirstPartyWebsiteDataRemovalDisabled:
-  initial: false
+mediaKeysStorageDirectory:
+  type: String
 
-isFirstPartyWebsiteDataRemovalLiveOnTestingEnabled:
-  initial: false
+mediaTypeOverride:
+  type: String
+  initial: '"screen"'
+  onChange: mediaTypeOverrideChanged
 
-isFirstPartyWebsiteDataRemovalReproTestingEnabled:
-  initial: false
+# Number of pixels below which 2D canvas is rendered in software
+# even if hardware acceleration is enabled.
+# Hardware acceleration is useful for large canvases where it can avoid the
+# pixel bandwidth between the CPU and GPU. But GPU acceleration comes at
+# a price - extra back-buffer and texture copy. Small canvases are also
+# widely used for stylized fonts. Anti-aliasing text in hardware at that
+# scale is generally slower. So below a certain size it is better to
+# draw canvas in software.
+minimumAccelerated2dCanvasSize:
+  type: uint32_t
+  initial: 257*256
 
-isSameSiteStrictEnforcementEnabled:
+# FIXME: This quirk is needed because of Radar 4674537 and 5211271. We need to phase it out once Adobe
+# can fix the bug from their end.
+needsAdobeFrameReloadingQuirk:
   initial: false
+  getter: needsAcrobatFrameReloadingQuirk
 
-isLoggedInAPIEnabled:
+# This is an iOS-specific quirk. Unlike Mac, keyboard operations are asynchronous and hence a DOM update as
+# a result of text insertion or deletion does not occur within the same event loop iteration as a dispatched
+# DOM keydown event. Some sites, notably Google Sheets, schedule timers on keypress and expect on a DOM update
+# to have occurred on expiration. When enabled, this quirk puts all such scheduled timers in a holding tank
+# until the keyboard performs the insertion or deletion. This gives Google Sheets the illusion that the DOM
+# update happened within the same event loop iteration that the keypress event was dispatched in.
+needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommandQuirk:
   initial: false
 
-enterKeyHintEnabled:
+needsFrameNameFallbackToIdQuirk:
   initial: false
 
-# FIXME: Seems to be unused. Remove once verified.
-isInAppBrowserPrivacyEnabled:
+# Some apps needs isLoadingInAPISense to account for active subresource loaders.
+needsIsLoadingInAPISenseQuirk:
   initial: false
 
-# FIXME: Seems to be unused. Remove once verified.
-NeedsInAppBrowserPrivacyQuirks:
+# This is a quirk we are pro-actively applying to old applications. It changes keyboard event dispatching,
+# making keyIdentifier available on keypress events, making charCode available on keydown/keyup events,
+# and getting keypress dispatched in more cases.
+needsKeyboardEventDisambiguationQuirks:
   initial: false
 
-isAccessibilityIsolatedTreeEnabled:
-  initial: false
+parserScriptingFlagPolicy:
+  type: ParserScriptingFlagPolicy
+  initial: ParserScriptingFlagPolicy::OnlyIfScriptIsEnabled
 
-aspectRatioOfImgFromWidthAndHeightEnabled:
+paymentRequestEnabled:
+  conditional: ENABLE(PAYMENT_REQUEST)
   initial: false
 
-inputTypeColorEnabled:
-  initial: false
-  conditional: ENABLE(INPUT_TYPE_COLOR)
+pdfImageCachingPolicy:
+  type: PDFImageCachingPolicy
+  initial: PDFImageCachingDefault
 
-inputTypeDateEnabled:
+preferMIMETypeForImages:
   initial: false
-  conditional: ENABLE(INPUT_TYPE_DATE)
 
-inputTypeDateTimeLocalEnabled:
+preventKeyboardDOMEventDispatch:
   initial: false
-  conditional: ENABLE(INPUT_TYPE_DATETIMELOCAL)
 
-inputTypeMonthEnabled:
-  initial: false
-  conditional: ENABLE(INPUT_TYPE_MONTH)
+quickTimePluginReplacementEnabled:
+  initial: defaultQuickTimePluginReplacementEnabled
 
-inputTypeTimeEnabled:
+repaintOutsideLayoutEnabled:
   initial: false
-  conditional: ENABLE(INPUT_TYPE_TIME)
 
-inputTypeWeekEnabled:
+rubberBandingForSubScrollableRegionsEnabled:
+  initial: true
+  conditional: ENABLE(RUBBER_BANDING)
+
+scrollingCoordinatorEnabled:
   initial: false
-  conditional: ENABLE(INPUT_TYPE_WEEK)
 
-dateTimeInputsEditableComponentsEnabled:
+scrollingPerformanceLoggingEnabled:
   initial: false
-  conditional: ENABLE(DATE_AND_TIME_INPUT_TYPES)
+  onChange: scrollingPerformanceLoggingEnabledChanged
 
-blankAnchorTargetImpliesNoOpenerEnabled:
-  initial: true
+scrollingTreeIncludesFrames:
+  initial: defaultScrollingTreeIncludesFrames
 
-linkPreloadEnabled:
+# Allow clients concerned with memory consumption to set a quota on session storage
+# since the memory used won't be released until the Page is destroyed.
+sessionStorageQuota:
+  type: uint32_t
+  initial: StorageMap::noQuota
+
+shouldConvertInvalidURLsToBlank:
   initial: true
 
-linkPrefetchEnabled:
+shouldDispatchSyntheticMouseEventsWhenModifyingSelection:
   initial: false
 
-linkPreloadResponsiveImagesEnabled:
+shouldDispatchSyntheticMouseOutAfterSyntheticClick:
   initial: false
 
-disabledAdaptationsMetaTagEnabled:
+shouldIgnoreFontLoadCompletions:
   initial: false
 
-lazyImageLoadingEnabled:
+shouldInjectUserScriptsInInitialEmptyDocument:
   initial: false
 
-referrerPolicyAttributeEnabled:
+shrinksStandaloneImagesToFit:
   initial: true
 
-dataTransferItemsEnabled:
-  initial: false
-
-webAuthenticationEnabled:
-  initial: false
-
-webAuthenticationLocalAuthenticatorEnabled:
-  initial: false
-
-# FIXME: Seems to be unused. Remove once verified.
-mediaStreamEnabled:
+storageAccessAPIPerPageScopeEnabled:
   initial: true
-  conditional: ENABLE(MEDIA_STREAM)
 
-mediaRecorderEnabled:
-  initial: false
-  conditional: ENABLE(MEDIA_STREAM)
+storageBlockingPolicy:
+  type: SecurityOrigin::StorageBlockingPolicy
+  initial: SecurityOrigin::AllowAllStorage
+  onChange: storageBlockingPolicyChanged
 
-mediaDevicesEnabled:
-  initial: false
-  conditional: ENABLE(MEDIA_STREAM)
+systemLayoutDirection:
+  type: TextDirection
+  initial: TextDirection::LTR
 
-screenCaptureEnabled:
-  initial: false
-  conditional: ENABLE(MEDIA_STREAM)
+textAutosizingWindowSizeOverride:
+  type: IntSize
+  onChange: setNeedsRecalcStyleInAllFrames
+  conditional: ENABLE(TEXT_AUTOSIZING)
 
-gamepadsEnabled:
-  initial: false
-  conditional: ENABLE(GAMEPAD)
+textDirectionSubmenuInclusionBehavior:
+  type: TextDirectionSubmenuInclusionBehavior
+  initial: TextDirectionSubmenuAutomaticallyIncluded
 
-cssCustomPropertiesAndValuesEnabled:
-  initial: false
+timeWithoutMouseMovementBeforeHidingControls:
+  type: Seconds
+  initial: 3_s
 
-webShareEnabled:
+touchEventEmulationEnabled:
   initial: false
+  getter: isTouchEventEmulationEnabled
+  conditional: ENABLE(TOUCH_EVENTS)
 
-webShareFileAPIEnabled:
+treatIPAddressAsDomain:
   initial: false
 
-undoManagerAPIEnabled:
+treatsAnyTextCSSLinkAsStylesheet:
   initial: false
 
-contactPickerAPIEnabled:
-  initial: false
+unhandledPromiseRejectionToConsoleEnabled:
+  initial: true
 
-intersectionObserverEnabled:
-  initial: false
-  conditional: ENABLE(INTERSECTION_OBSERVER)
+unifiedTextCheckerEnabled:
+  initial: defaultUnifiedTextCheckerEnabled
 
-downloadAttributeEnabled:
-  initial: false
-  conditional: ENABLE(DOWNLOAD_ATTRIBUTE)
+useAnonymousModeWhenFetchingMaskImages:
+  initial: true
 
-systemPreviewEnabled:
+useImageDocumentForSubframePDF:
   initial: false
-  conditional: USE(SYSTEM_PREVIEW)
 
-interruptAudioOnPageVisibilityChangeEnabled:
+useLegacyBackgroundSizeShorthandBehavior:
   initial: false
-  conditional: ENABLE(MEDIA_STREAM)
-
-encryptedMediaAPIEnabled:
-  intiial: false
-  conditiona: ENABLE(ENCRYPTED_MEDIA)
 
-legacyEncryptedMediaAPIEnabled:
-  intiial: true
-  conditiona: ENABLE(LEGACY_ENCRYPTED_MEDIA)
-
-# FIMXE: This does not appear to ever be set to true. Remove once verified.
-legacyBeforeLoadEventEnabled:
+usePreHTML5ParserQuirks:
   initial: false
 
-isPostLoadCPUUsageMeasurementEnabled:
-  initial: defaultPostLoadCPUUsageMeasurementEnabled
-
-isPostLoadMemoryUsageMeasurementEnabled:
-  initial: defaultPostLoadMemoryUsageMeasurementEnabled
-
-isPostBackgroundingCPUUsageMeasurementEnabled:
-  initial: defaultPostBackgroundingCPUUsageMeasurementEnabled
-
-isPostBackgroundingMemoryUsageMeasurementEnabled:
-  initial: defaultPostBackgroundingMemoryUsageMeasurementEnabled
+userInterfaceDirectionPolicy:
+  type: UserInterfaceDirectionPolicy
+  initial: UserInterfaceDirectionPolicy::Content
 
-isPerActivityStateCPUUsageMeasurementEnabled:
-  initial: defaultPerActivityStateCPUUsageMeasurementEnabled
+userStyleSheetLocation:
+  type: URL
+  onChange: userStyleSheetLocationChanged
 
-liveRangeSelectionEnabled:
-  initial: false
+# Sets the magnification value for validation message timer.  If the
+# magnification value is N, a validation message disappears automatically after
+# <message length> * N / 1000 seconds.  If N is equal to or less than 0, a
+# validation message doesn't disappears automaticaly.
+validationMessageTimerMagnification:
+  type: uint32_t
+  initial: 50
 
-# Deprecated
+videoPlaybackRequiresUserGesture:
+  initial: defaultVideoPlaybackRequiresUserGesture
 
-iceCandidateFilteringEnabled:
+visualViewportEnabled:
   initial: true
-  onChange: iceCandidateFilteringEnabledChanged
-  inspectorOverride: true
+  onChange: setNeedsRecalcStyleInAllFrames
 
-mockCaptureDevicesEnabled:
-  initial: false
-  conditional: ENABLE(MEDIA_STREAM)
-  onChange: mockCaptureDevicesEnabledChanged
-  inspectorOverride: true
+webGLErrorsToConsoleEnabled:
+  initial: true
 
-mediaCaptureRequiresSecureConnection:
+webRTCEncryptionEnabled:
   initial: true
-  conditional: ENABLE(MEDIA_STREAM)
   inspectorOverride: true
 
-shouldUseServiceWorkerShortTimeout:
+webkitImageReadyEventEnabled:
   initial: false
 
-# Clients should use per-navigation "allowsContentJavaScript" policies instead
-scriptMarkupEnabled:
+# When enabled, window.blur() does not change focus, and
+# window.focus() only changes focus when invoked from the context that
+# created the window.
+windowFocusRestricted:
   initial: true
 
-cssIndividualTransformPropertiesEnabled:
-  initial: false
+youTubeFlashPluginReplacementEnabled:
+  initial: defaultYouTubeFlashPluginReplacementEnabled
index 500f3ec231ac99ca10894dc1024548c3758f7e43..40f581da44cd3331a3d7bf3e9680e919eb1f5c2e 100644 (file)
@@ -68,7 +68,6 @@ static const bool defaultMediaDataLoadsAutomatically = false;
 static const bool defaultShouldRespectImageOrientation = true;
 static const bool defaultImageSubsamplingEnabled = true;
 static const bool defaultScrollingTreeIncludesFrames = true;
-static const bool defaultMediaControlsScaleWithPageZoom = true;
 static const bool defaultQuickTimePluginReplacementEnabled = true;
 static const bool defaultRequiresUserGestureToLoadVideo = true;
 #else
@@ -82,21 +81,15 @@ static const bool defaultMediaDataLoadsAutomatically = true;
 static const bool defaultShouldRespectImageOrientation = false;
 static const bool defaultImageSubsamplingEnabled = false;
 static const bool defaultScrollingTreeIncludesFrames = false;
-static const bool defaultMediaControlsScaleWithPageZoom = true;
 static const bool defaultQuickTimePluginReplacementEnabled = false;
 static const bool defaultRequiresUserGestureToLoadVideo = false;
 #endif
 
-static const bool defaultAllowsPictureInPictureMediaPlayback = true;
-
-static const double defaultIncrementalRenderingSuppressionTimeoutInSeconds = 5;
 #if USE(UNIFIED_TEXT_CHECKING)
 static const bool defaultUnifiedTextCheckerEnabled = true;
 #else
 static const bool defaultUnifiedTextCheckerEnabled = false;
 #endif
-static const bool defaultSmartInsertDeleteEnabled = true;
-static const bool defaultSelectTrailingWhitespaceEnabled = false;
 
 #if ENABLE(VIDEO) && (USE(AVFOUNDATION) || USE(GSTREAMER) || USE(MEDIA_FOUNDATION))
 static const bool defaultMediaEnabled = true;
index 2874351d0783223951ab40ddf427e43056fc231e..5e6a3322a302112f58fbf9fa1ede5ac2ffa645d9 100644 (file)
@@ -157,7 +157,7 @@ float fontSizeForKeyword(unsigned keywordID, bool shouldUseFixedDefaultSize, con
     }
 
     // Value is outside the range of the table. Apply the scale factor instead.
-    float minLogicalSize = std::max(document.settings().minimumLogicalFontSize(), 1);
+    float minLogicalSize = std::max<float>(document.settings().minimumLogicalFontSize(), 1);
     return std::max(fontSizeFactors[keywordID - CSSValueXxSmall] * mediumSize, minLogicalSize);
 }
 
index 3f5be6eb19db88cad6b6fd3bacd991b1282bc35a..9b021b667e28f3b3e9da771cfad9bc2fae7c4001 100644 (file)
@@ -1,3 +1,15 @@
+2020-10-10  Sam Weinig  <weinig@apple.com>
+
+        Use WebPreference definitions from shared configuration files in WebCore (Part 1)
+        https://bugs.webkit.org/show_bug.cgi?id=217551
+
+        Reviewed by Darin Adler.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::sendViewportAttributesChanged):
+        Add explicit type to support layoutFallbackWidth now being an unsigned int
+        in Settings (it was already an unsigned int at the WebKit level).
+
 2020-10-10  Adrian Perez de Castro  <aperez@igalia.com>
 
         [GTK] Build broken with ENABLE_GAMEPAD enabled
index b301e9a8c0ea190b73bb0e3d104a7f9773bbb743..9fa9a82e3a01508fabecbccbcddf61469a5c1d4d 100644 (file)
@@ -267,18 +267,6 @@ void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* page
 #endif
 
     // Map the names used in LayoutTests with the names used in WebCore::Settings and WebPreferencesStore.
-#define FOR_EACH_OVERRIDE_BOOL_PREFERENCE(macro) \
-    macro(WebKitJavaEnabled, JavaEnabled, javaEnabled) \
-    macro(WebKitJavaScriptEnabled, ScriptEnabled, javaScriptEnabled) \
-    macro(WebKitPluginsEnabled, PluginsEnabled, pluginsEnabled) \
-    macro(WebKitWebAudioEnabled, WebAudioEnabled, webAudioEnabled) \
-    macro(WebKitWebGLEnabled, WebGLEnabled, webGLEnabled) \
-    macro(WebKitXSSAuditorEnabled, XSSAuditorEnabled, xssAuditorEnabled) \
-    macro(WebKitShouldRespectImageOrientation, ShouldRespectImageOrientation, shouldRespectImageOrientation) \
-    macro(WebKitDisplayImagesKey, LoadsImagesAutomatically, loadsImagesAutomatically) \
-    macro(WebKitLargeImageAsyncDecodingEnabled, LargeImageAsyncDecodingEnabled, largeImageAsyncDecodingEnabled) \
-    macro(WebKitAnimatedImageAsyncDecodingEnabled, AnimatedImageAsyncDecodingEnabled, animatedImageAsyncDecodingEnabled) \
-    \
 
 #define OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(TestRunnerName, SettingsName, WebPreferencesName) \
     if (preference == #TestRunnerName) { \
@@ -288,12 +276,22 @@ void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* page
         return; \
     }
 
-    FOR_EACH_OVERRIDE_BOOL_PREFERENCE(OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES)
-
+    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitAnimatedImageAsyncDecodingEnabled, AnimatedImageAsyncDecodingEnabled, animatedImageAsyncDecodingEnabled)
+    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitDisplayImagesKey, LoadsImagesAutomatically, loadsImagesAutomatically)
     OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitHiddenPageDOMTimerThrottlingEnabled, HiddenPageDOMTimerThrottlingEnabled, hiddenPageDOMTimerThrottlingEnabled)
+    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitJavaEnabled, JavaEnabled, javaEnabled)
+    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitJavaScriptEnabled, ScriptEnabled, javaScriptEnabled)
+    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitLargeImageAsyncDecodingEnabled, LargeImageAsyncDecodingEnabled, largeImageAsyncDecodingEnabled)
+    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitPluginsEnabled, PluginsEnabled, pluginsEnabled)
+    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitShouldRespectImageOrientation, ShouldRespectImageOrientation, shouldRespectImageOrientation)
+    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitWebGLEnabled, WebGLEnabled, webGLEnabled)
+    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitXSSAuditorEnabled, XSSAuditorEnabled, xssAuditorEnabled)
+
+#if ENABLE(WEB_AUDIO)
+    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitWebAudioEnabled, WebAudioEnabled, webAudioEnabled)
+#endif
 
 #undef OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES
-#undef FOR_EACH_OVERRIDE_BOOL_PREFERENCE
 }
 
 void InjectedBundle::setAllowUniversalAccessFromFileURLs(WebPageGroupProxy* pageGroup, bool enabled)
index d774094a30d53fc16f1c1da9c0d90b626e310b30..ffea32c2d24ed8b9bba6d036e019347c9e26ae86 100644 (file)
@@ -1821,7 +1821,7 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
     // Recalculate the recommended layout size, when the available size (device pixel) changes.
     Settings& settings = m_page->settings();
 
-    int minimumLayoutFallbackWidth = std::max(settings.layoutFallbackWidth(), m_viewSize.width());
+    int minimumLayoutFallbackWidth = std::max<int>(settings.layoutFallbackWidth(), m_viewSize.width());
 
     // If unset  we use the viewport dimensions. This fits with the behavior of desktop browsers.
     int deviceWidth = (settings.deviceWidth() > 0) ? settings.deviceWidth() : m_viewSize.width();