[Preferences] Adopt shared preferences configuration and script in WebKit
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Sep 2020 01:29:42 +0000 (01:29 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Sep 2020 01:29:42 +0000 (01:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=217075

Reviewed by Darin Adler.

Source/WebKit:

* Shared/WebPreferences.yaml: Removed.
* Shared/WebPreferencesDebug.yaml: Removed.
* Shared/WebPreferencesExperimental.yaml: Removed.
* Shared/WebPreferencesInternal.yaml: Removed.
* Scripts/GeneratePreferences.rb: Removed.
* WebKit.xcodeproj/project.pbxproj:
Remove yaml preferences and preference generator in favor of shared one
in WTF.

* CMakeLists.txt:
* DerivedSources.make:
Update preference generation to use the shared script and preference files.

* Configurations/BaseTarget.xcconfig:
Add new variable, WTF_BUILD_SCRIPTS_DIR, that points to directory where the
shared generator and preference files live for use as input to the generation.

* DerivedSources-input.xcfilelist:
Update for new location of script and preference files.

* Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
* Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
* Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb:
* Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
Port support for multiple conditionally-defined defaultValues from WebKitLegacy,
keeping the same DEFAULT_VALUE_FOR_* macro naming and using the macro definitions
in place of existing <%= @pref.defaultValue %> idiom. Also updates for rename
from @internalDebugFeatures to @internalFeatures.

* Shared/WebPreferencesDefaultValues.cpp:
* Shared/WebPreferencesDefaultValues.h:
Remove defaults that are now fully specified in the preference files.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
Replace removed DEFAULT_APPLE_PAY_ENABLED, with the now generated DEFAULT_VALUE_FOR_ApplePayEnabled.

Source/WebKitLegacy/mac:

* Scripts/generate-preferences.sh:
Update to account for new interface requiring the full path to each template.

Source/WTF:

* Scripts/GeneratePreferences.rb:
Simplify input by passing the templates as complete paths, rather than by name + template directory.

* Scripts/Preferences/WebPreferences.yaml:
* Scripts/Preferences/WebPreferencesDebug.yaml:
* Scripts/Preferences/WebPreferencesExperimental.yaml:
* Scripts/Preferences/WebPreferencesInternal.yaml:
Fix some mistakes / things left out to make WebKit defaults and names match current WebKit names and defaults.

* wtf/CMakeLists.txt:
Copy all the preferences and scripts into WTF_SCRIPTS_DIR so it can be accessed by WebKit.

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

27 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/WTF/wtf/CMakeLists.txt
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/Configurations/BaseTarget.xcconfig
Source/WebKit/DerivedSources-input.xcfilelist
Source/WebKit/DerivedSources.make
Source/WebKit/Scripts/GeneratePreferences.rb [deleted file]
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb
Source/WebKit/Shared/WebPreferences.yaml [deleted file]
Source/WebKit/Shared/WebPreferencesDebug.yaml [deleted file]
Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
Source/WebKit/Shared/WebPreferencesDefaultValues.h
Source/WebKit/Shared/WebPreferencesExperimental.yaml [deleted file]
Source/WebKit/Shared/WebPreferencesInternal.yaml [deleted file]
Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Scripts/generate-preferences.sh

index d95a6d18505c20c363048509b95a0b56e43bffc5..d197c6659f1477a6543e9929d536599399341f34 100644 (file)
@@ -1,3 +1,22 @@
+2020-09-29  Sam Weinig  <weinig@apple.com>
+
+        [Preferences] Adopt shared preferences configuration and script in WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=217075
+
+        Reviewed by Darin Adler.
+
+        * Scripts/GeneratePreferences.rb:
+        Simplify input by passing the templates as complete paths, rather than by name + template directory.
+
+        * Scripts/Preferences/WebPreferences.yaml:
+        * Scripts/Preferences/WebPreferencesDebug.yaml:
+        * Scripts/Preferences/WebPreferencesExperimental.yaml:
+        * Scripts/Preferences/WebPreferencesInternal.yaml:
+        Fix some mistakes / things left out to make WebKit defaults and names match current WebKit names and defaults.
+
+        * wtf/CMakeLists.txt:
+        Copy all the preferences and scripts into WTF_SCRIPTS_DIR so it can be accessed by WebKit.
+
 2020-09-29  Alex Christensen  <achristensen@webkit.org>
 
         Remove plist-based ResourceLoadStatistics storage, which has been replaced by database-based storage
index 38eacc7dc352d583ba4878a88c38e2e20f9c0c9d..3c6eaf0707959ccb0587c742a80ee6ee61453ad5 100644 (file)
@@ -34,7 +34,6 @@ options = {
   :debugPreferences => nil,
   :experimentalPreferences => nil,
   :internalPreferences => nil,
-  :templateDirectory => nil,
   :outputDirectory => nil,
   :templates => []
 }
@@ -49,13 +48,12 @@ optparse = OptionParser.new do |opts|
   opts.on("--experimental input", "file to generate experimental preferences from") { |experimentalPreferences| options[:experimentalPreferences] = experimentalPreferences }
   opts.on("--internal input", "file to generate internal preferences from") { |internalPreferences| options[:internalPreferences] = internalPreferences }
   opts.on("--template input", "template to use for generation (may be specified multiple times)") { |template| options[:templates] << template }
-  opts.on("--templateDir input", "directory to look for templates in") { |templateDir| options[:templateDirectory] = templateDir }
   opts.on("--outputDir output", "directory to generate file in") { |outputDir| options[:outputDirectory] = outputDir }
 end
 
 optparse.parse!
 
-if !options[:frontend] || !options[:basePreferences] || !options[:debugPreferences] || !options[:experimentalPreferences] || !options[:internalPreferences] || !options[:templateDirectory]
+if !options[:frontend] || !options[:basePreferences] || !options[:debugPreferences] || !options[:experimentalPreferences] || !options[:internalPreferences]
   puts optparse
   exit -1
 end
@@ -213,11 +211,13 @@ class Preferences
     result
   end
 
-  def renderTemplate(templateDirectory, template, outputDirectory)
-    templateFile = File.join(templateDirectory, template + ".erb")
+  def renderTemplate(templateFile, outputDirectory)
+    puts "Generating output for template file: #{templateFile}"
+
+    resultFile = File.basename(templateFile, ".erb")
 
     output = ERB.new(File.read(templateFile), 0, "-").result(binding)
-    File.open(File.join(outputDirectory, template), "w+") do |f|
+    File.open(File.join(outputDirectory, resultFile), "w+") do |f|
       f.write(output)
     end
   end
@@ -226,5 +226,5 @@ end
 preferences = Preferences.new(parsedBasePreferences, parsedDebugPreferences, parsedExperimentalPreferences, parsedInternalPreferences, options[:frontend])
 
 options[:templates].each do |template|
-  preferences.renderTemplate(options[:templateDirectory], template, options[:outputDirectory])
+  preferences.renderTemplate(template, options[:outputDirectory])
 end
index d602d1c8e16b0553b2ef318f971a22559f71381b..64095b6fc74b01e00b7b65644772896e9e4c1fdb 100644 (file)
@@ -1276,7 +1276,8 @@ PassiveTouchListenersAsDefaultOnDocument:
       "PLATFORM(IOS_FAMILY)": WebKit::defaultPassiveTouchListenersAsDefaultOnDocument()
       default: true
     WebKit:
-      default: WebKit::defaultPassiveTouchListenersAsDefaultOnDocument()
+      "PLATFORM(IOS_FAMILY)": WebKit::defaultPassiveTouchListenersAsDefaultOnDocument()
+      default: true
 
 PasswordEchoDuration:
   type: double
index df024c6116532c76853fad4291190d73e5c68360..227b2ae0de2f6a5833cb25fa97590e502b4c4873 100644 (file)
@@ -30,6 +30,28 @@ AcceleratedDrawingEnabled:
     WebKit:
       default: true
 
+# FIXME: WebKit has an alternate name for this called 'ShowDebugBorders'. We should standardize on one name.
+CompositingBordersVisible:
+  type: bool
+  webKitLegacyPreferenceKey: WebKitShowDebugBorders
+  webcoreName: showDebugBorders
+  defaultValue:
+    WebKitLegacy:
+      default: false
+    WebKit:
+      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
+  defaultValue:
+    WebKitLegacy:
+      default: false
+    WebKit:
+      default: false
+
 DeveloperExtrasEnabled:
   type: bool
   webKitLegacyPreferenceKey: WebKitDeveloperExtrasEnabledPreferenceKey
@@ -107,24 +129,6 @@ ResourceUsageOverlayVisible:
     WebKit:
       default: false
 
-# FIXME: WebKit has an alternate name for this called 'CompositingBordersVisible'. We should standardize on one name.
-ShowDebugBorders:
-  type: bool
-  defaultValue:
-    WebKitLegacy:
-      default: false
-    WebKit:
-      default: false
-
-# FIXME: WebKit has an alternate name for this called 'CompositingRepaintCountersVisible'. We should standardize on one name.
-ShowRepaintCounter:
-  type: bool
-  defaultValue:
-    WebKitLegacy:
-      default: false
-    WebKit:
-      default: false
-
 SimpleLineLayoutDebugBordersEnabled:
   type: bool
   defaultValue:
index 87f728677b3effbc222822a245ce574f99dedeab..f5f0d1b5ce124dba706619c580dabe8cba893f97 100644 (file)
@@ -215,6 +215,7 @@ DisallowSyncXHRDuringPageDismissalEnabled:
     WebKitLegacy:
       default: true
     WebKit:
+      "PLATFORM(MAC) || PLATFORM(IOS_FAMILY)": WebKit::defaultDisallowSyncXHRDuringPageDismissalEnabled()
       default: true
 
 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
@@ -280,6 +281,7 @@ HTTP3Enabled:
   type: bool
   humanReadableName: "HTTP/3"
   humanReadableDescription: "Enable HTTP/3"
+  webcoreBinding: none
   condition: HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
   exposed: [ WebKit ]
   defaultValue:
@@ -625,6 +627,7 @@ ServerTimingEnabled:
     WebKitLegacy:
       default: false
     WebKit:
+      "ENABLE(EXPERIMENTAL_FEATURES) && (PLATFORM(GTK) || PLATFORM(WPE))": true
       default: false
 
 ShouldDeferAsynchronousScriptsUntilAfterDocumentLoadOrFirstPaint:
index db2054013157692b4b31257bdf739d750e7a22c2..ff75d7b95be289e5d3ea2b3c31ad02b224be9b99 100644 (file)
@@ -42,6 +42,7 @@ AlwaysZoomOnDoubleTap:
   type: bool
   humanReadableName: "DTTZ always"
   humanReadableDescription: "Double taps zoom, even if we dispatched a click anywhere"
+  webcoreBinding: none
   condition: PLATFORM(IOS_FAMILY)
   exposed: [ WebKit ]
   defaultValue:
@@ -79,6 +80,8 @@ AsyncFrameScrollingEnabled:
     WebKitLegacy:
       default: false
     WebKit:
+      "USE(NICOSIA)": true
+      "PLATFORM(IOS_FAMILY)": true
       default: WebKit::defaultAsyncFrameScrollingEnabled()
 
 AsyncOverflowScrollingEnabled:
@@ -89,6 +92,7 @@ AsyncOverflowScrollingEnabled:
     WebKitLegacy:
       default: false
     WebKit:
+      "PLATFORM(IOS_FAMILY)": true
       default: WebKit::defaultAsyncFrameScrollingEnabled()
 
 # FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
@@ -520,7 +524,7 @@ RestrictedHTTPResponseAccess:
     WebKitLegacy:
       default: true
     WebKit:
-      default: false
+      default: true
 
 SecureContextChecksEnabled:
   type: bool
index c92e4732bc4fad08ca1c3e6459f69aed2cbea28b..de3b086b7f1d97e3e0cd34f3b3668a6ba659abdd 100644 (file)
@@ -568,8 +568,25 @@ if (USE_VERSION_STAMPER)
         VERBATIM)
 endif ()
 
-file(COPY
+set(WTF_UNIFIED_SOURCES_SCRIPTS
     ../Scripts/generate-unified-source-bundles.rb
-    DESTINATION
-    ${WTF_SCRIPTS_DIR}
+)
+
+file(COPY
+     ${WTF_UNIFIED_SOURCES_SCRIPTS}
+     DESTINATION ${WTF_SCRIPTS_DIR}
+)
+
+set(WTF_PREFERENCES
+    ../Scripts/GeneratePreferences.rb
+
+    ../Scripts/Preferences/WebPreferences.yaml
+    ../Scripts/Preferences/WebPreferencesDebug.yaml
+    ../Scripts/Preferences/WebPreferencesExperimental.yaml
+    ../Scripts/Preferences/WebPreferencesInternal.yaml
+)
+
+WEBKIT_COPY_FILES(WTF_CopyPreferences
+    DESTINATION ${WTF_SCRIPTS_DIR}
+    FILES ${WTF_PREFERENCES}
 )
index ef643d74b5e419b32a91fb0b9f229ce7bc627592..32739b30177e90d47e16259c5a1ca66e5935f7a9 100644 (file)
@@ -506,17 +506,19 @@ set(WebKit_WEB_PREFERENCES_TEMPLATES
     ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb
 )
 
-set(WebKit_WEB_PREFERENCES_CATEGORIES
-    ${WEBKIT_DIR}/Shared/WebPreferencesDebug.yaml
-    ${WEBKIT_DIR}/Shared/WebPreferencesExperimental.yaml
-    ${WEBKIT_DIR}/Shared/WebPreferencesInternal.yaml
+set(WebKit_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(${WebKit_WEB_PREFERENCES} PROPERTIES GENERATED TRUE)
+
 add_custom_command(
     OUTPUT ${WebKit_DERIVED_SOURCES_DIR}/WebPageUpdatePreferences.cpp ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesDefinitions.h ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesExperimentalFeatures.cpp ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesInternalDebugFeatures.cpp ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesKeys.cpp ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesKeys.h ${WebKit_DERIVED_SOURCES_DIR}/WebPreferencesStoreDefaultsMap.cpp
-    MAIN_DEPENDENCY ${WEBKIT_DIR}/Shared/WebPreferences.yaml
-    DEPENDS ${WebKit_WEB_PREFERENCES_TEMPLATES} ${WebKit_WEB_PREFERENCES_CATEGORIES}
-    COMMAND ${RUBY_EXECUTABLE} ${WEBKIT_DIR}/Scripts/GeneratePreferences.rb --base ${WEBKIT_DIR}/Shared/WebPreferences.yaml --debug ${WEBKIT_DIR}/Shared/WebPreferencesDebug.yaml --experimental ${WEBKIT_DIR}/Shared/WebPreferencesExperimental.yaml --internal ${WEBKIT_DIR}/Shared/WebPreferencesInternal.yaml --outputDir "${WebKit_DERIVED_SOURCES_DIR}"
+    DEPENDS ${WebKit_WEB_PREFERENCES_TEMPLATES} ${WebKit_WEB_PREFERENCES} WTF_CopyPreferences
+    COMMAND ${RUBY_EXECUTABLE} ${WTF_SCRIPTS_DIR}/GeneratePreferences.rb --frontend WebKit --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 "${WebKit_DERIVED_SOURCES_DIR}" --template ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb --template ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb --template ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb --template ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb --template ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesKeys.cpp.erb --template ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesKeys.h.erb --template ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb
     VERBATIM)
 
 list(APPEND WebKit_HEADERS
index e7f2cd750f12ae71187bba2b6b5b31175908dd85..1bbe5c2a2e1d156251eb088f1a729187635d5516 100644 (file)
@@ -1,3 +1,47 @@
+2020-09-29  Sam Weinig  <weinig@apple.com>
+
+        [Preferences] Adopt shared preferences configuration and script in WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=217075
+
+        Reviewed by Darin Adler.
+
+        * Shared/WebPreferences.yaml: Removed.
+        * Shared/WebPreferencesDebug.yaml: Removed.
+        * Shared/WebPreferencesExperimental.yaml: Removed.
+        * Shared/WebPreferencesInternal.yaml: Removed.
+        * Scripts/GeneratePreferences.rb: Removed.
+        * WebKit.xcodeproj/project.pbxproj:
+        Remove yaml preferences and preference generator in favor of shared one
+        in WTF. 
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        Update preference generation to use the shared script and preference files.
+        
+        * Configurations/BaseTarget.xcconfig:
+        Add new variable, WTF_BUILD_SCRIPTS_DIR, that points to directory where the
+        shared generator and preference files live for use as input to the generation.
+  
+        * DerivedSources-input.xcfilelist:
+        Update for new location of script and preference files.
+
+        * Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
+        * Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
+        * Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb:
+        * Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
+        Port support for multiple conditionally-defined defaultValues from WebKitLegacy,
+        keeping the same DEFAULT_VALUE_FOR_* macro naming and using the macro definitions
+        in place of existing <%= @pref.defaultValue %> idiom. Also updates for rename
+        from @internalDebugFeatures to @internalFeatures.
+        * Shared/WebPreferencesDefaultValues.cpp:
+        * Shared/WebPreferencesDefaultValues.h:
+        Remove defaults that are now fully specified in the preference files.
+
+        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+        (-[WKWebViewConfiguration init]):
+        Replace removed DEFAULT_APPLE_PAY_ENABLED, with the now generated DEFAULT_VALUE_FOR_ApplePayEnabled.
+
 2020-09-29  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [GPU Process] RemoteImageBufferProxy should ensure the state stack of the context is cleared before destruction
index 0cb6434d91515e61089834d8bef5b4d0751a9649..916f327477912e5d0b44285f6f5ce7c8caffe5ba 100644 (file)
@@ -73,6 +73,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 78a48d0cf5399bc9e4043a7433c817db5f7a6301..52c130b4f83333bb6edd784abbca8a7cd05753c3 100644 (file)
@@ -1,4 +1,9 @@
 # This file is generated by the generate-xcfilelists script.
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/Scripts/GeneratePreferences.rb
+$(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)/cpp_generator.py
 $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR)/cpp_generator_templates.py
 $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR)/generate-inspector-protocol-bindings.py
@@ -60,7 +65,6 @@ $(PROJECT_DIR)/PluginProcess/PluginControllerProxy.messages.in
 $(PROJECT_DIR)/PluginProcess/PluginProcess.messages.in
 $(PROJECT_DIR)/PluginProcess/WebProcessConnection.messages.in
 $(PROJECT_DIR)/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in
-$(PROJECT_DIR)/Scripts/GeneratePreferences.rb
 $(PROJECT_DIR)/Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb
 $(PROJECT_DIR)/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb
 $(PROJECT_DIR)/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb
@@ -81,10 +85,6 @@ $(PROJECT_DIR)/Shared/AuxiliaryProcess.messages.in
 $(PROJECT_DIR)/Shared/HTTPSUpgrade/HTTPSUpgradeList.txt
 $(PROJECT_DIR)/Shared/Plugins/NPObjectMessageReceiver.messages.in
 $(PROJECT_DIR)/Shared/WebConnection.messages.in
-$(PROJECT_DIR)/Shared/WebPreferences.yaml
-$(PROJECT_DIR)/Shared/WebPreferencesDebug.yaml
-$(PROJECT_DIR)/Shared/WebPreferencesExperimental.yaml
-$(PROJECT_DIR)/Shared/WebPreferencesInternal.yaml
 $(PROJECT_DIR)/UIProcess/Automation/Automation.json
 $(PROJECT_DIR)/UIProcess/Automation/WebAutomationSession.messages.in
 $(PROJECT_DIR)/UIProcess/Cocoa/PlaybackSessionManagerProxy.messages.in
index 010994ae47d157f2f862b2ba3d56d1f6989dfbcb..f7458b63b98cdc33a4b475723c6789912a2ebf4c 100644 (file)
@@ -104,6 +104,7 @@ VPATH = \
 
 PYTHON = python
 PERL = perl
+RUBY = ruby
 
 ifeq ($(OS),Windows_NT)
     DELETE = cmd //C del
@@ -337,15 +338,15 @@ all : WebAutomationSessionProxyScriptSource.h
 # WebPreferences generation
 
 WEB_PREFERENCES_INPUT_FILES = \
-    $(WebKit2)/Shared/WebPreferences.yaml \
+    ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferences.yaml \
     $(ADDITIONAL_WEB_PREFERENCES_INPUT_FILES) \
 #
 WEB_PREFERENCES_COMBINED_INPUT_FILE = WebPreferencesCombined.yaml
 
 WEB_PREFERENCES_CATEGORY_INPUT_FILES = \
-    $(WebKit2)/Shared/WebPreferencesDebug.yaml \
-    $(WebKit2)/Shared/WebPreferencesExperimental.yaml \
-    $(WebKit2)/Shared/WebPreferencesInternal.yaml \
+    ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesDebug.yaml \
+    ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesExperimental.yaml \
+    ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesInternal.yaml \
 #
 
 WEB_PREFERENCES_TEMPLATES = \
@@ -365,8 +366,9 @@ all : $(WEB_PREFERENCES_FILES) $(WEB_PREFERENCES_COMBINED_INPUT_FILE)
 $(WEB_PREFERENCES_COMBINED_INPUT_FILE) : $(WEB_PREFERENCES_INPUT_FILES)
        cat $^ > $(WEB_PREFERENCES_COMBINED_INPUT_FILE)
 
-$(WEB_PREFERENCES_PATTERNS) : $(WebKit2)/Scripts/GeneratePreferences.rb $(WEB_PREFERENCES_TEMPLATES) $(WEB_PREFERENCES_COMBINED_INPUT_FILE) $(WEB_PREFERENCES_CATEGORY_INPUT_FILES)
-       $(RUBY) $< --base $(WEB_PREFERENCES_COMBINED_INPUT_FILE) --debug $(WebKit2)/Shared/WebPreferencesDebug.yaml --experimental $(WebKit2)/Shared/WebPreferencesExperimental.yaml --internal $(WebKit2)/Shared/WebPreferencesInternal.yaml
+$(WEB_PREFERENCES_PATTERNS) : $(WTF_BUILD_SCRIPTS_DIR)/GeneratePreferences.rb $(WEB_PREFERENCES_TEMPLATES) $(WEB_PREFERENCES_COMBINED_INPUT_FILE) $(WEB_PREFERENCES_CATEGORY_INPUT_FILES)
+       $(RUBY) $< --frontend WebKit --base $(WEB_PREFERENCES_COMBINED_INPUT_FILE) --debug ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesDebug.yaml --experimental ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesExperimental.yaml    --internal ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesInternal.yaml $(addprefix --template , $(WEB_PREFERENCES_TEMPLATES))
+
 
 # FIXME: We should switch to the internal HTTPSUpgradeList.txt once the feature is ready.
 # VPATH += $(WebKit2)/Shared/HTTPSUpgrade/
diff --git a/Source/WebKit/Scripts/GeneratePreferences.rb b/Source/WebKit/Scripts/GeneratePreferences.rb
deleted file mode 100755 (executable)
index 1c1f886..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-#!/usr/bin/env ruby
-#
-# 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
-# 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.
-
-require "fileutils"
-require 'erb'
-require 'optparse'
-require 'yaml'
-
-options = {
-  :basePreferences => nil,
-  :debugPreferences => nil,
-  :experimentalPreferences => nil,
-  :internalPreferences => nil,
-  :outputDirectory => nil
-}
-optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{File.basename($0)} --input file"
-
-    opts.separator ""
-
-    opts.on("--base input", "file to generate preferences from") { |basePreferences| options[:basePreferences] = basePreferences }
-    opts.on("--debug input", "file to generate debug preferences from") { |debugPreferences| options[:debugPreferences] = debugPreferences }
-    opts.on("--experimental input", "file to generate experimental preferences from") { |experimentalPreferences| options[:experimentalPreferences] = experimentalPreferences }
-    opts.on("--internal input", "file to generate internal preferences from") { |internalPreferences| options[:internalPreferences] = internalPreferences }
-    opts.on("--outputDir output", "directory to generate file in") { |output| options[:outputDirectory] = output }
-end
-
-optparse.parse!
-
-if !options[:basePreferences] || !options[:debugPreferences] || !options[:experimentalPreferences] || !options[:internalPreferences]
-  puts optparse
-  exit -1
-end
-
-if !options[:outputDirectory]
-  options[:outputDirectory] = Dir.getwd
-end
-
-FileUtils.mkdir_p(options[:outputDirectory])
-
-parsedBasePreferences = begin
-  YAML.load_file(options[:basePreferences])
-rescue ArgumentError => e
-  puts "Could not parse input file: #{e.message}"
-  exit(-1)
-end
-
-parsedDebugPreferences = begin
-  YAML.load_file(options[:debugPreferences])
-rescue ArgumentError => e
-  puts "Could not parse input file: #{e.message}"
-  exit(-1)
-end
-
-parsedExperimentalPreferences = begin
-  YAML.load_file(options[:experimentalPreferences])
-rescue ArgumentError => e
-  puts "Could not parse input file: #{e.message}"
-  exit(-1)
-end
-
-parsedInternalPreferences = begin
-  YAML.load_file(options[:internalPreferences])
-rescue ArgumentError => e
-  puts "Could not parse input file: #{e.message}"
-  exit(-1)
-end
-
-
-class Preference
-  attr_accessor :name
-  attr_accessor :type
-  attr_accessor :defaultValue
-  attr_accessor :humanReadableName
-  attr_accessor :humanReadableDescription
-  attr_accessor :webcoreBinding
-  attr_accessor :condition
-  attr_accessor :hidden
-
-  def initialize(name, opts)
-    @name = name
-    @type = opts["type"]
-    @defaultValue = opts["defaultValue"]
-    @humanReadableName = '"' + (opts["humanReadableName"] || "") + '"'
-    @humanReadableDescription = '"' + (opts["humanReadableDescription"] || "") + '"'
-    @getter = opts["getter"]
-    @webcoreBinding = opts["webcoreBinding"]
-    @webcoreName = opts["webcoreName"]
-    @condition = opts["condition"]
-    @hidden = opts["hidden"] || false
-  end
-
-  def nameLower
-    if @getter
-      @getter
-    elsif @name.start_with?("VP")
-      @name[0..1].downcase + @name[2..@name.length]
-    elsif @name.start_with?("CSS", "XSS", "FTP", "DOM", "DNS", "PDF", "ICE")
-      @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 webcoreNameUpper
-    if @webcoreName
-      @webcoreName[0].upcase + @webcoreName[1..@webcoreName.length]
-    else
-      @name
-    end
-  end
-
-  def typeUpper
-    if @type == "uint32_t"
-      "UInt32"
-    else
-      @type.capitalize
-    end
-  end
-
-end
-
-class Conditional
-  attr_accessor :condition
-  attr_accessor :preferences
-
-  def initialize(condition, settings)
-    @condition = condition
-    @preferences = preferences
-  end
-end
-
-class Preferences
-  attr_accessor :preferences
-
-  def initialize(parsedBasePreferences, parsedDebugPreferences, parsedExperimentalPreferences, parsedInternalPreferences, outputDirectory)
-    @outputDirectory = outputDirectory
-
-    @preferences = []
-    @preferencesNotDebug = []
-    @preferencesDebug = []
-    @experimentalFeatures = []
-    @internalDebugFeatures = []
-
-    parsedBasePreferences.each do |name, options|
-      preference = Preference.new(name, options)
-      @preferences << preference
-      @preferencesNotDebug << preference
-    end
-    parsedDebugPreferences.each do |name, options|
-      preference = Preference.new(name, options)
-      @preferences << preference
-      @preferencesDebug << preference
-    end
-    parsedExperimentalPreferences.each do |name, options|
-      preference = Preference.new(name, options)
-      @preferences << preference
-      @experimentalFeatures << preference
-    end
-    parsedInternalPreferences.each do |name, options|
-      preference = Preference.new(name, options)
-      @preferences << preference
-      @internalDebugFeatures << preference
-    end
-
-    @preferences.sort! { |x, y| x.name <=> y.name }
-    @preferencesNotDebug.sort! { |x, y| x.name <=> y.name }
-    @preferencesDebug.sort! { |x, y| x.name <=> y.name }
-    @experimentalFeatures.sort! { |x, y| x.name <=> y.name }.sort! { |x, y| x.humanReadableName <=> y.humanReadableName }
-    @internalDebugFeatures.sort! { |x, y| x.name <=> y.name }.sort! { |x, y| x.humanReadableName <=> y.humanReadableName }
-
-    @preferencesBoundToSetting = @preferences.select { |p| !p.webcoreBinding }
-    @preferencesBoundToDeprecatedGlobalSettings = @preferences.select { |p| p.webcoreBinding == "DeprecatedGlobalSettings" }
-    @preferencesBoundToRuntimeEnabledFeatures = @preferences.select { |p| p.webcoreBinding == "RuntimeEnabledFeatures" }
-
-    @warning = "THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT."
-  end
-
-  def renderTemplate(template)
-    templateFile = File.join(File.dirname(__FILE__), "PreferencesTemplates", template + ".erb")
-
-    output = ERB.new(File.read(templateFile), 0, "-").result(binding)
-    File.open(File.join(@outputDirectory, template), "w+") do |f|
-      f.write(output)
-    end
-  end
-end
-
-preferences = Preferences.new(parsedBasePreferences, parsedDebugPreferences, parsedExperimentalPreferences, parsedInternalPreferences, options[:outputDirectory])
-preferences.renderTemplate("WebPreferencesDefinitions.h")
-preferences.renderTemplate("WebPageUpdatePreferences.cpp")
-preferences.renderTemplate("WebPreferencesKeys.h")
-preferences.renderTemplate("WebPreferencesKeys.cpp")
-preferences.renderTemplate("WebPreferencesStoreDefaultsMap.cpp")
-preferences.renderTemplate("WebPreferencesInternalDebugFeatures.cpp")
-preferences.renderTemplate("WebPreferencesExperimentalFeatures.cpp")
index dfc4b39ee6f763f841d3405862511b23451ef4c4..2fb1d8abc0dfdf0a1655b25c2f26fb5d9e0a6161 100644 (file)
 
 #include "WebPreferencesDefaultValues.h"
 
+<%- for @pref in @preferences do -%>
+<%-   if @pref.condition -%>
+#if <%= @pref.condition %>
+<%-   end -%>
+<%-   if @pref.defaultValues.size() == 1 -%>
+#define DEFAULT_VALUE_FOR_<%= @pref.name %> <%= @pref.defaultValues['default'] %>
+<%-   else -%>
+<%-     @pref.defaultValues.each_with_index do |(key, value), index| -%>
+<%-       if index == 0 -%>
+#if <%= key %>
+<%-       elsif index != @pref.defaultValues.size() - 1 -%>
+#elif <%= key %>
+<%-       else -%>
+#else
+<%-       end -%>
+#define DEFAULT_VALUE_FOR_<%= @pref.name %> <%= value %>
+<%-     end -%>
+#endif
+<%-   end -%>
+<%-   if @pref.condition -%>
+#endif
+<%-   end -%>
+<%- end -%>
+
 // macro(KeyUpper, KeyLower, TypeNameUpper, TypeName, DefaultValue, HumanReadableName, HumanReadableDescription)
 
 #define FOR_EACH_WEBKIT_PREFERENCE(macro) \
 <%- for @pref in @preferencesNotDebug do -%>
-    macro(<%= @pref.name %>, <%= @pref.nameLower %>, <%= @pref.typeUpper %>, <%= @pref.type %>, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
+    macro(<%= @pref.name %>, <%= @pref.nameLower %>, <%= @pref.typeUpper %>, <%= @pref.type %>, DEFAULT_VALUE_FOR_<%= @pref.name %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
 <%- end -%>
     \
 
 
 #define FOR_EACH_WEBKIT_DEBUG_PREFERENCE(macro) \
 <%- for @pref in @preferencesDebug do -%>
-    macro(<%= @pref.name %>, <%= @pref.nameLower %>, <%= @pref.typeUpper %>, <%= @pref.type %>, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
+    macro(<%= @pref.name %>, <%= @pref.nameLower %>, <%= @pref.typeUpper %>, <%= @pref.type %>, DEFAULT_VALUE_FOR_<%= @pref.name %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
 <%- end -%>
     \
 
 // Internal Debug Features
 
 #define FOR_EACH_WEBKIT_INTERNAL_DEBUG_FEATURE_PREFERENCE(macro) \
-<%- for @pref in @internalDebugFeatures do -%>
-    macro(<%= @pref.name %>, <%= @pref.nameLower %>, Bool, bool, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
+<%- for @pref in @internalFeatures do -%>
+    macro(<%= @pref.name %>, <%= @pref.nameLower %>, Bool, bool, DEFAULT_VALUE_FOR_<%= @pref.name %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
 <%- end -%>
    \
 
@@ -58,7 +82,7 @@
 
 #define FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(macro) \
 <%- for @pref in @experimentalFeatures do -%>
-    macro(<%= @pref.name %>, <%= @pref.nameLower %>, Bool, bool, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
+    macro(<%= @pref.name %>, <%= @pref.nameLower %>, Bool, bool, DEFAULT_VALUE_FOR_<%= @pref.name %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
 <%- end -%>
     \
 
index fe7fb46376d47ecbfe0d0a9d77bf30992c8ec5fa..0d64b576c5d79b8426ee74052da91d4c876c88d6 100644 (file)
@@ -28,6 +28,7 @@
 #include "config.h"
 #include "WebPreferences.h"
 
+#include "WebPreferencesDefinitions.h"
 #include "WebPreferencesKeys.h"
 
 namespace WebKit {
@@ -53,7 +54,7 @@ const Vector<RefPtr<API::Object>>& WebPreferences::experimentalFeatures()
 <%- if @pref.condition -%>
 #if <%= @pref.condition %>
 <%- end -%>
-        API::ExperimentalFeature::create(<%= @pref.humanReadableName %>, "<%= @pref.name %>", <%= @pref.humanReadableDescription %>, <%= @pref.defaultValue %>, <%= @pref.hidden %>),
+        API::ExperimentalFeature::create(<%= @pref.humanReadableName %>, "<%= @pref.name %>", <%= @pref.humanReadableDescription %>, DEFAULT_VALUE_FOR_<%= @pref.name %>, <%= @pref.hidden %>),
 <%- if @pref.condition -%>
 #endif
 <%- end -%>
index 4a46c5517a17319dc8fbe5201985a162d78b4533..39546fa1504ec06e9c340d83b1cfc87fd0327be6 100644 (file)
 #include "config.h"
 #include "WebPreferences.h"
 
+#include "WebPreferencesDefinitions.h"
 #include "WebPreferencesKeys.h"
 
 namespace WebKit {
 
-<%- for @pref in @internalDebugFeatures do -%>
+<%- for @pref in @internalFeatures do -%>
 void WebPreferences::set<%= @pref.name %>(const bool& value)
 {
     if (!m_store.setBoolValueForKey(WebPreferencesKey::<%= @pref.nameLower %>Key(), value))
@@ -49,11 +50,11 @@ bool WebPreferences::<%= @pref.nameLower %>() const
 const Vector<RefPtr<API::Object>>& WebPreferences::internalDebugFeatures()
 {
     static NeverDestroyed<Vector<RefPtr<API::Object>>> features(std::initializer_list<RefPtr<API::Object>> {
-<%- for @pref in @internalDebugFeatures do -%>
+<%- for @pref in @internalFeatures do -%>
 <%- if @pref.condition -%>
 #if <%= @pref.condition %>
 <%- end -%>
-        API::InternalDebugFeature::create(<%= @pref.humanReadableName %>, "<%= @pref.name %>", <%= @pref.humanReadableDescription %>, <%= @pref.defaultValue %>, <%= @pref.hidden %>),
+        API::InternalDebugFeature::create(<%= @pref.humanReadableName %>, "<%= @pref.name %>", <%= @pref.humanReadableDescription %>, DEFAULT_VALUE_FOR_<%= @pref.name %>, <%= @pref.hidden %>),
 <%- if @pref.condition -%>
 #endif
 <%- end -%>
@@ -71,7 +72,7 @@ bool WebPreferences::isFeatureEnabled(const API::InternalDebugFeature& feature)
     };
 
     static FeatureGetterMapping getters[] = {
-<%- for @pref in @internalDebugFeatures do -%>
+<%- for @pref in @internalFeatures do -%>
 <%- if @pref.condition -%>
 #if <%= @pref.condition %>
 <%- end -%>
@@ -105,7 +106,7 @@ void WebPreferences::setInternalDebugFeatureEnabledForKey(const String& key, boo
     };
 
     static FeatureSetterMapping setters[] = {
-<%- for @pref in @internalDebugFeatures do -%>
+<%- for @pref in @internalFeatures do -%>
 <%- if @pref.condition -%>
 #if <%= @pref.condition %>
 <%- end -%>
@@ -126,11 +127,11 @@ void WebPreferences::setInternalDebugFeatureEnabledForKey(const String& key, boo
 
 void WebPreferences::resetAllInternalDebugFeatures()
 {
-<%- for @pref in @internalDebugFeatures do -%>
+<%- for @pref in @internalFeatures do -%>
 <%- if @pref.condition -%>
 #if <%= @pref.condition %>
 <%- end -%>
-    set<%= @pref.name %>(<%= @pref.defaultValue %>);
+    set<%= @pref.name %>(DEFAULT_VALUE_FOR_<%= @pref.name %>);
 <%- if @pref.condition -%>
 #endif
 <%- end -%>
index 17bae3753712efc5d27685bfeda5ad8f994cb508..b1af25dc8c4cd884f23bcf9772dbb61d697aeea6 100644 (file)
@@ -28,7 +28,7 @@
 #include "config.h"
 #include "WebPreferencesStore.h"
 
-#include "WebPreferencesDefaultValues.h"
+#include "WebPreferencesDefinitions.h"
 #include "WebPreferencesKeys.h"
 #include <wtf/NeverDestroyed.h>
 #include <wtf/Variant.h>
@@ -52,7 +52,7 @@ WebPreferencesStore::ValueMap& WebPreferencesStore::defaults()
 <%- if @pref.condition -%>
 #if <%= @pref.condition %>
 <%- end -%>
-        defaults.get().set(WebPreferencesKey::<%= @pref.nameLower %>Key(), Value(<%= @pref.type %>(<%= @pref.defaultValue %>)));
+        defaults.get().set(WebPreferencesKey::<%= @pref.nameLower %>Key(), Value(<%= @pref.type %>(DEFAULT_VALUE_FOR_<%= @pref.name %>)));
 <%- if @pref.condition -%>
 #endif
 <%- end -%>
diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml
deleted file mode 100644 (file)
index 3a78bf9..0000000
+++ /dev/null
@@ -1,996 +0,0 @@
-# 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.
-
-DeviceOrientationEventEnabled:
-  type: bool
-  defaultValue: true
-  condition: ENABLE(DEVICE_ORIENTATION)
-  webcoreName: deviceOrientationEventEnabled
-
-DeviceOrientationPermissionAPIEnabled:
-  type: bool
-  defaultValue: false
-  condition: ENABLE(DEVICE_ORIENTATION)
-  webcoreName: deviceOrientationPermissionAPIEnabled
-
-JavaScriptEnabled:
-  type: bool
-  defaultValue: true
-  webcoreName: scriptEnabled
-
-JavaScriptMarkupEnabled:
-  type: bool
-  defaultValue: true
-  webcoreName: scriptMarkupEnabled
-
-LoadsImagesAutomatically:
-  type: bool
-  defaultValue: true
-
-LoadsSiteIconsIgnoringImageLoadingPreference:
-  type: bool
-  defaultValue: false
-  webcoreName: loadsSiteIconsIgnoringImageLoadingSetting
-
-PluginsEnabled:
-  type: bool
-  defaultValue: false
-
-JavaEnabled:
-  type: bool
-  defaultValue: false
-
-JavaEnabledForLocalFiles:
-  type: bool
-  defaultValue: false
-
-OfflineWebApplicationCacheEnabled:
-  type: bool
-  defaultValue: true
-
-LocalStorageEnabled:
-  type: bool
-  defaultValue: true
-
-DatabasesEnabled:
-  type: bool
-  defaultValue: true
-  webcoreBinding: custom
-
-XSSAuditorEnabled:
-  type: bool
-  defaultValue: true
-
-SafeBrowsingEnabled:
-  type: bool
-  defaultValue: true
-  webcoreBinding: none
-
-TextAreasAreResizable:
-  type: bool
-  defaultValue: DEFAULT_TEXT_AREAS_ARE_RESIZABLE
-
-JavaScriptCanOpenWindowsAutomatically:
-  type: bool
-  defaultValue: DEFAULT_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY
-
-HyperlinkAuditingEnabled:
-  type: bool
-  defaultValue: true
-
-NeedsSiteSpecificQuirks:
-  type: bool
-  defaultValue: true
-
-AcceleratedCompositingEnabled:
-  type: bool
-  defaultValue: true
-
-ForceCompositingMode:
-  type: bool
-  defaultValue: false
-  webcoreBinding: none
-
-CanvasUsesAcceleratedDrawing:
-  type: bool
-  defaultValue: true
-
-WebGLEnabled:
-  type: bool
-  defaultValue: true
-
-Accelerated2dCanvasEnabled:
-  type: bool
-  defaultValue: false
-
-ForceFTPDirectoryListings:
-  type: bool
-  defaultValue: false
-
-TabsToLinks:
-  type: bool
-  defaultValue: DEFAULT_WEBKIT_TABSTOLINKS_ENABLED
-  webcoreBinding: none
-
-DNSPrefetchingEnabled:
-  type: bool
-  defaultValue: false
-
-DOMTimersThrottlingEnabled:
-  type: bool
-  defaultValue: true
-
-WebArchiveDebugModeEnabled:
-  type: bool
-  defaultValue: false
-  condition: ENABLE(WEB_ARCHIVE)
-
-LocalFileContentSniffingEnabled:
-  type: bool
-  defaultValue: false
-
-UsesBackForwardCache:
-  type: bool
-  defaultValue: true
-
-BackForwardCacheSupportsPlugins:
-  type: bool
-  defaultValue: true
-
-AuthorAndUserStylesEnabled:
-  type: bool
-  defaultValue: true
-
-PaginateDuringLayoutEnabled:
-  type: bool
-  defaultValue: false
-
-DOMPasteAllowed:
-  type: bool
-  defaultValue: false
-
-JavaScriptCanAccessClipboard:
-  type: bool
-  defaultValue: false
-
-ShouldPrintBackgrounds:
-  type: bool
-  defaultValue: DEFAULT_SHOULD_PRINT_BACKGROUNDS
-
-LinkPreconnect:
-  type: bool
-  defaultValue: DEFAULT_LINK_PRECONNECT_ENABLED
-  webcoreName: linkPreconnectEnabled
-
-AsynchronousSpellCheckingEnabled:
-  type: bool
-  defaultValue: false
-
-WebSecurityEnabled:
-  type: bool
-  defaultValue: true
-
-AllowUniversalAccessFromFileURLs:
-  type: bool
-  defaultValue: false
-
-AllowFileAccessFromFileURLs:
-  type: bool
-  defaultValue: false
-
-AllowSettingAnyXHRHeaderFromFileURLs:
-  type: bool
-  defaultValue: false
-
-AllowCrossOriginSubresourcesToAskForCredentials:
-  type: bool
-  defaultValue: false
-
-AllowTopNavigationToDataURLs:
-  type: bool
-  defaultValue: false
-
-ShouldRestrictBaseURLSchemes:
-  type: bool
-  defaultValue: false
-
-AVFoundationEnabled:
-  type: bool
-  defaultValue: DEFAULT_AVFOUNDATION_ENABLED
-  getter: isAVFoundationEnabled
-  webcoreBinding: DeprecatedGlobalSettings
-  condition: USE(AVFOUNDATION)
-
-AVFoundationNSURLSessionEnabled:
-  type: bool
-  defaultValue: true
-  getter: isAVFoundationNSURLSessionEnabled
-  webcoreBinding: DeprecatedGlobalSettings
-  condition: USE(AVFOUNDATION)
-
-GStreamerEnabled:
-  type: bool
-  defaultValue: true
-  getter: isGStreamerEnabled
-  webcoreBinding: DeprecatedGlobalSettings
-  condition: USE(GSTREAMER)
-
-RequiresUserGestureForMediaPlayback:
-  type: bool
-  defaultValue: false
-  webcoreBinding: custom
-
-RequiresUserGestureForVideoPlayback:
-  type: bool
-  defaultValue: false
-  webcoreBinding: custom
-
-RequiresUserGestureForAudioPlayback:
-  type: bool
-  defaultValue: DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK
-  webcoreBinding: custom
-
-RequiresUserGestureToLoadVideo:
-  type: bool
-  defaultValue: false
-
-MainContentUserGestureOverrideEnabled:
-  type: bool
-  defaultValue: false
-
-MediaUserGestureInheritsFromDocument:
-  type: bool
-  defaultValue: false
-
-AllowsInlineMediaPlayback:
-  type: bool
-  defaultValue: DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK
-
-AllowsInlineMediaPlaybackAfterFullscreen:
-  type: bool
-  defaultValue: DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK_AFTER_FULLSCREEN
-
-InlineMediaPlaybackRequiresPlaysInlineAttribute:
-  type: bool
-  defaultValue: DEFAULT_INLINE_MEDIA_PLAYBACK_REQUIRES_PLAYS_INLINE_ATTRIBUTE
-
-InvisibleAutoplayNotPermitted:
-  type: bool
-  defaultValue: DEFAULT_INVISIBLE_AUTOPLAY_NOT_PERMITTED
-
-MediaDataLoadsAutomatically:
-  type: bool
-  defaultValue: DEFAULT_MEDIA_DATA_LOADS_AUTOMATICALLY
-
-AllowsPictureInPictureMediaPlayback:
-  type: bool
-  defaultValue: DEFAULT_ALLOWS_PICTURE_IN_PICTURE_MEDIA_PLAYBACK
-
-AllowsAirPlayForMediaPlayback:
-  type: bool
-  defaultValue: true
-  condition: ENABLE(WIRELESS_PLAYBACK_TARGET)
-
-MediaControlsScaleWithPageZoom:
-  type: bool
-  defaultValue: DEFAULT_MEDIA_CONTROLS_SCALE_WITH_PAGE_ZOOM
-
-InspectorStartsAttached:
-  type: bool
-  defaultValue: true
-  webcoreBinding: none
-
-ShowsToolTipOverTruncatedText:
-  type: bool
-  defaultValue: false
-
-MockScrollbarsEnabled:
-  type: bool
-  defaultValue: false
-  webcoreBinding: DeprecatedGlobalSettings
-
-WebAudioEnabled:
-  type: bool
-  defaultValue: true
-  condition: ENABLE(WEB_AUDIO)
-
-AttachmentElementEnabled:
-  type: bool
-  defaultValue: false
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(ATTACHMENT_ELEMENT)
-
-SuppressesIncrementalRendering:
-  type: bool
-  defaultValue: false
-
-BackspaceKeyNavigationEnabled:
-  type: bool
-  defaultValue: DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED
-
-CaretBrowsingEnabled:
-  type: bool
-  defaultValue: false
-
-ShouldDisplaySubtitles:
-  type: bool
-  defaultValue: false
-  condition: ENABLE(VIDEO)
-
-ShouldDisplayCaptions:
-  type: bool
-  defaultValue: false
-  condition: ENABLE(VIDEO)
-
-ShouldDisplayTextDescriptions:
-  type: bool
-  defaultValue: false
-  condition: ENABLE(VIDEO)
-
-NotificationsEnabled:
-  type: bool
-  defaultValue: true
-  condition: ENABLE(NOTIFICATIONS)
-
-ShouldRespectImageOrientation:
-  type: bool
-  defaultValue: DEFAULT_SHOULD_RESPECT_IMAGE_ORIENTATION
-
-WantsBalancedSetDefersLoadingBehavior:
-  type: bool
-  defaultValue: false
-
-RequestAnimationFrameEnabled:
-  type: bool
-  defaultValue: true
-
-DiagnosticLoggingEnabled:
-  type: bool
-  defaultValue: false
-
-AsynchronousPluginInitializationEnabled:
-  type: bool
-  defaultValue: false
-  webcoreBinding: none
-
-AsynchronousPluginInitializationEnabledForAllPlugins:
-  type: bool
-  defaultValue: false
-  webcoreBinding: none
-
-ArtificialPluginInitializationDelayEnabled:
-  type: bool
-  defaultValue: false
-  webcoreBinding: none
-
-# FIXME: What is this?
-TabToLinksEnabled:
-  type: bool
-  defaultValue: false
-  webcoreBinding: none
-
-ScrollingPerformanceLoggingEnabled:
-  type: bool
-  defaultValue: false
-  webcoreBinding: custom
-
-ScrollAnimatorEnabled:
-  type: bool
-  defaultValue: DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED
-  condition: ENABLE(SMOOTH_SCROLLING)
-
-ForceUpdateScrollbarsOnMainThreadForPerformanceTesting:
-  type: bool
-  defaultValue: false
-
-CookieEnabled:
-  type: bool
-  defaultValue: true
-
-PlugInSnapshottingEnabled:
-  type: bool
-  defaultValue: false
-
-SnapshotAllPlugIns:
-  type: bool
-  defaultValue: false
-
-AutostartOriginPlugInSnapshottingEnabled:
-  type: bool
-  defaultValue: true
-
-PrimaryPlugInSnapshotDetectionEnabled:
-  type: bool
-  defaultValue: true
-
-PDFPluginEnabled:
-  type: bool
-  defaultValue: DEFAULT_PDFPLUGIN_ENABLED
-  webcoreBinding: none
-  condition: PLATFORM(COCOA)
-
-UsesEncodingDetector:
-  type: bool
-  defaultValue: false
-
-TextAutosizingEnabled:
-  type: bool
-  defaultValue: WebCore::Settings::defaultTextAutosizingEnabled()
-  condition: ENABLE(TEXT_AUTOSIZING)
-
-AggressiveTileRetentionEnabled:
-  type: bool
-  defaultValue: false
-
-TemporaryTileCohortRetentionEnabled:
-  type: bool
-  defaultValue: DEFAULT_TEMPORARY_TILE_COHORT_RETENTION_ENABLED
-
-PageVisibilityBasedProcessSuppressionEnabled:
-  type: bool
-  defaultValue: true
-  webcoreBinding: none
-
-SmartInsertDeleteEnabled:
-  type: bool
-  defaultValue: true
-
-SelectTrailingWhitespaceEnabled:
-  type: bool
-  defaultValue: false
-
-ShowsURLsInToolTipsEnabled:
-  type: bool
-  defaultValue: false
-  webcoreName: showsURLsInToolTips
-
-HiddenPageDOMTimerThrottlingEnabled:
-  type: bool
-  defaultValue: DEFAULT_HIDDEN_PAGE_DOM_TIMER_THROTTLING_ENABLED
-
-HiddenPageDOMTimerThrottlingAutoIncreases:
-  type: bool
-  defaultValue: false
-
-HiddenPageCSSAnimationSuspensionEnabled:
-  type: bool
-  defaultValue: DEFAULT_HIDDEN_PAGE_CSS_ANIMATION_SUSPENSION_ENABLED
-
-LowPowerVideoAudioBufferSizeEnabled:
-  type: bool
-  defaultValue: true
-  webcoreBinding: DeprecatedGlobalSettings
-
-ThreadedScrollingEnabled:
-  type: bool
-  defaultValue: true
-  webcoreBinding: none
-
-ContentChangeObserverEnabled:
-  type: bool
-  defaultValue: true
-  condition: PLATFORM(IOS_FAMILY)
-
-SubpixelCSSOMElementMetricsEnabled:
-  type: bool
-  defaultValue: false
-
-UseGiantTiles:
-  type: bool
-  defaultValue: false
-
-MediaDevicesEnabled:
-  type: bool
-  defaultValue: false
-  condition: ENABLE(MEDIA_STREAM)
-
-MediaStreamEnabled:
-  type: bool
-  defaultValue: true
-  condition: ENABLE(MEDIA_STREAM)
-
-MediaEnabled:
-  type: bool
-  defaultValue: true
-  webcoreName: mediaEnabled
-  condition: ENABLE(VIDEO)
-
-PeerConnectionEnabled:
-  type: bool
-  defaultValue: WebCore::LibWebRTCProvider::webRTCAvailable()
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(WEB_RTC)
-
-InterruptAudioOnPageVisibilityChangeEnabled:
-  type: bool
-  defaultValue: WebCore::RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange()
-  condition: ENABLE(MEDIA_STREAM)
-
-UseLegacyTextAlignPositionedElementBehavior:
-  type: bool
-  defaultValue: false
-
-SpatialNavigationEnabled:
-  type: bool
-  defaultValue: false
-
-MediaSourceEnabled:
-  type: bool
-  defaultValue: WebCore::Settings::platformDefaultMediaSourceEnabled()
-  condition: ENABLE(MEDIA_SOURCE)
-  webcoreBinding: none
-
-ViewGestureDebuggingEnabled:
-  type: bool
-  defaultValue: false
-  webcoreBinding: none
-
-ShouldConvertPositionStyleOnCopy:
-  type: bool
-  defaultValue: false
-
-Standalone:
-  type: bool
-  defaultValue: false
-
-TelephoneNumberParsingEnabled:
-  type: bool
-  defaultValue: false
-
-AllowMultiElementImplicitSubmission:
-  type: bool
-  defaultValue: false
-
-AlwaysUseAcceleratedOverflowScroll:
-  type: bool
-  defaultValue: false
-
-PasswordEchoEnabled:
-  type: bool
-  defaultValue: DEFAULT_PASSWORD_ECHO_ENABLED
-
-ImageControlsEnabled:
-  type: bool
-  defaultValue: false
-  condition: ENABLE(SERVICE_CONTROLS)
-
-EnableInheritURIQueryComponent:
-  type: bool
-  defaultValue: false
-
-ServiceControlsEnabled:
-  type: bool
-  defaultValue: false
-  condition: ENABLE(SERVICE_CONTROLS)
-
-DeferredCSSParserEnabled:
-  type: bool
-  defaultValue: false
-
-HTTPEquivEnabled:
-  type: bool
-  defaultValue: true
-  webcoreName: httpEquivEnabled
-
-MockCaptureDevicesPromptEnabled:
-  type: bool
-  defaultValue: true
-  webcoreBinding: none
-
-# FIXME: What is this for?
-EnumeratingAllNetworkInterfacesEnabled:
-  type: bool
-  defaultValue: false
-  webcoreBinding: none
-
-DownloadAttributeEnabled:
-  type: bool
-  defaultValue: true
-  condition: ENABLE(DOWNLOAD_ATTRIBUTE)
-
-SelectionPaintingWithoutSelectionGapsEnabled:
-  type: bool
-  defaultValue: false
-
-ApplePayEnabled:
-  type: bool
-  defaultValue: DEFAULT_APPLE_PAY_ENABLED
-  condition: ENABLE(APPLE_PAY)
-
-ApplePayCapabilityDisclosureAllowed:
-  type: bool
-  defaultValue: true
-  condition: ENABLE(APPLE_PAY)
-
-LayoutViewportHeightExpansionFactor:
-  type: double
-  defaultValue: DEFAULT_VISUAL_VIEWPORT_HEIGHT_EXPANSION_FACTOR
-
-NeedsStorageAccessFromFileURLsQuirk:
-  type: bool
-  defaultValue: true
-
-LargeImageAsyncDecodingEnabled:
-  type: bool
-  defaultValue: true
-
-AnimatedImageAsyncDecodingEnabled:
-  type: bool
-  defaultValue: true
-
-MenuItemElementEnabled:
-  type: bool
-  defaultValue: false
-  webcoreBinding: RuntimeEnabledFeatures
-
-MediaPreloadingEnabled:
-  type: bool
-  defaultValue: false
-
-InteractiveFormValidationEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "HTML Interactive Form Validation"
-  humanReadableDescription: "HTML interactive form validation"
-
-ShouldSuppressTextInputFromEditingDuringProvisionalNavigation:
-  type: bool
-  defaultValue: false
-
-GamepadsEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Gamepads"
-  humanReadableDescription: "Web Gamepad API support"
-  condition: ENABLE(GAMEPAD)
-
-InputEventsEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Input Events"
-  humanReadableDescription: "Enable InputEvents support"
-
-ModernMediaControlsEnabled:
-  type: bool
-  defaultValue: DEFAULT_MODERN_MEDIA_CONTROLS_ENABLED
-  humanReadableName: "Modern Media Controls"
-  humanReadableDescription: "Use modern media controls look"
-  webcoreBinding: RuntimeEnabledFeatures
-
-BeaconAPIEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Beacon API"
-  humanReadableDescription: "Beacon API"
-
-LegacyEncryptedMediaAPIEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Enable Legacy EME API"
-  humanReadableDescription: "Enable legacy EME API"
-  condition: ENABLE(LEGACY_ENCRYPTED_MEDIA)
-
-AllowMediaContentTypesRequiringHardwareSupportAsFallback:
-  type: bool
-  defaultValue: DEFAULT_ALLOW_MEDIA_CONTENT_TYPES_REQUIRING_HARDWARE_SUPPORT_AS_FALLBACK
-  humanReadableName: "Allow Media Content Types Requirining Hardware As Fallback"
-  humanReadableDescription: "Allow Media Content Types Requirining Hardware As Fallback"
-
-InspectorAdditionsEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Web Inspector Additions"
-  humanReadableDescription: "Enable additional page APIs used by the Web Inspector frontend page"
-  webcoreBinding: RuntimeEnabledFeatures
-
-DirectoryUploadEnabled:
-  type: bool
-  defaultValue: DEFAULT_DIRECTORY_UPLOAD_ENABLED
-  humanReadableName: "Directory Upload"
-  humanReadableDescription: "input.webkitdirectory / dataTransferItem.webkitGetAsEntry()"
-  webcoreBinding: RuntimeEnabledFeatures
-
-DataTransferItemsEnabled:
-  type: bool
-  defaultValue: DEFAULT_DATA_TRANSFER_ITEMS_ENABLED
-  humanReadableName: "Data Transfer Items"
-  humanReadableDescription: "Enables DataTransferItem in the clipboard API"
-
-CustomPasteboardDataEnabled:
-  type: bool
-  defaultValue: DEFAULT_CUSTOM_PASTEBOARD_DATA_ENABLED
-  humanReadableName: "Custom pasteboard data"
-  humanReadableDescription: "Enable custom clipboard types and better security model for clipboard API."
-  webcoreBinding: RuntimeEnabledFeatures
-
-WebShareEnabled:
-  type: bool
-  defaultValue: DEFAULT_WEB_SHARE_ENABLED
-  humanReadableName: "Web Share"
-  humanReadableDescription: "Enable support for share sheet via Web Share API"
-
-ViewportFitEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Viewport Fit"
-  humanReadableDescription: "Enable viewport-fit viewport parameter"
-
-IncrementalRenderingSuppressionTimeout:
-  type: double
-  defaultValue: 5
-  webcoreName: incrementalRenderingSuppressionTimeoutInSeconds
-
-MinimumFontSize:
-  type: double
-  defaultValue: 0
-
-MinimumLogicalFontSize:
-  type: double
-  defaultValue: 9
-
-MinimumZoomFontSize:
-  type: double
-  defaultValue: WebCore::Settings::defaultMinimumZoomFontSize()
-  condition: ENABLE(TEXT_AUTOSIZING)
-
-DefaultFontSize:
-  type: double
-  defaultValue: 16
-
-DefaultFixedFontSize:
-  type: double
-  defaultValue: 13
-
-MaxParseDuration:
-  type: double
-  defaultValue: -1
-
-PasswordEchoDuration:
-  type: double
-  defaultValue: 2
-  webcoreName: passwordEchoDurationInSeconds
-
-LayoutFallbackWidth:
-  type: uint32_t
-  defaultValue: 980
-
-DeviceWidth:
-  type: uint32_t
-  defaultValue: 0
-
-DeviceHeight:
-  type: uint32_t
-  defaultValue: 0
-
-EditableLinkBehavior:
-  type: uint32_t
-  defaultValue: WebCore::EditableLinkNeverLive
-  webcoreBinding: custom
-
-InspectorAttachedHeight:
-  type: uint32_t
-  defaultValue: 500
-  webcoreBinding: none
-
-InspectorAttachedWidth:
-  type: uint32_t
-  defaultValue: 750
-  webcoreBinding: none
-
-InspectorAttachmentSide:
-  type: uint32_t
-  defaultValue: 0
-  webcoreBinding: none
-
-StorageBlockingPolicy:
-  type: uint32_t
-  defaultValue: WebCore::SecurityOrigin::BlockThirdPartyStorage
-  webcoreBinding: custom
-
-JavaScriptRuntimeFlags:
-  type: uint32_t
-  defaultValue: 0
-  webcoreBinding: custom
-
-DataDetectorTypes:
-  type: uint32_t
-  defaultValue: 0
-  webcoreBinding: custom
-  condition: ENABLE(DATA_DETECTION)
-
-UserInterfaceDirectionPolicy:
-  type: uint32_t
-  defaultValue: 0
-  webcoreBinding: custom
-
-SystemLayoutDirection:
-  type: uint32_t
-  defaultValue: 0
-  webcoreBinding: custom
-
-StandardFontFamily:
-  type: String
-  defaultValue: DEFAULT_STANDARD_FONT_FAMILY
-
-CursiveFontFamily:
-  type: String
-  defaultValue: DEFAULT_CURSIVE_FONT_FAMILY
-
-FantasyFontFamily:
-  type: String
-  defaultValue: DEFAULT_FANTASY_FONT_FAMILY
-
-FixedFontFamily:
-  type: String
-  defaultValue: DEFAULT_FIXED_FONT_FAMILY
-
-SansSerifFontFamily:
-  type: String
-  defaultValue: DEFAULT_SANS_SERIF_FONT_FAMILY
-
-SerifFontFamily:
-  type: String
-  defaultValue: DEFAULT_SERIF_FONT_FAMILY
-
-PictographFontFamily:
-  type: String
-  defaultValue: DEFAULT_PICTOGRAPH_FONT_FAMILY
-
-DefaultTextEncodingName:
-  type: String
-  defaultValue: defaultTextEncodingNameForSystemLanguage()
-
-FTPDirectoryTemplatePath:
-  type: String
-  defaultValue: '""'
-
-MediaContentTypesRequiringHardwareSupport:
-  type: String
-  defaultValue: WebCore::Settings::defaultMediaContentTypesRequiringHardwareSupport()
-
-InspectorWindowFrame:
-  type: String
-  defaultValue: '""'
-  webcoreBinding: none
-
-InactiveMediaCaptureSteamRepromptIntervalInMinutes:
-  type: double
-  defaultValue: DEFAULT_INTERACTIVE_MEDIA_CAPTURE_STREAM_REPROMPT_INTERVAL_IN_MINUTES
-  webcoreBinding: none
-
-LongRunningMediaCaptureStreamRepromptIntervalInHours:
-  type: double
-  defaultValue: 24
-  webcoreBinding: none
-
-PassiveTouchListenersAsDefaultOnDocument:
-  type: bool
-  defaultValue: defaultPassiveTouchListenersAsDefaultOnDocument()
-  webcoreName: passiveTouchListenersAsDefaultOnDocument
-
-ShouldIgnoreMetaViewport:
-  type: bool
-  defaultValue: false
-
-ShouldEnableTextAutosizingBoost:
-  type: bool
-  defaultValue: false
-  condition: ENABLE(TEXT_AUTOSIZING)
-
-ShouldAllowUserInstalledFonts:
-  type: bool
-  defaultValue: true
-
-MediaCapabilitiesEnabled:
-  type: bool
-  defaultValue: true
-
-SystemPreviewEnabled:
-  type: bool
-  defaultValue: false
-  condition: USE(SYSTEM_PREVIEW)
-
-CacheAPIEnabled:
-  type: bool
-  defaultValue: true
-  webcoreBinding: RuntimeEnabledFeatures
-
-ConstantPropertiesEnabled:
-  type: bool
-  defaultValue: true
-
-SubresourceIntegrityEnabled:
-  type: bool
-  defaultValue: true
-
-DisabledAdaptationsMetaTagEnabled:
-  type: bool
-  defaultValue: DISABLED_ADAPTATIONS_META_TAG_ENABLED
-
-ColorFilterEnabled:
-  type: bool
-  defaultValue: false
-
-PunchOutWhiteBackgroundsInDarkMode:
-  type: bool
-  defaultValue: false
-
-IncompleteImageBorderEnabled:
-  type: bool
-  defaultValue: false
-
-StorageAccessAPIEnabled:
-  type: bool
-  defaultValue: true
-
-LinkPreloadEnabled:
-  type: bool
-  defaultValue: true
-
-SourceBufferChangeTypeEnabled:
-  type: bool
-  defaultValue: true
-  condition: ENABLE(MEDIA_SOURCE)
-
-EncryptedMediaAPIEnabled:
-  type: bool
-  defaultValue: true
-  condition: ENABLE(ENCRYPTED_MEDIA)
-
-VideoQualityIncludesDisplayCompositingEnabled:
-  type: bool
-  defaultValue: false
-  condition: ENABLE(VIDEO)
-
-ShouldDecidePolicyBeforeLoadingQuickLookPreview:
-  defaultValue: false
-  type: bool
-
-ShouldUseServiceWorkerShortTimeout:
-  defaultValue: false
-  type: bool
-
-ServiceWorkerEntitlementDisabledForTesting:
-  type: bool
-  defaultValue: false
-  webcoreBinding: none
-
-ItpDebugModeEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "ITP Debug Mode"
-  humanReadableDescription: "Intelligent Tracking Prevention Debug Mode"
-  webcoreBinding: RuntimeEnabledFeatures
-
-PictureInPictureAPIEnabled:
-  type: bool
-  defaultValue: true
-  condition: ENABLE(PICTURE_IN_PICTURE_API)
-
-IsAccessibilityIsolatedTreeEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Isolated Accessibility Tree Mode"
-  humanReadableDescription: "Enable an accessibility hierarchy for VoiceOver that can be accessed on a secondary thread for improved performance"
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(ACCESSIBILITY_ISOLATED_TREE)
diff --git a/Source/WebKit/Shared/WebPreferencesDebug.yaml b/Source/WebKit/Shared/WebPreferencesDebug.yaml
deleted file mode 100644 (file)
index 4465529..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-# 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.
-
-# Debug Preferences
-
-AcceleratedDrawingEnabled:
-  type: bool
-  defaultValue: true
-
-SubpixelAntialiasedLayerTextEnabled:
-  type: bool
-  defaultValue: DEFAULT_SUBPIXEL_ANTIALIASED_LAYER_TEXT_ENABLED
-
-DisplayListDrawingEnabled:
-  type: bool
-  defaultValue: false
-
-CompositingBordersVisible:
-  type: bool
-  defaultValue: false
-  webcoreName: showDebugBorders
-
-CompositingRepaintCountersVisible:
-  type: bool
-  defaultValue: false
-  webcoreName: showRepaintCounter
-
-TiledScrollingIndicatorVisible:
-  type: bool
-  defaultValue: false
-  webcoreName: showTiledScrollingIndicator
-
-DisableScreenSizeOverride:
-  type: bool
-  defaultValue: false
-  condition: PLATFORM(IOS_FAMILY)
-
-SimpleLineLayoutDebugBordersEnabled:
-  type: bool
-  defaultValue: false
-
-DeveloperExtrasEnabled:
-  type: bool
-  defaultValue: false
-
-LogsPageMessagesToSystemConsoleEnabled:
-  type: bool
-  defaultValue: false
-
-ForceAlwaysUserScalable:
-  type: bool
-  defaultValue: false
-  webcoreBinding: none
-  condition: PLATFORM(IOS_FAMILY)
-
-ResourceUsageOverlayVisible:
-  type: bool
-  defaultValue: false
-  condition: ENABLE(RESOURCE_USAGE)
-
-VisibleDebugOverlayRegions:
-  type: uint32_t
-  defaultValue: 0
-
-IsInAppBrowserPrivacyEnabled:
-  type: bool
-  defaultValue: defaultInAppBrowserPrivacy()
-  humanReadableName: "In-App Browser Privacy"
-  humanReadableDescription: "Enable In-App Browser Privacy"
-
-NeedsInAppBrowserPrivacyQuirks:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Needs In-App Browser Privacy Quirks"
-  humanReadableDescription: "Enable quirks needed to support In-App Browser privacy"
index c84c91197cc143c54d1519fd9a3000c6b06663b0..464e977d1f39a21446a091ef1427ecfe84c7ec84 100644 (file)
 
 namespace WebKit {
 
+#if PLATFORM(IOS_FAMILY)
+
 bool defaultPassiveTouchListenersAsDefaultOnDocument()
 {
-#if PLATFORM(IOS_FAMILY)
-    return linkedOnOrAfter(WebKit::SDKVersion::FirstThatDefaultsToPassiveTouchListenersOnDocument);
-#else
-    return true;
-#endif
+    static bool result = linkedOnOrAfter(WebKit::SDKVersion::FirstThatDefaultsToPassiveTouchListenersOnDocument);
+    return result;
 }
 
 bool defaultCSSOMViewScrollingAPIEnabled()
 {
-#if PLATFORM(IOS_FAMILY)
-    if (WebCore::IOSApplication::isIMDb() && applicationSDKVersion() < DYLD_IOS_VERSION_13_0)
-        return false;
-#endif
-    return true;
+    static bool result = WebCore::IOSApplication::isIMDb() && applicationSDKVersion() < DYLD_IOS_VERSION_13_0;
+    return !result;
 }
 
-#if ENABLE(TEXT_AUTOSIZING) && !PLATFORM(IOS_FAMILY)
-
-bool defaultTextAutosizingUsesIdempotentMode()
-{
-    return false;
-}
+#endif
 
-#endif // ENABLE(TEXT_AUTOSIZING) && !PLATFORM(IOS_FAMILY)
+#if PLATFORM(MAC) || PLATFORM(IOS_FAMILY)
 
 bool defaultDisallowSyncXHRDuringPageDismissalEnabled()
 {
@@ -79,6 +70,9 @@ bool defaultDisallowSyncXHRDuringPageDismissalEnabled()
     return true;
 }
 
+#endif
+
+
 static bool defaultAsyncFrameAndOverflowScrollingEnabled()
 {
 #if PLATFORM(IOS_FAMILY)
@@ -154,12 +148,12 @@ bool defaultUseGPUProcessForWebGLEnabled()
 
 bool defaultCaptureAudioInGPUProcessEnabled()
 {
-#if PLATFORM(MAC) && HAVE(SYSTEM_FEATURE_FLAGS)
+#if HAVE(SYSTEM_FEATURE_FLAGS)
+#if PLATFORM(MAC)
     return isFeatureFlagEnabled("gpu_process_webrtc");
-#endif
-
-#if PLATFORM(IOS_FAMILY) && HAVE(SYSTEM_FEATURE_FLAGS)
+#elif PLATFORM(IOS_FAMILY)
     return isFeatureFlagEnabled("canvas_and_media_in_gpu_process");
+#endif
 #endif
 
     return false;
@@ -167,10 +161,6 @@ bool defaultCaptureAudioInGPUProcessEnabled()
 
 bool defaultCaptureAudioInUIProcessEnabled()
 {
-#if PLATFORM(IOS_FAMILY)
-    return false;
-#endif
-
 #if PLATFORM(MAC)
     return !defaultCaptureAudioInGPUProcessEnabled();
 #endif
@@ -258,6 +248,7 @@ bool defaultWebXREnabled()
 #endif // ENABLE(WEBXR)
 
 #if ENABLE(VP9)
+
 bool defaultVP9DecoderEnabled()
 {
 #if HAVE(SYSTEM_FEATURE_FLAGS)
@@ -266,9 +257,7 @@ bool defaultVP9DecoderEnabled()
 
     return true;
 }
-#endif
 
-#if ENABLE(VP9)
 bool defaultVP9SWDecoderEnabledOnBattery()
 {
 #if HAVE(SYSTEM_FEATURE_FLAGS)
@@ -277,9 +266,9 @@ bool defaultVP9SWDecoderEnabledOnBattery()
 
     return false;
 }
-#endif
 
-#if ENABLE(MEDIA_SOURCE) && ENABLE(VP9)
+#if ENABLE(MEDIA_SOURCE)
+
 bool defaultWebMParserEnabled()
 {
 #if HAVE(SYSTEM_FEATURE_FLAGS)
@@ -288,24 +277,8 @@ bool defaultWebMParserEnabled()
 
     return true;
 }
-#endif
-
-#if ENABLE(MEDIA_STREAM)
-bool defaultMediaRecorderEnabled()
-{
-#if HAVE(AVASSETWRITERDELEGATE)
-    return true;
-#else
-    return false;
-#endif
-}
-#endif
 
-#if ENABLE(WEB_RTC)
-bool defaultWebRTCH264LowLatencyEncoderEnabled()
-{
-    return true;
-}
-#endif
+#endif // ENABLE(MEDIA_SOURCE)
+#endif // ENABLE(VP9)
 
 } // namespace WebKit
index bebbcb7320daa41533dd8edf4403a8d8f0889b0f..2ef0caf74ec1ca904a2c90d32eb4fbc08d0bcbee 100644 (file)
 
 #include <wtf/Forward.h>
 
-#if PLATFORM(GTK)
-#define DEFAULT_WEBKIT_TABSTOLINKS_ENABLED true
-#else
-#define DEFAULT_WEBKIT_TABSTOLINKS_ENABLED false
-#endif
-
-#if PLATFORM(GTK) || PLATFORM(WPE)
-#define DEFAULT_CORE_MATHML_ENABLED true
-#else
-#define DEFAULT_CORE_MATHML_ENABLED false
-#endif
-
-#if ENABLE(SMOOTH_SCROLLING)
-#define DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED true
-#else
-#define DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED false
-#endif
-
-#if PLATFORM(COCOA) || PLATFORM(GTK)
-#define DEFAULT_HIDDEN_PAGE_DOM_TIMER_THROTTLING_ENABLED true
-#define DEFAULT_HIDDEN_PAGE_CSS_ANIMATION_SUSPENSION_ENABLED true
-#else
-#define DEFAULT_HIDDEN_PAGE_DOM_TIMER_THROTTLING_ENABLED false
-#define DEFAULT_HIDDEN_PAGE_CSS_ANIMATION_SUSPENSION_ENABLED false
-#endif
-
-#if ENABLE(SERVER_PRECONNECT)
-#define DEFAULT_LINK_PRECONNECT_ENABLED true
-#else
-#define DEFAULT_LINK_PRECONNECT_ENABLED false
-#endif
-
-#if PLATFORM(COCOA)
-#define DEFAULT_PDFPLUGIN_ENABLED true
-#else
-#define DEFAULT_PDFPLUGIN_ENABLED false
-#endif
-
 #if PLATFORM(IOS_FAMILY)
-#define DEFAULT_ALLOWS_PICTURE_IN_PICTURE_MEDIA_PLAYBACK true
-#define DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED false
-#define DEFAULT_FRAME_FLATTENING true
-#define DEFAULT_SHOULD_PRINT_BACKGROUNDS true
-#define DEFAULT_TEXT_AREAS_ARE_RESIZABLE false
-#define DEFAULT_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY false
-#define DEFAULT_SHOULD_RESPECT_IMAGE_ORIENTATION true
-#define DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK false
-#define DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK_AFTER_FULLSCREEN true
-#define DEFAULT_INLINE_MEDIA_PLAYBACK_REQUIRES_PLAYS_INLINE_ATTRIBUTE true
-#define DEFAULT_INVISIBLE_AUTOPLAY_NOT_PERMITTED true
-#define DEFAULT_MEDIA_DATA_LOADS_AUTOMATICALLY false
-#define DEFAULT_MEDIA_CONTROLS_SCALE_WITH_PAGE_ZOOM false
-#define DEFAULT_TEMPORARY_TILE_COHORT_RETENTION_ENABLED false
-#define DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK true
-#define DEFAULT_INTERACTIVE_MEDIA_CAPTURE_STREAM_REPROMPT_INTERVAL_IN_MINUTES 1
 #define EXPERIMENTAL_FULLSCREEN_API_HIDDEN false
 #else
-#define DEFAULT_ALLOWS_PICTURE_IN_PICTURE_MEDIA_PLAYBACK false
-#define DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED true
-#define DEFAULT_FRAME_FLATTENING false
-#define DEFAULT_SHOULD_PRINT_BACKGROUNDS false
-#define DEFAULT_TEXT_AREAS_ARE_RESIZABLE true
-#define DEFAULT_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY true
-#define DEFAULT_SHOULD_RESPECT_IMAGE_ORIENTATION false
-#define DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK true
-#define DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK_AFTER_FULLSCREEN false
-#define DEFAULT_INLINE_MEDIA_PLAYBACK_REQUIRES_PLAYS_INLINE_ATTRIBUTE false
-#define DEFAULT_INVISIBLE_AUTOPLAY_NOT_PERMITTED false
-#define DEFAULT_MEDIA_DATA_LOADS_AUTOMATICALLY true
-#define DEFAULT_MEDIA_CONTROLS_SCALE_WITH_PAGE_ZOOM true
-#define DEFAULT_TEMPORARY_TILE_COHORT_RETENTION_ENABLED true
-#define DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK false
-#define DEFAULT_INTERACTIVE_MEDIA_CAPTURE_STREAM_REPROMPT_INTERVAL_IN_MINUTES 10
 #define EXPERIMENTAL_FULLSCREEN_API_HIDDEN true
 #endif
 
-#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
-#define DEFAULT_PASSWORD_ECHO_ENABLED true
-#else
-#define DEFAULT_PASSWORD_ECHO_ENABLED false
-#endif
-
-#if PLATFORM(COCOA)
-#define DEFAULT_ALLOW_MEDIA_CONTENT_TYPES_REQUIRING_HARDWARE_SUPPORT_AS_FALLBACK true
-#else
-#define DEFAULT_ALLOW_MEDIA_CONTENT_TYPES_REQUIRING_HARDWARE_SUPPORT_AS_FALLBACK false
-#endif
-
-#if PLATFORM(MAC)
-#define DEFAULT_SUBPIXEL_ANTIALIASED_LAYER_TEXT_ENABLED true
-#else
-#define DEFAULT_SUBPIXEL_ANTIALIASED_LAYER_TEXT_ENABLED false
-#endif
-
-#if PLATFORM(IOS_FAMILY_SIMULATOR)
-#define DEFAULT_MOCK_CAPTURE_DEVICES_ENABLED true
-#else
-#define DEFAULT_MOCK_CAPTURE_DEVICES_ENABLED false
-#endif
-
-#if PLATFORM(COCOA)
-#define DEFAULT_SHOULD_CAPTURE_AUDIO_IN_UIPROCESS true
-#else
-#define DEFAULT_SHOULD_CAPTURE_AUDIO_IN_UIPROCESS false
-#endif
-
-#if PLATFORM(COCOA)
-#define DEFAULT_MODERN_MEDIA_CONTROLS_ENABLED true
-#else
-#define DEFAULT_MODERN_MEDIA_CONTROLS_ENABLED false
-#endif
-
-#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)
-#define DEFAULT_DATA_TRANSFER_ITEMS_ENABLED true
-#define DEFAULT_DIRECTORY_UPLOAD_ENABLED true
-#else
-#define DEFAULT_DATA_TRANSFER_ITEMS_ENABLED false
-#define DEFAULT_DIRECTORY_UPLOAD_ENABLED false
-#endif
-
-#if PLATFORM(COCOA)
-
-#if PLATFORM(WATCHOS)
-#define DEFAULT_STANDARD_FONT_FAMILY "system-ui"
-#else
-#define DEFAULT_STANDARD_FONT_FAMILY "Times"
-#endif
-
-#define DEFAULT_FANTASY_FONT_FAMILY "Papyrus"
-#define DEFAULT_FIXED_FONT_FAMILY "Courier"
-#define DEFAULT_SANS_SERIF_FONT_FAMILY "Helvetica"
-#define DEFAULT_SERIF_FONT_FAMILY "Times"
-
-#if PLATFORM(IOS_FAMILY)
-#define DEFAULT_CURSIVE_FONT_FAMILY "Snell Roundhand"
-#define DEFAULT_PICTOGRAPH_FONT_FAMILY "AppleColorEmoji"
-#else
-#define DEFAULT_CURSIVE_FONT_FAMILY "Apple Chancery"
-#define DEFAULT_PICTOGRAPH_FONT_FAMILY "Apple Color Emoji"
-#endif
-
-#else
-
-#define DEFAULT_STANDARD_FONT_FAMILY "Times"
-#define DEFAULT_CURSIVE_FONT_FAMILY "Comic Sans MS"
-#define DEFAULT_FANTASY_FONT_FAMILY "Impact"
-#define DEFAULT_FIXED_FONT_FAMILY "Courier New"
-#define DEFAULT_SANS_SERIF_FONT_FAMILY "Helvetica"
-#define DEFAULT_SERIF_FONT_FAMILY "Times"
-#define DEFAULT_PICTOGRAPH_FONT_FAMILY "Times"
-
-#endif
-
-#if PLATFORM(COCOA) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
-#define DEFAULT_WEB_SHARE_ENABLED true
-#else
-#define DEFAULT_WEB_SHARE_ENABLED false
-#endif
-
-#if !PLATFORM(WATCHOS)
-#define DEFAULT_AVFOUNDATION_ENABLED true
-#else
-#define DEFAULT_AVFOUNDATION_ENABLED false
-#endif
-
-#if PLATFORM(WATCHOS)
-#define DEFAULT_VISUAL_VIEWPORT_HEIGHT_EXPANSION_FACTOR 1
-#else
-#define DEFAULT_VISUAL_VIEWPORT_HEIGHT_EXPANSION_FACTOR 0
-#endif
-
-#if PLATFORM(WATCHOS)
-#define DISABLED_ADAPTATIONS_META_TAG_ENABLED true
-#else
-#define DISABLED_ADAPTATIONS_META_TAG_ENABLED false
-#endif
-
-#if ENABLE(EXPERIMENTAL_FEATURES)
-#define DEFAULT_EXPERIMENTAL_FEATURES_ENABLED true
-#else
-#define DEFAULT_EXPERIMENTAL_FEATURES_ENABLED false
-#endif
-
-#if ENABLE(EXPERIMENTAL_FEATURES) || PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)
-#define DEFAULT_SERVICE_WORKERS_ENABLED true
-#else
-#define DEFAULT_SERVICE_WORKERS_ENABLED false
-#endif
-
-#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(GTK) || PLATFORM(WPE)
-#define DEFAULT_PROCESS_SWAP_ON_CROSS_SITE_NAVIGATION_ENABLED true
-#else
-#define DEFAULT_PROCESS_SWAP_ON_CROSS_SITE_NAVIGATION_ENABLED false
-#endif
-
-// FIXME: Seems like this should be HAVE(CG_CONTEXT_DRAW_CONIC_GRADIENT).
-// FIXME: Can we change tvOS to be like the other Cocoa platforms?
-#if PLATFORM(COCOA) && !PLATFORM(APPLETV)
-#define DEFAULT_CONIC_GRADIENT_ENABLED true
-#else
-#define DEFAULT_CONIC_GRADIENT_ENABLED false
-#endif
-
-#if PLATFORM(WATCHOS)
-#define DEFAULT_INPUT_TYPE_COLOR_ENABLED false
-#define DEFAULT_DATALIST_ELEMENT_ENABLED false
-#else
-#define DEFAULT_INPUT_TYPE_COLOR_ENABLED true
-#define DEFAULT_DATALIST_ELEMENT_ENABLED true
-#endif
-
-#if PLATFORM(MAC)
-#define DEFAULT_DATE_TIME_INPUTS_EDITABLE_COMPONENTS_ENABLED true
-#else
-#define DEFAULT_DATE_TIME_INPUTS_EDITABLE_COMPONENTS_ENABLED false
-#endif
-
-#if !PLATFORM(MAC) && !PLATFORM(MACCATALYST) && !PLATFORM(APPLETV)
-#define DEFAULT_INPUT_TYPE_DATE_ENABLED true
-#define DEFAULT_INPUT_TYPE_DATETIMELOCAL_ENABLED true
-#define DEFAULT_INPUT_TYPE_MONTH_ENABLED true
-#define DEFAULT_INPUT_TYPE_TIME_ENABLED true
-#define DEFAULT_INPUT_TYPE_WEEK_ENABLED true
-#else
-#define DEFAULT_INPUT_TYPE_DATE_ENABLED false
-#define DEFAULT_INPUT_TYPE_DATETIMELOCAL_ENABLED false
-#define DEFAULT_INPUT_TYPE_MONTH_ENABLED false
-#define DEFAULT_INPUT_TYPE_TIME_ENABLED false
-#define DEFAULT_INPUT_TYPE_WEEK_ENABLED false
-#endif
-
-#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WIN)
-#define DEFAULT_CUSTOM_PASTEBOARD_DATA_ENABLED true
-#else
-#define DEFAULT_CUSTOM_PASTEBOARD_DATA_ENABLED false
-#endif
-
-#if PLATFORM(COCOA)
-#define DEFAULT_ASYNC_CLIPBOARD_API_ENABLED true
-#else
-#define DEFAULT_ASYNC_CLIPBOARD_API_ENABLED false
-#endif
-
-#if PLATFORM(IOS) || PLATFORM(MAC)
-#define DEFAULT_DOM_PASTE_ACCESS_REQUESTS_ENABLED true
-#else
-#define DEFAULT_DOM_PASTE_ACCESS_REQUESTS_ENABLED false
-#endif
-
-#if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS)
-#define DEFAULT_PREFER_FASTER_CLICK_OVER_DOUBLE_TAP true
-#else
-#define DEFAULT_PREFER_FASTER_CLICK_OVER_DOUBLE_TAP false
-#endif
-
-#if ENABLE(APPLE_PAY_REMOTE_UI)
-#define DEFAULT_APPLE_PAY_ENABLED true
-#else
-#define DEFAULT_APPLE_PAY_ENABLED false
-#endif
-
-#if ENABLE(EXPERIMENTAL_FEATURES) && (PLATFORM(GTK) || PLATFORM(WPE))
-#define DEFAULT_CSS_PAINTING_API_ENABLED true
-#define DEFAULT_CSS_TYPED_OM_ENABLED true
-#else
-#define DEFAULT_CSS_PAINTING_API_ENABLED false
-#define DEFAULT_CSS_TYPED_OM_ENABLED false
-#endif
-
-#if ENABLE(EXPERIMENTAL_FEATURES) && (PLATFORM(GTK) || PLATFORM(WPE))
-#define DEFAULT_SERVER_TIMING_ENABLED true
-#else
-#define DEFAULT_SERVER_TIMING_ENABLED false
-#endif
-
-#if PLATFORM(GTK) || PLATFORM(WPE)
-#define DEFAULT_OFFSCREEN_CANVAS_ENABLED DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
-#else
-#define DEFAULT_OFFSCREEN_CANVAS_ENABLED false
-#endif
-
-#if PLATFORM(COCOA)
-#define DEFAULT_ENTER_KEY_HINT_ENABLED true
-#else
-#define DEFAULT_ENTER_KEY_HINT_ENABLED false
-#endif
-
 namespace WebKit {
 
 #if PLATFORM(COCOA) && HAVE(SYSTEM_FEATURE_FLAGS)
 bool isFeatureFlagEnabled(const String&);
 #endif
 
+#if PLATFORM(IOS_FAMILY)
 bool defaultPassiveTouchListenersAsDefaultOnDocument();
 bool defaultCSSOMViewScrollingAPIEnabled();
-bool defaultDisallowSyncXHRDuringPageDismissalEnabled();
-
 #if ENABLE(TEXT_AUTOSIZING)
 bool defaultTextAutosizingUsesIdempotentMode();
 #endif
-#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
+#endif
+
+#if PLATFORM(MAC) || PLATFORM(IOS_FAMILY)
+bool defaultDisallowSyncXHRDuringPageDismissalEnabled();
+#endif
+
+#if !PLATFORM(MACCATALYST)
 bool allowsDeprecatedSynchronousXMLHttpRequestDuringUnload();
 #endif
 
@@ -369,18 +93,9 @@ bool defaultWebXREnabled();
 #if ENABLE(VP9)
 bool defaultVP9DecoderEnabled();
 bool defaultVP9SWDecoderEnabledOnBattery();
-#endif
-
-#if ENABLE(MEDIA_SOURCE) && ENABLE(VP9)
+#if ENABLE(MEDIA_SOURCE)
 bool defaultWebMParserEnabled();
 #endif
-
-#if ENABLE(MEDIA_STREAM)
-bool defaultMediaRecorderEnabled();
-#endif
-
-#if ENABLE(WEB_RTC)
-bool defaultWebRTCH264LowLatencyEncoderEnabled();
 #endif
 
 } // namespace WebKit
diff --git a/Source/WebKit/Shared/WebPreferencesExperimental.yaml b/Source/WebKit/Shared/WebPreferencesExperimental.yaml
deleted file mode 100644 (file)
index cacd7c3..0000000
+++ /dev/null
@@ -1,559 +0,0 @@
-# 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.
-
-# For experimental features:
-# The type should be boolean.
-# They must include a humanReadableName and humanReadableDescription. This is
-#   the text exposed to the user from the WebKit client.
-# The default value may be either false (for unstable features) or
-#   DEFAULT_EXPERIMENTAL_FEATURES_ENABLED (for features that are ready for
-#   wider testing).
-
-BlankAnchorTargetImpliesNoOpenerEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Blank anchor target implies rel=noopener"
-  humanReadableDescription: "target=_blank on anchor elements implies rel=noopener"
-
-DisallowSyncXHRDuringPageDismissalEnabled:
-  type: bool
-  defaultValue: defaultDisallowSyncXHRDuringPageDismissalEnabled()
-  humanReadableName: "Disallow sync XHR during page dismissal"
-  humanReadableDescription: "Disallow synchronous XMLHttpRequest during page dismissal"
-
-HTTPSUpgradeEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Automatic HTTPS upgrade"
-  humanReadableDescription: "Automatic HTTPS upgrade for known supported sites"
-
-InProcessCookieCacheEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "In-Process Cookie Cache"
-  humanReadableDescription: "In-Process DOM Cookie Cache"
-
-ThirdPartyIframeRedirectBlockingEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Block top-level redirects by third-party iframes"
-  humanReadableDescription: "Block top-level redirects by third-party iframes"
-
-GoogleAntiFlickerOptimizationQuirkEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Quirk to prevent delayed initial painting on sites using Google's Anti-Flicker optimization"
-  humanReadableDescription: "Quirk to prevent delayed initial painting on sites using Google's Anti-Flicker optimization"
-
-UserGesturePromisePropagationEnabled:
-  type: bool
-  defaultValue: true
-  webcoreBinding: RuntimeEnabledFeatures
-  humanReadableName: "UserGesture Promise Propagation"
-  humanReadableDescription: "UserGesture Promise Propagation"
-
-ModernUnprefixedWebAudioEnabled:
-  type: bool
-  defaultValue: true
-  condition: ENABLE(WEB_AUDIO)
-  humanReadableName: "Modern WebAudio API"
-  humanReadableDescription: "Modern and unprefixed WebAudio API"
-
-AudioWorkletEnabled:
-  type: bool
-  defaultValue: false
-  condition: ENABLE(WEB_AUDIO)
-  humanReadableName: "WebAudio AudioWorklet API"
-  humanReadableDescription: "WebAudio AudioWorklet API"
-
-RequestIdleCallbackEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "requestIdleCallback"
-  humanReadableDescription: "Enable requestIdleCallback support"
-
-MediaRecorderEnabled:
-  type: bool
-  defaultValue: defaultMediaRecorderEnabled()
-  condition: ENABLE(MEDIA_STREAM)
-  humanReadableName: "MediaRecorder"
-  humanReadableDescription: "MediaRecorder"
-
-ScreenCaptureEnabled:
-  type: bool
-  defaultValue: true
-  condition: ENABLE(MEDIA_STREAM) && PLATFORM(MAC)
-  humanReadableName: "ScreenCapture"
-  humanReadableDescription: "Enable ScreenCapture"
-
-WebRTCH264LowLatencyEncoderEnabled:
-  type: bool
-  defaultValue: defaultWebRTCH264LowLatencyEncoderEnabled()
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(WEB_RTC)
-  humanReadableName: "WebRTC H264 LowLatency encoder"
-  humanReadableDescription: "Enable H264 LowLatency encoder"
-
-WebRTCH265CodecEnabled:
-  type: bool
-  defaultValue: false
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(WEB_RTC)
-  humanReadableName: "WebRTC H265 codec"
-  humanReadableDescription: "Enable WebRTC H265 codec"
-
-WebRTCVP9CodecEnabled:
-  type: bool
-  defaultValue: false
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(WEB_RTC)
-  humanReadableName: "WebRTC VP9 codec"
-  humanReadableDescription: "Enable WebRTC VP9 codec"
-
-WebRTCPlatformCodecsInGPUProcessEnabled:
-  type: bool
-  defaultValue: defaultWebRTCCodecsInGPUProcess()
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(WEB_RTC)
-  humanReadableName: "WebRTC Platform Codecs in GPU Process"
-  humanReadableDescription: "Enable WebRTC Platform Codecs in GPU Process"
-
-ExposeSpeakersEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Allow speaker device selection"
-  humanReadableDescription: "Allow speaker device selection"
-  condition: ENABLE(MEDIA_STREAM)
-
-PerElementSpeakerSelectionEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Allow per media element speaker device selection"
-  humanReadableDescription: "Allow per media element speaker device selection"
-  condition: ENABLE(MEDIA_STREAM)
-
-VP9DecoderEnabled:
-  type: bool
-  defaultValue: defaultVP9DecoderEnabled()
-  webcoreBinding: none
-  humanReadableName: "VP9 decoder"
-  humanReadableDescription: "Enable VP9 decoder"
-  condition: ENABLE(VP9)
-
-VP9SWDecoderEnabledOnBattery:
-  type: bool
-  defaultValue: defaultVP9SWDecoderEnabledOnBattery()
-  webcoreBinding: none
-  humanReadableName: "VP9 SW decoder on battery"
-  humanReadableDescription: "Enable VP9 SW decoder on battery"
-  condition: ENABLE(VP9)
-
-WebMParserEnabled:
-  type: bool
-  defaultValue: defaultWebMParserEnabled()
-  webcoreBinding: RuntimeEnabledFeatures
-  humanReadableName: "WebM MSE parser"
-  humanReadableDescription: "Enable WebM MSE parser"
-  condition: ENABLE(MEDIA_SOURCE) && ENABLE(VP9)
-
-HighlightAPIEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Highlight API"
-  humanReadableDescription: "Highlight API support"
-  webcoreBinding: RuntimeEnabledFeatures
-
-WebAuthenticationEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Web Authentication"
-  humanReadableDescription: "Enable Web Authentication support"
-  condition: ENABLE(WEB_AUTHN)
-
-WebAuthenticationLocalAuthenticatorEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Web Authentication Local Authenticator"
-  humanReadableDescription: "Enable Web Authentication local authenticator support"
-  condition: ENABLE(WEB_AUTHN)
-
-PaintTimingEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Paint Timing"
-  humanReadableDescription: "Enable PaintTiming API"
-  webcoreBinding: RuntimeEnabledFeatures
-
-AsyncClipboardAPIEnabled:
-  type: bool
-  defaultValue: DEFAULT_ASYNC_CLIPBOARD_API_ENABLED
-  humanReadableName: "Async clipboard API"
-  humanReadableDescription: "Enable the async clipboard API"
-
-ShouldDeferAsynchronousScriptsUntilAfterDocumentLoadOrFirstPaint:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Defer async scripts until DOMContentLoaded or first-paint"
-  humanReadableDescription: "Defer async scripts until DOMContentLoaded or first-paint"
-
-SpringTimingFunctionEnabled:
-  type: bool
-  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
-  humanReadableName: "CSS Spring Animations"
-  humanReadableDescription: "CSS Spring Animation prototype"
-
-ImageBitmapEnabled:
-  type: bool
-  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
-  humanReadableName: "ImageBitmap"
-  humanReadableDescription: "Support for the ImageBitmap APIs"
-  webcoreBinding: RuntimeEnabledFeatures
-
-HTTP3Enabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "HTTP/3"
-  humanReadableDescription: "Enable HTTP/3"
-  webcoreBinding: none
-  condition: HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
-
-IntersectionObserverEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Intersection Observer"
-  humanReadableDescription: "Enable Intersection Observer support"
-  condition: ENABLE(INTERSECTION_OBSERVER)
-
-VisualViewportAPIEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Visual Viewport API"
-  humanReadableDescription: "Enable Visual Viewport API"
-
-SyntheticEditingCommandsEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Synthetic Editing Commands"
-  humanReadableDescription: "Enable Synthetic Editing Commands"
-
-CSSOMViewSmoothScrollingEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "CSSOM View Smooth Scrolling"
-  humanReadableDescription: "Enable DOM API and CSS property for 'smooth' scroll behavior"
-
-WebAnimationsCompositeOperationsEnabled:
-  type: bool
-  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
-  humanReadableName: "Web Animations composite operations"
-  humanReadableDescription: "Support for the CompositeOperation enum and properties consuming it"
-  webcoreBinding: RuntimeEnabledFeatures
-
-WebAnimationsMutableTimelinesEnabled:
-  type: bool
-  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
-  humanReadableName: "Web Animations mutable timelines"
-  humanReadableDescription: "Support for setting the timeline property of an Animation object"
-  webcoreBinding: RuntimeEnabledFeatures
-
-WebGL2Enabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "WebGL 2.0"
-  humanReadableDescription: "WebGL 2 prototype"
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(WEBGL2)
-
-WebGPUEnabled:
-  type: bool
-  defaultValue: defaultWebGPUEnabled()
-  humanReadableName: "WebGPU"
-  humanReadableDescription: "WebGPU Sketch prototype"
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(WEBGPU)
-
-MaskWebGLStringsEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Mask WebGL Strings"
-  humanReadableDescription: "Mask WebGL Vendor, Renderer, Shader Language Strings"
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(WEBGL) || ENABLE(WEBGL2)
-
-AccessibilityObjectModelEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Accessibility Object Model"
-  humanReadableDescription: "Accessibility Object Model support"
-  webcoreBinding: RuntimeEnabledFeatures
-
-ServerTimingEnabled:
-  type: bool
-  defaultValue: DEFAULT_SERVER_TIMING_ENABLED
-  humanReadableName: "Server Timing"
-  humanReadableDescription: "Enable Server Timing API"
-  webcoreBinding: RuntimeEnabledFeatures
-  webcoreName: serverTimingEnabled
-
-CSSCustomPropertiesAndValuesEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "CSS Custom Properties and Values API"
-  humanReadableDescription: "Enable CSS Custom Properties and Values API"
-
-CSSPaintingAPIEnabled:
-  type: bool
-  defaultValue: DEFAULT_CSS_PAINTING_API_ENABLED
-  humanReadableName: "CSS Painting API"
-  humanReadableDescription: "Enable the CSS Painting API"
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(CSS_PAINTING_API)
-
-CSSTypedOMEnabled:
-  type: bool
-  defaultValue: DEFAULT_CSS_TYPED_OM_ENABLED
-  humanReadableName: "CSS Typed OM"
-  humanReadableDescription: "Enable the CSS Typed OM"
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(CSS_TYPED_OM)
-
-WebSQLDisabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Disable Web SQL"
-  humanReadableDescription: "Disable Web SQL"
-  webcoreBinding: RuntimeEnabledFeatures
-
-ProcessSwapOnCrossSiteNavigationEnabled:
-  type: bool
-  defaultValue: DEFAULT_PROCESS_SWAP_ON_CROSS_SITE_NAVIGATION_ENABLED
-  humanReadableName: "Swap Processes on Cross-Site Navigation"
-  humanReadableDescription: "Swap WebContent Processes on cross-site navigations"
-  webcoreBinding: none
-
-MediaCapabilitiesExtensionsEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Media Capabilities Extensions"
-  humanReadableDescription: "Media Capabilities Extensions"
-
-HDRMediaCapabilitiesEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "HDR Media Capabilities"
-  humanReadableDescription: "HDR Media Capabilities"
-
-ResizeObserverEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Resize Observer"
-  humanReadableDescription: "Enable Resize Observer support"
-  condition: ENABLE(RESIZE_OBSERVER)
-
-AdClickAttributionEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Ad Click Attribution"
-  humanReadableDescription: "Enable Ad Click Attribution for Cross-Site Link Navigations"
-
-AdClickAttributionDebugModeEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Ad Click Attribution Debug Mode"
-  humanReadableDescription: "Enable Ad Click Attribution Debug Mode"
-  webcoreBinding: RuntimeEnabledFeatures
-
-FetchAPIKeepAliveEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Fetch API Request KeepAlive"
-  humanReadableDescription: "Enable Fetch API Request KeepAlive"
-  webcoreBinding: RuntimeEnabledFeatures
-  webcoreName: fetchAPIKeepAliveEnabled
-
-GenericCueAPIEnabled:
-  type: bool
-  defaultValue: true
-  condition: ENABLE(VIDEO)
-  humanReadableName: "Generic Text Track Cue API"
-  humanReadableDescription: "Enable Generic Text Track Cue API"
-  webcoreName: genericCueAPIEnabled
-
-AspectRatioOfImgFromWidthAndHeightEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Aspect ratio of <img> from width and height"
-  humanReadableDescription: "Map HTML attributes width/height to the default aspect ratio of <img>"
-
-ReadableByteStreamAPIEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "ReadableByteStream"
-  humanReadableDescription: "Enable Readable Byte Streams"
-  webcoreBinding: RuntimeEnabledFeatures
-
-ReferrerPolicyAttributeEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Referrer Policy attribute"
-  humanReadableDescription: "Enable Referrer Policy attribute"
-
-PageAtRuleSupportEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "@page CSS at-rule support"
-  humanReadableDescription: "Enable @page support"
-  webcoreBinding: RuntimeEnabledFeatures
-
-CoreMathMLEnabled:
-  type: bool
-  defaultValue: DEFAULT_CORE_MATHML_ENABLED
-  humanReadableName: "MathML Core"
-  humanReadableDescription: "Disable features removed from the MathML Core spec."
-
-LinkPrefetchEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "LinkPrefetch"
-  humanReadableDescription: "Enable LinkedPrefetch"
-
-LinkPreloadResponsiveImagesEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Link preload responsive images"
-  humanReadableDescription: "Enable link preload responsive images"
-
-IsNSURLSessionWebSocketEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "NSURLSession WebSocket"
-  humanReadableDescription: "Use NSURLSession WebSocket API"
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: HAVE(NSURLSESSION_WEBSOCKET)
-
-LazyImageLoadingEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Lazy image loading"
-  humanReadableDescription: "Enable lazy image loading support"
-
-LazyIframeLoadingEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Lazy iframe loading"
-  humanReadableDescription: "Enable lazy iframe loading support"
-
-IsThirdPartyCookieBlockingDisabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Disable Full 3rd-Party Cookie Blocking (ITP)"
-  humanReadableDescription: "Disable full third-party cookie blocking when Intelligent Tracking Prevention is enabled"
-
-IsFirstPartyWebsiteDataRemovalDisabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Disable Removal of Non-Cookie Data After 7 Days of No User Interaction (ITP)"
-  humanReadableDescription: "Disable removal of all non-cookie website data after seven days of no user interaction when Intelligent Tracking Prevention is enabled"
-
-IsSameSiteStrictEnforcementEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "SameSite strict enforcement (ITP)"
-  humanReadableDescription: "Enable SameSite strict enforcement to mitigate bounce tracking"
-
-IsLoggedInAPIEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "IsLoggedIn web API"
-  humanReadableDescription: "Enable the proposed IsLoggedIn web API"
-
-RemotePlaybackEnabled:
-  condition: ENABLE(WIRELESS_PLAYBACK_TARGET)
-  type: bool
-  defaultValue: true
-  humanReadableName: "Remote Playback API"
-  humanReadableDescription: "Enable Remote Playback API"
-
-DialogElementEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Dialog Element"
-  humanReadableDescription: "Enable the Dialog Element"
-  webcoreBinding: RuntimeEnabledFeatures
-
-WebShareFileAPIEnabled:
-  type: bool
-  defaultValue: DEFAULT_WEB_SHARE_ENABLED
-  humanReadableName: "Web Share API Level 2"
-  humanReadableDescription: "Enable level 2 of Web Share API"
-
-IncrementalPDFLoadingEnabled:
-  type: bool
-  defaultValue: defaultIncrementalPDFEnabled()
-  humanReadableName: "Incremental PDF Loading"
-  humanReadableDescription: "Enable Incremental PDF Loading on supported platforms"
-  condition: HAVE(INCREMENTAL_PDF_APIS)
-  webcoreBinding: RuntimeEnabledFeatures
-
-WebXREnabled:
-  type: bool
-  defaultValue: defaultWebXREnabled()
-  humanReadableName: "WebXR Device API"
-  humanReadableDescription: "Adds support for accessing virtual reality (VR) and augmented reality (AR) devices, including sensors and head-mounted displays, on the Web"
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(WEBXR)
-
-WritableStreamAPIEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "WritableStream API"
-  humanReadableDescription: "Enable Writable Stream API"
-  webcoreBinding: RuntimeEnabledFeatures
-
-TransformStreamAPIEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "TransformStream API"
-  humanReadableDescription: "Enable Transform Stream API"
-  webcoreBinding: RuntimeEnabledFeatures
-
-CoreImageAcceleratedFilterRenderEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "CoreImage-Accelerated Filter Rendering"
-  humanReadableDescription: "Accelerated CSS and SVG filter rendering using CoreImage"
-  condition: ENABLE(CORE_IMAGE_ACCELERATED_FILTER_RENDER)
-
-DisableMediaExperiencePIDInheritance:
-  type: bool
-  defaultValue: false
-  webcoreBinding: RuntimeEnabledFeatures
-  humanReadableName: "Disable Media Experience PID Inheritance"
-  humanReadableDescription: "Disable Media Experience PID Inheritance"
-  condition: HAVE(CELESTIAL)
-
-CSSIndividualTransformPropertiesEnabled:
-  type: bool
-  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
-  humanReadableName: "CSS Individual Transform Properties"
-  humanReadableDescription: "Support for the translate, scale and rotate CSS properties"
diff --git a/Source/WebKit/Shared/WebPreferencesInternal.yaml b/Source/WebKit/Shared/WebPreferencesInternal.yaml
deleted file mode 100644 (file)
index ac385b8..0000000
+++ /dev/null
@@ -1,462 +0,0 @@
-# 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.
-
-# For internal features:
-# The type should be boolean.
-# They must include a humanReadableName and humanReadableDescription. This is
-#   the text exposed to the user from the WebKit client.
-
-PrefixedWebAudioEnabled:
-  type: bool
-  defaultValue: false
-  condition: ENABLE(WEB_AUDIO)
-  humanReadableName: "Prefixed WebAudio API"
-  humanReadableDescription: "Prefixed WebAudio API"
-
-SimpleLineLayoutEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Simple line layout"
-  humanReadableDescription: "Enable simple line layout path (SLL)"
-
-WebRTCDTMFEnabled:
-  type: bool
-  defaultValue: true
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(WEB_RTC)
-  humanReadableName: "WebRTC DTMF"
-  humanReadableDescription: "Enable WebRTC DTMF"
-
-WebRTCH264SimulcastEnabled:
-  type: bool
-  defaultValue: true
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(WEB_RTC)
-  humanReadableName: "WebRTC H264 Simulcast"
-  humanReadableDescription: "Enable WebRTC H264 Simulcast"
-
-WebRTCH264HardwareEncoderEnabled:
-  type: bool
-  defaultValue: true
-  webcoreBinding: none
-  condition: ENABLE(WEB_RTC)
-  humanReadableName: "WebRTC H264 Hardware encoder"
-  humanReadableDescription: "Enable H264 Hardware encoder"
-  category: internal
-
-WebRTCMDNSICECandidatesEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "WebRTC mDNS ICE candidates"
-  humanReadableDescription: "Enable WebRTC mDNS ICE candidates"
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(WEB_RTC)
-
-SpeakerSelectionRequiresUserGesture:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Require a user gesture for speaker selection"
-  humanReadableDescription: "Require a user gesture for speaker selection"
-  condition: ENABLE(MEDIA_STREAM)
-
-FrameFlatteningEnabled:
-  type: bool
-  defaultValue: DEFAULT_FRAME_FLATTENING
-  webcoreBinding: custom
-  humanReadableName: "Frame flattening"
-  humanReadableDescription: "Enable frame flattening, which adjusts the height of an iframe to fit its contents"
-
-KeygenElementEnabled:
-  type: bool
-  defaultValue: false
-  webcoreBinding: RuntimeEnabledFeatures
-  humanReadableName: "HTMLKeygenElement"
-  humanReadableDescription: "Enables the deprecated and disabled-by-default HTML keygen element."
-
-OffscreenCanvasEnabled:
-  type: bool
-  defaultValue: DEFAULT_OFFSCREEN_CANVAS_ENABLED
-  humanReadableName: "OffscreenCanvas"
-  humanReadableDescription: "Support for the OffscreenCanvas APIs"
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(OFFSCREEN_CANVAS)
-
-CSSOMViewScrollingAPIEnabled:
-  type: bool
-  defaultValue: defaultCSSOMViewScrollingAPIEnabled()
-  humanReadableName: "CSSOM View Scrolling API"
-  humanReadableDescription: "Implement standard behavior for scrollLeft, scrollTop, scrollWidth, scrollHeight, scrollTo, scrollBy and scrollingElement."
-
-BlockingOfSmallPluginsEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Block small plugins"
-  humanReadableDescription: "Stop plugins smaller than a certain threshold from loading."
-
-CaptureAudioInUIProcessEnabled:
-  type: bool
-  defaultValue: defaultCaptureAudioInUIProcessEnabled()
-  humanReadableName: "Capture audio in UI Process"
-  humanReadableDescription: "Enable audio capture in UI Process"
-  webcoreBinding: none
-  condition: ENABLE(MEDIA_STREAM)
-
-CaptureAudioInGPUProcessEnabled:
-  type: bool
-  defaultValue: defaultCaptureAudioInGPUProcessEnabled()
-  humanReadableName: "GPU Process: Audio Capture"
-  humanReadableDescription: "Enable audio capture in GPU Process"
-  webcoreBinding: none
-  condition: ENABLE(MEDIA_STREAM)
-
-CaptureVideoInUIProcessEnabled:
-  type: bool
-  defaultValue: defaultCaptureVideoInUIProcessEnabled()
-  humanReadableName: "Capture video in UI Process"
-  humanReadableDescription: "Enable video capture in UI Process"
-  webcoreBinding: none
-  condition: ENABLE(MEDIA_STREAM)
-
-CaptureVideoInGPUProcessEnabled:
-  type: bool
-  defaultValue: defaultCaptureVideoInGPUProcessEnabled()
-  humanReadableName: "GPU Process: Video Capture"
-  humanReadableDescription: "Enable video capture in GPU Process"
-  webcoreBinding: none
-  condition: ENABLE(MEDIA_STREAM)
-
-ExperimentalPlugInSandboxProfilesEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Sandbox Plug-Ins"
-  humanReadableDescription: "Enable Plug-In sandboxing"
-  webcoreBinding: RuntimeEnabledFeatures
-  webcoreName: experimentalPlugInSandboxProfilesEnabled
-
-ServiceWorkersEnabled:
-  type: bool
-  defaultValue: DEFAULT_SERVICE_WORKERS_ENABLED
-  humanReadableName: "Service Workers"
-  humanReadableDescription: "Enable Service Workers"
-  webcoreBinding: RuntimeEnabledFeatures
-  webcoreName: serviceWorkerEnabled
-  condition: ENABLE(SERVICE_WORKER)
-
-AsyncFrameScrollingEnabled:
-  type: bool
-  defaultValue: defaultAsyncFrameScrollingEnabled()
-  humanReadableName: "Async Frame Scrolling"
-  humanReadableDescription: "Perform frame scrolling off the main thread"
-
-AsyncOverflowScrollingEnabled:
-  type: bool
-  defaultValue: defaultAsyncOverflowScrollingEnabled()
-  humanReadableName: "Async Overflow Scrolling"
-  humanReadableDescription: "Perform overflow scrolling off the main thread"
-
-LegacyOverflowScrollingTouchEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Legacy -webkit-overflow-scrolling property"
-  humanReadableDescription: "Support the legacy -webkit-overflow-scrolling CSS property"
-  condition: ENABLE(OVERFLOW_SCROLLING_TOUCH)
-
-FullScreenEnabled:
-  type: bool
-  defaultValue: false
-  condition: ENABLE(FULLSCREEN_API)
-  hidden: EXPERIMENTAL_FULLSCREEN_API_HIDDEN
-  humanReadableName: "Fullscreen API"
-  humanReadableDescription: "Fullscreen API"
-
-AriaReflectionEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "ARIA Reflection"
-  humanReadableDescription: "ARIA Reflection support"
-  webcoreBinding: RuntimeEnabledFeatures
-
-WebAPIStatisticsEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Web API Statistics"
-  humanReadableDescription: "Enable Web API Statistics"
-  webcoreBinding: RuntimeEnabledFeatures
-
-SecureContextChecksEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Secure Context Checks"
-  humanReadableDescription: "Allow access to HTTPS-only Web APIs over HTTP"
-  webcoreBinding: RuntimeEnabledFeatures
-
-SelectionAcrossShadowBoundariesEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Selection across shadow DOM"
-  humanReadableDescription: "Allow user-initiated selection across shadow DOM boundaries"
-  webcoreName: selectionAcrossShadowBoundariesEnabled
-
-FasterClicksEnabled:
-  type: bool
-  defaultValue: true
-  condition: PLATFORM(IOS_FAMILY)
-  humanReadableName: "Fast clicks"
-  humanReadableDescription: "Support faster clicks on zoomable pages"
-  webcoreBinding: none
-
-PreferFasterClickOverDoubleTap:
-  type: bool
-  defaultValue: DEFAULT_PREFER_FASTER_CLICK_OVER_DOUBLE_TAP
-  condition: PLATFORM(IOS_FAMILY)
-  humanReadableName: "Fast clicks beat DTTZ"
-  humanReadableDescription: "Prefer a faster click over a double tap"
-  webcoreBinding: none
-
-ZoomOnDoubleTapWhenRoot:
-  type: bool
-  defaultValue: false
-  condition: PLATFORM(IOS_FAMILY)
-  humanReadableName: "DTTZ also when root"
-  humanReadableDescription: "Double taps zoom, even if we dispatched a click on the root nodes"
-  webcoreBinding: none
-
-AlwaysZoomOnDoubleTap:
-  type: bool
-  defaultValue: false
-  condition: PLATFORM(IOS_FAMILY)
-  humanReadableName: "DTTZ always"
-  humanReadableDescription: "Double taps zoom, even if we dispatched a click anywhere"
-  webcoreBinding: none
-
-InputTypeColorEnabled:
-  type: bool
-  defaultValue: DEFAULT_INPUT_TYPE_COLOR_ENABLED
-  humanReadableName: "Color Inputs"
-  humanReadableDescription: "Enable input elements of type color"
-  condition: ENABLE(INPUT_TYPE_COLOR)
-
-InputTypeDateEnabled:
-  type: bool
-  defaultValue: DEFAULT_INPUT_TYPE_DATE_ENABLED
-  humanReadableName: "Date Input"
-  humanReadableDescription: "Enable input elements of type date"
-  condition: ENABLE(INPUT_TYPE_DATE)
-
-InputTypeDateTimeLocalEnabled:
-  type: bool
-  defaultValue: DEFAULT_INPUT_TYPE_DATETIMELOCAL_ENABLED
-  humanReadableName: "datetime-local Inputs"
-  humanReadableDescription: "Enable input elements of type datetime-local"
-  condition: ENABLE(INPUT_TYPE_DATETIMELOCAL)
-
-InputTypeMonthEnabled:
-  type: bool
-  defaultValue: DEFAULT_INPUT_TYPE_MONTH_ENABLED
-  humanReadableName: "Month Input"
-  humanReadableDescription: "Enable input elements of type month"
-  condition: ENABLE(INPUT_TYPE_MONTH)
-
-InputTypeTimeEnabled:
-  type: bool
-  defaultValue: DEFAULT_INPUT_TYPE_TIME_ENABLED
-  humanReadableName: "Time Input"
-  humanReadableDescription: "Enable input elements of type time"
-  condition: ENABLE(INPUT_TYPE_TIME)
-
-InputTypeWeekEnabled:
-  type: bool
-  defaultValue: DEFAULT_INPUT_TYPE_WEEK_ENABLED
-  humanReadableName: "Week Input"
-  humanReadableDescription: "Enable input elements of type week"
-  condition: ENABLE(INPUT_TYPE_WEEK)
-
-DateTimeInputsEditableComponentsEnabled:
-  type: bool
-  defaultValue: DEFAULT_DATE_TIME_INPUTS_EDITABLE_COMPONENTS_ENABLED
-  humanReadableName: "Date/Time inputs have editable components"
-  humanReadableDescription: "Enable multiple editable components in date/time inputs"
-  webcoreName: dateTimeInputsEditableComponentsEnabled
-  condition: ENABLE(DATE_AND_TIME_INPUT_TYPES)
-
-DataListElementEnabled:
-  type: bool
-  defaultValue: DEFAULT_DATALIST_ELEMENT_ENABLED
-  humanReadableName: "DataList Element"
-  humanReadableDescription: "Enable datalist elements"
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(DATALIST_ELEMENT)
-
-LayoutFormattingContextEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Full next-generation layout (LFC)"
-  humanReadableDescription: "Enable full next-generation layout (LFC)"
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(LAYOUT_FORMATTING_CONTEXT)
-
-LayoutFormattingContextIntegrationEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Next-generation line layout integration (LFC)"
-  humanReadableDescription: "Enable next-generation line layout integration (LFC)"
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(LAYOUT_FORMATTING_CONTEXT)
-
-RestrictedHTTPResponseAccess:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Filter HTTP Response for Web Processes"
-  humanReadableDescription: "Enable HTTP Response filtering for Web Processes"
-  webcoreBinding: RuntimeEnabledFeatures
-
-UndoManagerAPIEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "UndoManager DOM API"
-  humanReadableDescription: "Enable the UndoManager DOM API"
-
-CSSLogicalEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "CSS Logical Properties and Values"
-  humanReadableDescription: "Enable CSS Logical Properties and Values"
-  webcoreBinding: RuntimeEnabledFeatures
-
-LineHeightUnitsEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "lh / rlh units"
-  humanReadableDescription: "Enable the lh and lhr units"
-  webcoreBinding: RuntimeEnabledFeatures
-
-DOMPasteAccessRequestsEnabled:
-  type: bool
-  defaultValue: DEFAULT_DOM_PASTE_ACCESS_REQUESTS_ENABLED
-  humanReadableName: "DOM Paste Access Requests"
-  humanReadableDescription: "Enable DOM Paste Access Requests"
-
-MouseEventsSimulationEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Mouse events simulation"
-  humanReadableDescription: "Enable mouse events dispatch along with touch events on iOS"
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(TOUCH_EVENTS)
-
-TextAutosizingUsesIdempotentMode:
-  type: bool
-  defaultValue: defaultTextAutosizingUsesIdempotentMode()
-  humanReadableName: "Idempotent Text Autosizing"
-  humanReadableDescription: "Use idempotent text autosizing mode"
-  condition: ENABLE(TEXT_AUTOSIZING)
-
-AllowViewportShrinkToFitContent:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Allow Viewport Shrink to Fit Content"
-  humanReadableDescription: "Allow the viewport shrink to fit content heuristic when appropriate"
-  condition: PLATFORM(IOS_FAMILY)
-
-EnterKeyHintEnabled:
-  type: bool
-  defaultValue: DEFAULT_ENTER_KEY_HINT_ENABLED
-  humanReadableName: "Enter Key Hint"
-  humanReadableDescription: "Enable the enterKeyHint HTML attribute"
-
-ApplePayRemoteUIEnabled:
-  condition: ENABLE(APPLE_PAY_REMOTE_UI)
-  defaultValue: true
-  humanReadableDescription: "Enable Apple Pay Remote UI"
-  humanReadableName: "Apple Pay Remote UI"
-  type: bool
-
-IsFirstPartyWebsiteDataRemovalLiveOnTestingEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "[ITP Live-On] 1 Hour Timeout For Non-Cookie Data Removal"
-  humanReadableDescription: "Remove all non-cookie website data after just one hour of no user interaction when Intelligent Tracking Prevention is enabled"
-
-IsFirstPartyWebsiteDataRemovalReproTestingEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "[ITP Repro] 30 Second Timeout For Non-Cookie Data Removal"
-  humanReadableDescription: "Remove all non-cookie website data after just 30 seconds of no user interaction when Intelligent Tracking Prevention is enabled"
-
-UseGPUProcessForCanvasRenderingEnabled:
-  type: bool
-  defaultValue: defaultUseGPUProcessForCanvasRenderingEnabled()
-  condition: ENABLE(GPU_PROCESS)
-  humanReadableName: "GPU Process: Canvas Rendering"
-  humanReadableDescription: "Enable canvas rendering in GPU Process"
-  webcoreBinding: none
-
-UseGPUProcessForDOMRenderingEnabled:
-  type: bool
-  defaultValue: defaultUseGPUProcessForDOMRenderingEnabled()
-  condition: ENABLE(GPU_PROCESS)
-  humanReadableName: "GPU Process: DOM Rendering"
-  humanReadableDescription: "Enable DOM rendering in GPU Process"
-  webcoreBinding: none
-
-UseGPUProcessForMediaEnabled:
-  type: bool
-  defaultValue: defaultUseGPUProcessForMediaEnabled()
-  condition: ENABLE(GPU_PROCESS)
-  humanReadableName: "GPU Process: Media"
-  humanReadableDescription: "Do all media loading and playback in the GPU Process"
-  webcoreName: useGPUProcessForMediaEnabled
-
-UseGPUProcessForWebGLEnabled:
-  type: bool
-  defaultValue: defaultUseGPUProcessForWebGLEnabled()
-  condition: ENABLE(GPU_PROCESS)
-  humanReadableName: "GPU Process: WebGL"
-  humanReadableDescription: "Enable WebGL in GPU Process"
-  webcoreBinding: none
-
-LiveRangeSelectionEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Live Ranges in Selection"
-  humanReadableDescription: "Live range behavior for ranges in the Selection object"
-
-ICECandidateFilteringEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "Enable ICE Candidate Filtering"
-  humanReadableDescription: "Enable ICE Candidate Filtering"
-
-MockCaptureDevicesEnabled:
-  type: bool
-  defaultValue: DEFAULT_MOCK_CAPTURE_DEVICES_ENABLED
-  condition: ENABLE(MEDIA_STREAM)
-  humanReadableName: "Enable Mock Capture Devices"
-  humanReadableDescription: "Enable Mock Capture Devices"
-
-MediaCaptureRequiresSecureConnection:
-  type: bool
-  defaultValue: true
-  condition: ENABLE(MEDIA_STREAM)
-  humanReadableName: "Limit Media Capture to Secure Sites"
-  humanReadableDescription: "Limit Media Capture to Secure Sites"
index cb3caee4e0feba0209d621dc141bad54e0268e6f..936d2a6336b9096f06320a809e2884e981d274a0 100644 (file)
@@ -38,6 +38,7 @@
 #import "WKWebViewContentProviderRegistry.h"
 #import "WebKit2Initialize.h"
 #import "WebPreferencesDefaultValues.h"
+#import "WebPreferencesDefinitions.h"
 #import "WebURLSchemeHandlerCocoa.h"
 #import "_WKApplicationManifestInternal.h"
 #import "_WKVisitedLinkStore.h"
@@ -267,7 +268,7 @@ static bool defaultShouldDecidePolicyBeforeLoadingQuickLookPreview()
     _undoManagerAPIEnabled = NO;
 
 #if ENABLE(APPLE_PAY)
-    _applePayEnabled = DEFAULT_APPLE_PAY_ENABLED;
+    _applePayEnabled = DEFAULT_VALUE_FOR_ApplePayEnabled;
 #endif
 
     return self;
index ae73fbb93044b01c562354b26b59148d8790f3c5..247c0353d8cc710fa084f9db7b06478834e99e32 100644 (file)
                7C2413041AACFA9C00A58C15 /* _WKUserContentExtensionStoreInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKUserContentExtensionStoreInternal.h; sourceTree = "<group>"; };
                7C2413061AACFCB400A58C15 /* WKUserContentExtensionStoreRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKUserContentExtensionStoreRef.cpp; sourceTree = "<group>"; };
                7C2413071AACFCB400A58C15 /* WKUserContentExtensionStoreRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKUserContentExtensionStoreRef.h; sourceTree = "<group>"; };
-               7C2E0BE12512C5CB005F3C87 /* WebPreferencesInternal.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; path = WebPreferencesInternal.yaml; sourceTree = "<group>"; };
-               7C2E0BE32512C846005F3C87 /* WebPreferencesExperimental.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; path = WebPreferencesExperimental.yaml; sourceTree = "<group>"; };
-               7C2E0BE52512CAFE005F3C87 /* WebPreferencesDebug.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; path = WebPreferencesDebug.yaml; sourceTree = "<group>"; };
                7C361D6F1927FA360036A59D /* WebScriptMessageHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebScriptMessageHandler.cpp; sourceTree = "<group>"; };
                7C361D701927FA360036A59D /* WebScriptMessageHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebScriptMessageHandler.h; sourceTree = "<group>"; };
                7C361D751928028B0036A59D /* WebUserContentControllerProxy.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebUserContentControllerProxy.messages.in; sourceTree = "<group>"; };
                7CD5EBBD1746B04C000C1C45 /* WKTypeRefWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKTypeRefWrapper.h; sourceTree = "<group>"; };
                7CD622751739D863005BD7FF /* PluginSandboxProfile.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginSandboxProfile.mm; sourceTree = "<group>"; };
                7CD622761739D863005BD7FF /* PluginSandboxProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginSandboxProfile.h; sourceTree = "<group>"; };
-               7CDE739F1F9DA37A00390312 /* WebPreferences.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebPreferences.yaml; sourceTree = "<group>"; };
                7CDE73A01F9DA37B00390312 /* WebPreferencesDefaultValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPreferencesDefaultValues.h; sourceTree = "<group>"; };
-               7CDE73A11F9DA41400390312 /* GeneratePreferences.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = GeneratePreferences.rb; sourceTree = "<group>"; };
                7CDE73A21F9DA59700390312 /* PreferencesTemplates */ = {isa = PBXFileReference; lastKnownFileType = folder; path = PreferencesTemplates; sourceTree = "<group>"; };
                7CDE73A31F9DAB6500390312 /* WebPreferencesDefinitions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WebPreferencesDefinitions.h; path = DerivedSources/WebKit2/WebPreferencesDefinitions.h; sourceTree = BUILT_PRODUCTS_DIR; };
                7CE4D2061A46775700C7F152 /* APILegacyContextHistoryClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APILegacyContextHistoryClient.h; sourceTree = "<group>"; };
                                C0337DDC127A521C008FF4F4 /* WebPlatformTouchPoint.cpp */,
                                BC5744ED12638FB3006F0F12 /* WebPopupItem.cpp */,
                                BC5744EE12638FB3006F0F12 /* WebPopupItem.h */,
-                               7CDE739F1F9DA37A00390312 /* WebPreferences.yaml */,
-                               7C2E0BE52512CAFE005F3C87 /* WebPreferencesDebug.yaml */,
                                3110ED6220127CB300350B20 /* WebPreferencesDefaultValues.cpp */,
                                7CDE73A01F9DA37B00390312 /* WebPreferencesDefaultValues.h */,
-                               7C2E0BE32512C846005F3C87 /* WebPreferencesExperimental.yaml */,
-                               7C2E0BE12512C5CB005F3C87 /* WebPreferencesInternal.yaml */,
                                BCD598AB112B7FDF00EC8C23 /* WebPreferencesStore.cpp */,
                                BCD598AA112B7FDF00EC8C23 /* WebPreferencesStore.h */,
                                BC306823125A6B9400E71278 /* WebProcessCreationParameters.cpp */,
                                0FC0856E187CE0A900780D86 /* __init__.py */,
                                4157853021276B6F00DD3800 /* copy-webcontent-resources-to-private-headers.sh */,
                                C0CE73361247F70E00BC0EC4 /* generate-message-receiver.py */,
-                               7CDE73A11F9DA41400390312 /* GeneratePreferences.rb */,
                                0FC0856F187CE0A900780D86 /* messages.py */,
                                0FC08570187CE0A900780D86 /* model.py */,
                                0FC08571187CE0A900780D86 /* parser.py */,
index 94135ca584841df67c3c5afff6de00f717246e68..17dadfe501d0e2f5454d4a8fed62fac6d901f83b 100644 (file)
@@ -1,3 +1,13 @@
+2020-09-29  Sam Weinig  <weinig@apple.com>
+
+        [Preferences] Adopt shared preferences configuration and script in WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=217075
+
+        Reviewed by Darin Adler.
+
+        * Scripts/generate-preferences.sh:
+        Update to account for new interface requiring the full path to each template.
+
 2020-09-29  Alex Christensen  <achristensen@webkit.org>
 
         Unreviewed, reverting r267397.
index 3b24159caa6bf4a6893ae62cd1f372aadc32f182..fd36ed086801b236b4f57789482e95ed1c534204 100755 (executable)
@@ -29,5 +29,13 @@ set -e
 ARGS=("$@")
 
 PREFERENCES_DIR=${WTF_BUILD_SCRIPTS_DIR}/Preferences
+TEMPLATES_DIR=${SRCROOT}/mac/Scripts/PreferencesTemplates
 
-/usr/bin/env ruby ${WTF_BUILD_SCRIPTS_DIR}/GeneratePreferences.rb --frontend WebKitLegacy --template WebPreferencesDefinitions.h --template WebPreferencesExperimentalFeatures.mm --template WebPreferencesInternalFeatures.mm --template WebViewPreferencesChangedGenerated.mm --templateDir=${SRCROOT}/mac/Scripts/PreferencesTemplates --outputDir ${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/ --base ${PREFERENCES_DIR}/WebPreferences.yaml --debug ${PREFERENCES_DIR}/WebPreferencesDebug.yaml --experimental ${PREFERENCES_DIR}/WebPreferencesExperimental.yaml --internal ${PREFERENCES_DIR}/WebPreferencesInternal.yaml
+TEMPLATES=(
+    WebPreferencesDefinitions.h.erb
+    WebPreferencesExperimentalFeatures.mm.erb
+    WebPreferencesInternalFeatures.mm.erb
+    WebViewPreferencesChangedGenerated.mm.erb
+)
+
+/usr/bin/env ruby ${WTF_BUILD_SCRIPTS_DIR}/GeneratePreferences.rb --frontend WebKitLegacy ${TEMPLATES[@]/#/--template ${TEMPLATES_DIR}/} --outputDir ${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/ --base ${PREFERENCES_DIR}/WebPreferences.yaml --debug ${PREFERENCES_DIR}/WebPreferencesDebug.yaml --experimental ${PREFERENCES_DIR}/WebPreferencesExperimental.yaml --internal ${PREFERENCES_DIR}/WebPreferencesInternal.yaml