[Settings] Add initial support for generating preferences related code
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Oct 2017 18:43:31 +0000 (18:43 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Oct 2017 18:43:31 +0000 (18:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=178656

Patch by Sam Weinig <sam@webkit.org> on 2017-10-24
Reviewed by Dean Jackson.

As a first step towards getting off the macros in WebPreferencesDefinitions.h
and reducing the overhead of adding a preference, this change generates adds
WebPreferences.yaml where preference changes will go, and generates much of
WebPreferencesDefinitions.h from it (all the custom defaults moved to
WebPreferencesDefinitionsBase.h). Subsequent changes will remove the need for
the macros in WebPreferencesDefinitions.h entirely.

* CMakeLists.txt:
* DerivedSources.make:
* WebKit.xcodeproj/project.pbxproj:

    Add new files / rules to generate WebPreferencesDefinitions.h.

* Scripts/GeneratePreferences.rb: Added.
* Scripts/PreferencesTemplates: Added.
* Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb: Added.

    Add scripts and template to generate WebPreferencesDefinitions.h from
    WebPreferences.yaml.

* Shared/WebPreferences.yaml: Added.

    Configuration file for preferences.

* Shared/WebPreferencesDefinitions.h: Removed.
* Shared/WebPreferencesDefinitionsBase.h: Copied from Source/WebKit/Shared/WebPreferencesDefinitions.h.

    Moved custom defaults to new WebPreferencesDefinitionsBase.h. Removed the need for
    FOR_EACH_WEBKIT_STRING_PREFERENCE by using custom defaults for the font family values.

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

Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/DerivedSources.make
Source/WebKit/Scripts/GeneratePreferences.rb [new file with mode: 0755]
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb [new file with mode: 0644]
Source/WebKit/Shared/WebPreferences.yaml [new file with mode: 0644]
Source/WebKit/Shared/WebPreferencesDefinitions.h [deleted file]
Source/WebKit/Shared/WebPreferencesDefinitionsBase.h [new file with mode: 0644]
Source/WebKit/WebKit.xcodeproj/project.pbxproj

index 510629e..3360c4c 100644 (file)
@@ -902,6 +902,21 @@ list(APPEND WebKit_HEADERS
     ${DERIVED_SOURCES_WEBKIT_DIR}/WebAutomationSessionProxyScriptSource.h
 )
 
+set(WebKit_WEB_PREFERENCES_TEMPLATES
+    ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb
+)
+
+add_custom_command(
+    OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesDefinitions.h
+    MAIN_DEPENDENCY ${WEBKIT_DIR}/Shared/WebPreferences.yaml
+    DEPENDS ${WebKit_WEB_PREFERENCES_TEMPLATES}
+    COMMAND ${RUBY_EXECUTABLE} ${WEBKIT_DIR}/Scripts/GeneratePreferences.rb --input ${WEBKIT_DIR}/Shared/WebPreferences.yaml --outputDir "${DERIVED_SOURCES_WEBKIT_DIR}"
+    VERBATIM)
+
+list(APPEND WebKit_HEADERS
+    ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesDefinitions.h
+)
+
 list(APPEND WebKit_SOURCES ${WebKit_DERIVED_SOURCES})
 
 WEBKIT_FRAMEWORK(WebKit)
index 3a90d9b..5e7b5a3 100644 (file)
@@ -1,3 +1,40 @@
+2017-10-24  Sam Weinig  <sam@webkit.org>
+
+        [Settings] Add initial support for generating preferences related code
+        https://bugs.webkit.org/show_bug.cgi?id=178656
+
+        Reviewed by Dean Jackson.
+
+        As a first step towards getting off the macros in WebPreferencesDefinitions.h
+        and reducing the overhead of adding a preference, this change generates adds
+        WebPreferences.yaml where preference changes will go, and generates much of
+        WebPreferencesDefinitions.h from it (all the custom defaults moved to 
+        WebPreferencesDefinitionsBase.h). Subsequent changes will remove the need for 
+        the macros in WebPreferencesDefinitions.h entirely.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * WebKit.xcodeproj/project.pbxproj:
+        
+            Add new files / rules to generate WebPreferencesDefinitions.h.
+        
+        * Scripts/GeneratePreferences.rb: Added.
+        * Scripts/PreferencesTemplates: Added.
+        * Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb: Added.
+        
+            Add scripts and template to generate WebPreferencesDefinitions.h from
+            WebPreferences.yaml.
+
+        * Shared/WebPreferences.yaml: Added.
+        
+            Configuration file for preferences.
+        
+        * Shared/WebPreferencesDefinitions.h: Removed.
+        * Shared/WebPreferencesDefinitionsBase.h: Copied from Source/WebKit/Shared/WebPreferencesDefinitions.h.
+        
+            Moved custom defaults to new WebPreferencesDefinitionsBase.h. Removed the need for 
+            FOR_EACH_WEBKIT_STRING_PREFERENCE by using custom defaults for the font family values.
+
 2017-10-24  Matt Lewis  <jlewis3@apple.com>
 
         Unreviewed, rolling out r223889.
index 872b9ba..6681476 100644 (file)
@@ -284,3 +284,15 @@ all : $(firstword $(AUTOMATION_PROTOCOL_OUTPUT_FILES))
        $(DELETE) $(basename $(notdir $<)).min.js
 
 all : WebAutomationSessionProxyScriptSource.h
+
+# WebPreferences generation
+
+WEB_PREFERENCES_TEMPLATES = \
+    $(WebKit2)/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb \
+#
+
+all : WebPreferencesDefinitions.h
+
+WebPreferencesDefinitions%h : $(WebKit2)/Scripts/GeneratePreferences.rb $(WEB_PREFERENCES_TEMPLATES) $(WebKit2)/Shared/WebPreferences.yaml
+       $(RUBY) $< --input $(WebKit2)/Shared/WebPreferences.yaml
+
diff --git a/Source/WebKit/Scripts/GeneratePreferences.rb b/Source/WebKit/Scripts/GeneratePreferences.rb
new file mode 100755 (executable)
index 0000000..39dddef
--- /dev/null
@@ -0,0 +1,140 @@
+#!/usr/bin/env ruby
+#
+# Copyright (c) 2017 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 = { 
+  :input => nil,
+  :outputDirectory => nil
+}
+optparse = OptionParser.new do |opts|
+    opts.banner = "Usage: #{File.basename($0)} --input file"
+
+    opts.separator ""
+
+    opts.on("--input input", "file to generate settings from") { |input| options[:input] = input }
+    opts.on("--outputDir output", "directory to generate file in") { |output| options[:outputDirectory] = output }
+end
+
+optparse.parse!
+
+if !options[:input]
+  puts optparse
+  exit -1
+end
+
+if !options[:outputDirectory]
+  options[:outputDirectory] = Dir.getwd
+end
+
+FileUtils.mkdir_p(options[:outputDirectory])
+
+parsedPreferences = begin
+  YAML.load_file(options[:input])
+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 :webkitOnly
+  attr_accessor :category
+
+  def initialize(name, opts)
+    @name = name
+    @type = opts["type"]
+    @defaultValue = opts["defaultValue"]
+    @humanReadableName = '"' + (opts["humanReadableName"] || "") + '"'
+    @humanReadableDescription = '"' + (opts["humanReadableDescription"] || "") + '"'
+    @webkitOnly = opts["webkitOnly"]
+    @category = opts["category"]
+    @getter = opts["getter"]
+  end
+
+  def nameLower
+    if @getter
+      @getter
+    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
+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(hash)
+    @preferences = []
+    hash.each do |name, options|
+      @preferences << Preference.new(name, options)
+    end
+    @preferences.sort! { |x, y| x.name <=> y.name }
+    
+    @boolPreferencesNotDebug = @preferences.select { |p| !p.category && !p.webkitOnly && p.type == "bool" }
+    @doublePreferencesNotDebug = @preferences.select { |p| !p.category && !p.webkitOnly && p.type == "double" }
+    @intPreferencesNotDebug = @preferences.select { |p| !p.category && !p.webkitOnly && p.type == "uint32_t" }
+    @stringPreferencesNotDebug = @preferences.select { |p| !p.category && !p.webkitOnly && p.type == "String" }
+    @stringPreferencesNotDebugNotInWebKit = @preferences.select { |p| !p.category && p.webkitOnly && p.type == "String" }
+
+    @boolPreferencesDebug = @preferences.select { |p| p.category == "debug" && !p.webkitOnly && p.type == "bool" }
+    @intPreferencesDebug = @preferences.select { |p| p.category == "debug" && !p.webkitOnly && p.type == "uint32_t" }
+
+    @experimentalFeature = @preferences.select { |p| p.category == "experimental" && !p.webkitOnly }
+  end
+
+  def renderToFile(template, file)
+    template = File.join(File.dirname(__FILE__), template)
+
+    output = ERB.new(File.read(template), 0, "-").result(binding)
+    File.open(file, "w+") do |f|
+      f.write(output)
+    end
+  end
+end
+
+preferences = Preferences.new(parsedPreferences)
+preferences.renderToFile("PreferencesTemplates/WebPreferencesDefinitions.h.erb", File.join(options[:outputDirectory], "WebPreferencesDefinitions.h"))
diff --git a/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb b/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb
new file mode 100644 (file)
index 0000000..a5143de
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT.
+ *
+ * Copyright (C) 2017 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.
+ */
+
+#pragma once
+
+#include "WebPreferencesDefinitionsBase.h"
+
+// macro(KeyUpper, KeyLower, TypeNameUpper, TypeName, DefaultValue, HumanReadableName, HumanReadableDescription)
+
+#define FOR_EACH_WEBKIT_BOOL_PREFERENCE(macro) \
+<%- for @pref in @boolPreferencesNotDebug do -%>
+    macro(<%= @pref.name %>, <%= @pref.nameLower %>, Bool, bool, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
+<%- end -%>
+    \
+
+#define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
+<%- for @pref in @doublePreferencesNotDebug do -%>
+    macro(<%= @pref.name %>, <%= @pref.nameLower %>, Double, double, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
+<%- end -%>
+    \
+
+#define FOR_EACH_WEBKIT_UINT32_PREFERENCE(macro) \
+<%- for @pref in @intPreferencesNotDebug do -%>
+    macro(<%= @pref.name %>, <%= @pref.nameLower %>, UInt32, uint32_t, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
+<%- end -%>
+    \
+
+#define FOR_EACH_WEBKIT_STRING_PREFERENCE(macro) \
+<%- for @pref in @stringPreferencesNotDebug do -%>
+    macro(<%= @pref.name %>, <%= @pref.nameLower %>, String, String, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
+<%- end -%>
+    \
+
+#define FOR_EACH_WEBKIT_STRING_PREFERENCE_NOT_IN_WEBCORE(macro) \
+<%- for @pref in @stringPreferencesNotDebugNotInWebKit do -%>
+    macro(<%= @pref.name %>, <%= @pref.nameLower %>, String, String, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
+<%- end -%>
+    \
+
+
+// Debug Preferences
+
+#define FOR_EACH_WEBKIT_DEBUG_BOOL_PREFERENCE(macro) \
+<%- for @pref in @boolPreferencesDebug do -%>
+    macro(<%= @pref.name %>, <%= @pref.nameLower %>, Bool, bool, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
+<%- end -%>
+    \
+
+#define FOR_EACH_WEBKIT_DEBUG_UINT32_PREFERENCE(macro) \
+<%- for @pref in @intPreferencesDebug do -%>
+    macro(<%= @pref.name %>, <%= @pref.nameLower %>, UInt32, uint32_t, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
+<%- end -%>
+    \
+
+
+// Experimental Features
+
+#define FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(macro) \
+<%- for @pref in @experimentalFeature do -%>
+    macro(<%= @pref.name %>, <%= @pref.nameLower %>, Bool, bool, <%= @pref.defaultValue %>, <%= @pref.humanReadableName %>, <%= @pref.humanReadableDescription %>) \
+<%- end -%>
+    \
+
+
+
+#define FOR_EACH_WEBKIT_DEBUG_PREFERENCE(macro) \
+    FOR_EACH_WEBKIT_DEBUG_BOOL_PREFERENCE(macro) \
+    FOR_EACH_WEBKIT_DEBUG_UINT32_PREFERENCE(macro) \
+    \
+
+#define FOR_EACH_WEBKIT_PREFERENCE(macro) \
+    FOR_EACH_WEBKIT_BOOL_PREFERENCE(macro) \
+    FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
+    FOR_EACH_WEBKIT_UINT32_PREFERENCE(macro) \
+    FOR_EACH_WEBKIT_STRING_PREFERENCE(macro) \
+    FOR_EACH_WEBKIT_STRING_PREFERENCE_NOT_IN_WEBCORE(macro) \
+    \
+
diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml
new file mode 100644 (file)
index 0000000..9e544b0
--- /dev/null
@@ -0,0 +1,1007 @@
+
+JavaScriptEnabled:
+  type: bool
+  defaultValue: true
+
+JavaScriptMarkupEnabled:
+  type: bool
+  defaultValue: true
+
+LoadsImagesAutomatically:
+  type: bool
+  defaultValue: true
+
+LoadsSiteIconsIgnoringImageLoadingPreference:
+  type: bool
+  defaultValue: false
+
+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
+
+XSSAuditorEnabled:
+  type: bool
+  defaultValue: true
+
+PrivateBrowsingEnabled:
+  type: bool
+  defaultValue: false
+
+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: false
+
+AcceleratedCompositingEnabled:
+  type: bool
+  defaultValue: true
+
+ForceCompositingMode:
+  type: bool
+  defaultValue: false
+
+CanvasUsesAcceleratedDrawing:
+  type: bool
+  defaultValue: DEFAULT_CANVAS_USES_ACCELERATED_DRAWING
+
+WebGLEnabled:
+  type: bool
+  defaultValue: true
+
+ForceSoftwareWebGLRendering:
+  type: bool
+  defaultValue: false
+
+Accelerated2dCanvasEnabled:
+  type: bool
+  defaultValue: false
+
+CSSAnimationTriggersEnabled:
+  type: bool
+  defaultValue: true
+
+ForceFTPDirectoryListings:
+  type: bool
+  defaultValue: false
+
+TabsToLinks:
+  type: bool
+  defaultValue: DEFAULT_WEBKIT_TABSTOLINKS_ENABLED
+
+DNSPrefetchingEnabled:
+  type: bool
+  defaultValue: false
+
+DOMTimersThrottlingEnabled:
+  type: bool
+  defaultValue: true
+
+WebArchiveDebugModeEnabled:
+  type: bool
+  defaultValue: false
+
+LocalFileContentSniffingEnabled:
+  type: bool
+  defaultValue: false
+
+UsesPageCache:
+  type: bool
+  defaultValue: true
+
+PageCacheSupportsPlugins:
+  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
+
+FullScreenEnabled:
+  type: bool
+  defaultValue: false
+
+AsynchronousSpellCheckingEnabled:
+  type: bool
+  defaultValue: false
+
+WebSecurityEnabled:
+  type: bool
+  defaultValue: true
+
+AllowUniversalAccessFromFileURLs:
+  type: bool
+  defaultValue: false
+
+AllowFileAccessFromFileURLs:
+  type: bool
+  defaultValue: false
+
+AVFoundationEnabled:
+  type: bool
+  defaultValue: true
+  getter: isAVFoundationEnabled
+
+AVFoundationNSURLSessionEnabled:
+  type: bool
+  defaultValue: true
+  getter: isAVFoundationNSURLSessionEnabled
+
+GStreamerEnabled:
+  type: bool
+  defaultValue: true
+  getter: isGStreamerEnabled
+
+RequiresUserGestureForMediaPlayback:
+  type: bool
+  defaultValue: false
+
+RequiresUserGestureForVideoPlayback:
+  type: bool
+  defaultValue: false
+
+RequiresUserGestureForAudioPlayback:
+  type: bool
+  defaultValue: DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK
+
+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
+
+MediaControlsScaleWithPageZoom:
+  type: bool
+  defaultValue: DEFAULT_MEDIA_CONTROLS_SCALE_WITH_PAGE_ZOOM
+
+InspectorStartsAttached:
+  type: bool
+  defaultValue: true
+
+ShowsToolTipOverTruncatedText:
+  type: bool
+  defaultValue: false
+
+MockScrollbarsEnabled:
+  type: bool
+  defaultValue: false
+
+WebAudioEnabled:
+  type: bool
+  defaultValue: true
+
+AttachmentElementEnabled:
+  type: bool
+  defaultValue: false
+
+SuppressesIncrementalRendering:
+  type: bool
+  defaultValue: false
+
+BackspaceKeyNavigationEnabled:
+  type: bool
+  defaultValue: DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED
+
+CaretBrowsingEnabled:
+  type: bool
+  defaultValue: false
+
+ShouldDisplaySubtitles:
+  type: bool
+  defaultValue: false
+
+ShouldDisplayCaptions:
+  type: bool
+  defaultValue: false
+
+ShouldDisplayTextDescriptions:
+  type: bool
+  defaultValue: false
+
+NotificationsEnabled:
+  type: bool
+  defaultValue: true
+
+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
+
+AsynchronousPluginInitializationEnabledForAllPlugins:
+  type: bool
+  defaultValue: false
+
+ArtificialPluginInitializationDelayEnabled:
+  type: bool
+  defaultValue: false
+
+TabToLinksEnabled:
+  type: bool
+  defaultValue: false
+
+ScrollingPerformanceLoggingEnabled:
+  type: bool
+  defaultValue: false
+
+ScrollAnimatorEnabled:
+  type: bool
+  defaultValue: DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED
+
+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
+
+UsesEncodingDetector:
+  type: bool
+  defaultValue: false
+
+TextAutosizingEnabled:
+  type: bool
+  defaultValue: WebCore::Settings::defaultTextAutosizingEnabled()
+
+AggressiveTileRetentionEnabled:
+  type: bool
+  defaultValue: false
+
+TemporaryTileCohortRetentionEnabled:
+  type: bool
+  defaultValue: DEFAULT_TEMPORARY_TILE_COHORT_RETENTION_ENABLED
+
+QTKitEnabled:
+  type: bool
+  defaultValue: WebCore::DeprecatedGlobalSettings::isQTKitEnabled()
+  getter: isQTKitEnabled
+
+PageVisibilityBasedProcessSuppressionEnabled:
+  type: bool
+  defaultValue: true
+
+SmartInsertDeleteEnabled:
+  type: bool
+  defaultValue: true
+
+SelectTrailingWhitespaceEnabled:
+  type: bool
+  defaultValue: false
+
+ShowsURLsInToolTipsEnabled:
+  type: bool
+  defaultValue: false
+
+AcceleratedCompositingForOverflowScrollEnabled:
+  type: bool
+  defaultValue: false
+
+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: false
+
+ThreadedScrollingEnabled:
+  type: bool
+  defaultValue: true
+
+SimpleLineLayoutEnabled:
+  type: bool
+  defaultValue: true
+
+SubpixelCSSOMElementMetricsEnabled:
+  type: bool
+  defaultValue: false
+
+UseGiantTiles:
+  type: bool
+  defaultValue: false
+
+MediaDevicesEnabled:
+  type: bool
+  defaultValue: false
+
+MediaStreamEnabled:
+  type: bool
+  defaultValue: true
+
+PeerConnectionEnabled:
+  type: bool
+  defaultValue: WebCore::LibWebRTCProvider::webRTCAvailable()
+
+UseLegacyTextAlignPositionedElementBehavior:
+  type: bool
+  defaultValue: false
+
+SpatialNavigationEnabled:
+  type: bool
+  defaultValue: false
+
+MediaSourceEnabled:
+  type: bool
+  defaultValue: true
+
+ViewGestureDebuggingEnabled:
+  type: bool
+  defaultValue: false
+
+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
+
+EnableInheritURIQueryComponent:
+  type: bool
+  defaultValue: false
+
+ServiceControlsEnabled:
+  type: bool
+  defaultValue: false
+
+DeferredCSSParserEnabled:
+  type: bool
+  defaultValue: false
+
+HTTPEquivEnabled:
+  type: bool
+  defaultValue: true
+
+MockCaptureDevicesEnabled:
+  type: bool
+  defaultValue: false
+
+MockCaptureDevicesPromptEnabled:
+  type: bool
+  defaultValue: true
+
+MediaCaptureRequiresSecureConnection:
+  type: bool
+  defaultValue: true
+
+EnumeratingAllNetworkInterfacesEnabled:
+  type: bool
+  defaultValue: false
+
+ICECandidateFilteringEnabled:
+  type: bool
+  defaultValue: true
+
+ShadowDOMEnabled:
+  type: bool
+  defaultValue: true
+  humanReadableName: "Shadow DOM"
+  humanReadableDescription: "HTML Shadow DOM prototype"
+
+FetchAPIEnabled:
+  type: bool
+  defaultValue: true
+
+DownloadAttributeEnabled:
+  type: bool
+  defaultValue: true
+
+SelectionPaintingWithoutSelectionGapsEnabled:
+  type: bool
+  defaultValue: false
+
+ApplePayEnabled:
+  type: bool
+  defaultValue: false
+
+ApplePayCapabilityDisclosureAllowed:
+  type: bool
+  defaultValue: true
+
+VisualViewportEnabled:
+  type: bool
+  defaultValue: true
+
+NeedsStorageAccessFromFileURLsQuirk:
+  type: bool
+  defaultValue: true
+
+LargeImageAsyncDecodingEnabled:
+  type: bool
+  defaultValue: true
+
+AnimatedImageAsyncDecodingEnabled:
+  type: bool
+  defaultValue: true
+
+CustomElementsEnabled:
+  type: bool
+  defaultValue: true
+
+EncryptedMediaAPIEnabled:
+  type: bool
+  defaultValue: false
+
+MediaPreloadingEnabled:
+  type: bool
+  defaultValue: false
+
+IntersectionObserverEnabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "Intersection Observer"
+  humanReadableDescription: "Enable Intersection Observer support"
+
+InteractiveFormValidationEnabled:
+  type: bool
+  defaultValue: true
+  humanReadableName: "HTML Interactive Form Validation"
+  humanReadableDescription: "HTML interactive form validation"
+
+ShouldSuppressTextInputFromEditingDuringProvisionalNavigation:
+  type: bool
+  defaultValue: false
+
+CSSGridLayoutEnabled:
+  type: bool
+  defaultValue: true
+  humanReadableName: "CSS Grid"
+  humanReadableDescription: "CSS Grid Layout Module support"
+
+GamepadsEnabled:
+  type: bool
+  defaultValue: true
+  humanReadableName: "Gamepads"
+  humanReadableDescription: "Web Gamepad API support"
+
+InputEventsEnabled:
+  type: bool
+  defaultValue: true
+  humanReadableName: "Input Events"
+  humanReadableDescription: "Enable InputEvents support"
+
+CredentialManagementEnabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "Credential Management"
+  humanReadableDescription: "Enable Credential Management support"
+
+ModernMediaControlsEnabled:
+  type: bool
+  defaultValue: DEFAULT_MODERN_MEDIA_CONTROLS_ENABLED
+  humanReadableName: "Modern Media Controls"
+  humanReadableDescription: "Use modern media controls look"
+
+ResourceTimingEnabled:
+  type: bool
+  defaultValue: DEFAULT_RESOURCE_TIMING_ENABLED
+  humanReadableName: "Resource Timing"
+  humanReadableDescription: "Enable ResourceTiming API"
+
+UserTimingEnabled:
+  type: bool
+  defaultValue: true
+  humanReadableName: "User Timing"
+  humanReadableDescription: "Enable UserTiming API"
+
+BeaconAPIEnabled:
+  type: bool
+  defaultValue: true
+  humanReadableName: "Beacon API"
+  humanReadableDescription: "Beacon API"
+
+LegacyEncryptedMediaAPIEnabled:
+  type: bool
+  defaultValue: DEFAULT_LEGACY_ENCRYPTED_MEDIA_API_ENABLED
+  humanReadableName: "Enable Legacy EME API"
+  humanReadableDescription: "Enable legacy EME API"
+
+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"
+
+DirectoryUploadEnabled:
+  type: bool
+  defaultValue: DEFAULT_DIRECTORY_UPLOAD_ENABLED
+  humanReadableName: "Directory Upload"
+  humanReadableDescription: "input.webkitdirectory / dataTransferItem.webkitGetAsEntry()"
+
+DataTransferItemsEnabled:
+  type: bool
+  defaultValue: DEFAULT_DATA_TRANSFER_ITEMS_ENABLED
+  humanReadableName: "Data Transfer Items"
+  humanReadableDescription: "Enables DataTransferItem in the clipboard API"
+
+CustomPasteboardDataEnabled:
+  type: bool
+  defaultValue: WebCore::DeprecatedGlobalSettings::defaultCustomPasteboardDataEnabled()
+  humanReadableName: "Custom pateboard data"
+  humanReadableDescription: "Enable custom clipboard types and better security model for clipboard API."
+
+WebVREnabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "WebVR"
+  humanReadableDescription: "WebVR Module support"
+
+ViewportFitEnabled:
+  type: bool
+  defaultValue: true
+  humanReadableName: "Viewport Fit"
+  humanReadableDescription: "Enable viewport-fit viewport parameter"
+
+IncrementalRenderingSuppressionTimeout:
+  type: double
+  defaultValue: 5
+
+MinimumFontSize:
+  type: double
+  defaultValue: 0
+
+MinimumLogicalFontSize:
+  type: double
+  defaultValue: 9
+
+MinimumZoomFontSize:
+  type: double
+  defaultValue: WebCore::Settings::defaultMinimumZoomFontSize()
+
+DefaultFontSize:
+  type: double
+  defaultValue: 16
+
+DefaultFixedFontSize:
+  type: double
+  defaultValue: 13
+
+LayoutInterval:
+  type: double
+  defaultValue: -1
+
+MaxParseDuration:
+  type: double
+  defaultValue: -1
+
+PasswordEchoDuration:
+  type: double
+  defaultValue: 2
+
+FontSmoothingLevel:
+  type: uint32_t
+  defaultValue: FontSmoothingLevelMedium
+
+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
+
+InspectorAttachedHeight:
+  type: uint32_t
+  defaultValue: 300
+
+InspectorAttachedWidth:
+  type: uint32_t
+  defaultValue: 750
+
+InspectorAttachmentSide:
+  type: uint32_t
+  defaultValue: 0
+
+StorageBlockingPolicy:
+  type: uint32_t
+  defaultValue: WebCore::SecurityOrigin::BlockThirdPartyStorage
+
+JavaScriptRuntimeFlags:
+  type: uint32_t
+  defaultValue: 0
+
+DataDetectorTypes:
+  type: uint32_t
+  defaultValue: 0
+
+UserInterfaceDirectionPolicy:
+  type: uint32_t
+  defaultValue: 0
+
+SystemLayoutDirection:
+  type: uint32_t
+  defaultValue: 0
+
+FrameFlattening:
+  type: uint32_t
+  defaultValue: DEFAULT_FRAME_FLATTENING
+
+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: '""'
+  webkitOnly: true
+
+
+# Debug Preferences
+
+
+AcceleratedDrawingEnabled:
+  type: bool
+  defaultValue: DEFAULT_ACCELERATED_DRAWING_ENABLED
+  category: debug
+
+SubpixelAntialiasedLayerTextEnabled:
+  type: bool
+  defaultValue: DEFAULT_SUBPIXEL_ANTIALIASED_LAYER_TEXT_ENABLED
+  category: debug
+
+DisplayListDrawingEnabled:
+  type: bool
+  defaultValue: false
+  category: debug
+
+CompositingBordersVisible:
+  type: bool
+  defaultValue: false
+  category: debug
+
+CompositingRepaintCountersVisible:
+  type: bool
+  defaultValue: false
+  category: debug
+
+TiledScrollingIndicatorVisible:
+  type: bool
+  defaultValue: false
+  category: debug
+
+SimpleLineLayoutDebugBordersEnabled:
+  type: bool
+  defaultValue: false
+  category: debug
+
+DeveloperExtrasEnabled:
+  type: bool
+  defaultValue: false
+  category: debug
+
+LogsPageMessagesToSystemConsoleEnabled:
+  type: bool
+  defaultValue: false
+  category: debug
+
+IgnoreViewportScalingConstraints:
+  type: bool
+  defaultValue: true
+  category: debug
+
+ForceAlwaysUserScalable:
+  type: bool
+  defaultValue: false
+  category: debug
+
+ResourceUsageOverlayVisible:
+  type: bool
+  defaultValue: false
+  category: debug
+
+VisibleDebugOverlayRegions:
+  type: uint32_t
+  defaultValue: 0
+  category: debug
+
+
+# For experimental features:
+# The type should be boolean.
+# You must provide a humanReadableName and humanReadableName for all experimental features. They
+#   are 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).
+
+
+AsyncFrameScrollingEnabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "Async Frame Scrolling"
+  humanReadableDescription: "Perform frame scrolling in a dedicated thread or process"
+  category: experimental
+
+CacheAPIEnabled:
+  type: bool
+  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
+  humanReadableName: "Cache API"
+  humanReadableDescription: "Enable Cache API"
+  category: experimental
+
+ConstantPropertiesEnabled:
+  type: bool
+  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
+  humanReadableName: "Constant Properties"
+  humanReadableDescription: "Enable CSS constant() properties"
+  category: experimental
+
+DisplayContentsEnabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "CSS display: contents"
+  humanReadableDescription: "Enable CSS display: contents support"
+  category: experimental
+
+SpringTimingFunctionEnabled:
+  type: bool
+  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
+  humanReadableName: "CSS Spring Animations"
+  humanReadableDescription: "CSS Spring Animation prototype"
+  category: experimental
+
+LinkPreloadEnabled:
+  type: bool
+  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
+  humanReadableName: "Link Preload"
+  humanReadableDescription: "Link preload support"
+  category: experimental
+
+PaymentRequestEnabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "Payment Request"
+  humanReadableDescription: "W3C Payment Request API"
+  category: experimental
+
+WebRTCLegacyAPIDisabled:
+  type: bool
+  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
+  humanReadableName: "Remove Legacy WebRTC API"
+  humanReadableDescription: "Remove Legacy WebRTC API"
+  category: experimental
+
+IsSecureContextAttributeEnabled:
+  type: bool
+  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
+  humanReadableName: "Secure Contexts API"
+  humanReadableDescription: "Enable Secure Contexts API"
+  category: experimental
+
+ServiceWorkersEnabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "ServiceWorkers"
+  humanReadableDescription: "Enable ServiceWorkers"
+  category: experimental
+
+StorageAccessAPIEnabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "Storage Access API"
+  humanReadableDescription: "Enable Storage Access API"
+  category: experimental
+
+SubresourceIntegrityEnabled:
+  type: bool
+  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
+  humanReadableName: "SubresourceIntegrity"
+  humanReadableDescription: "Enable SubresourceIntegrity"
+  category: experimental
+
+WebAnimationsEnabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "Web Animations"
+  humanReadableDescription: "Web Animations prototype"
+  category: experimental
+
+WebGL2Enabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "WebGL 2.0"
+  humanReadableDescription: "WebGL 2 prototype"
+  category: experimental
+
+WebGPUEnabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "WebGPU"
+  humanReadableDescription: "WebGPU prototype"
+  category: experimental
diff --git a/Source/WebKit/Shared/WebPreferencesDefinitions.h b/Source/WebKit/Shared/WebPreferencesDefinitions.h
deleted file mode 100644 (file)
index b45bfb8..0000000
+++ /dev/null
@@ -1,451 +0,0 @@
-/*
- * Copyright (C) 2010-2016 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.
- */
-
-#pragma once
-
-#if PLATFORM(GTK)
-#define DEFAULT_WEBKIT_TABSTOLINKS_ENABLED true
-#else
-#define DEFAULT_WEBKIT_TABSTOLINKS_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)
-#define DEFAULT_ALLOWS_PICTURE_IN_PICTURE_MEDIA_PLAYBACK true
-#define DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED false
-#define DEFAULT_FRAME_FLATTENING FrameFlattening::FullyEnabled
-#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_PASSWORD_ECHO_ENABLED 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_LEGACY_ENCRYPTED_MEDIA_API_ENABLED false
-#else
-#define DEFAULT_ALLOWS_PICTURE_IN_PICTURE_MEDIA_PLAYBACK false
-#define DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED true
-#define DEFAULT_FRAME_FLATTENING FrameFlattening::Disabled
-#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_PASSWORD_ECHO_ENABLED 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_LEGACY_ENCRYPTED_MEDIA_API_ENABLED true
-#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) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
-#define DEFAULT_SUBPIXEL_ANTIALIASED_LAYER_TEXT_ENABLED true
-#else
-#define DEFAULT_SUBPIXEL_ANTIALIASED_LAYER_TEXT_ENABLED false
-#endif
-
-#if PLATFORM(IOS_SIMULATOR)
-#define DEFAULT_ACCELERATED_DRAWING_ENABLED false
-#define DEFAULT_CANVAS_USES_ACCELERATED_DRAWING false
-#else
-#define DEFAULT_ACCELERATED_DRAWING_ENABLED true
-#define DEFAULT_CANVAS_USES_ACCELERATED_DRAWING true
-#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(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
-// <https://webkit.org/b/168415> El Capitan NetworkLoadTiming values are sometimes jumbled
-#define DEFAULT_RESOURCE_TIMING_ENABLED false
-#else
-#define DEFAULT_RESOURCE_TIMING_ENABLED true
-#endif
-
-#if PLATFORM(COCOA)
-#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
-
-// macro(KeyUpper, KeyLower, TypeNameUpper, TypeName, DefaultValue, HumanReadableName, HumanReadableDescription)
-
-#define FOR_EACH_WEBKIT_BOOL_PREFERENCE(macro) \
-    macro(JavaScriptEnabled, javaScriptEnabled, Bool, bool, true, "", "") \
-    macro(JavaScriptMarkupEnabled, javaScriptMarkupEnabled, Bool, bool, true, "", "") \
-    macro(LoadsImagesAutomatically, loadsImagesAutomatically, Bool, bool, true, "", "") \
-    macro(LoadsSiteIconsIgnoringImageLoadingPreference, loadsSiteIconsIgnoringImageLoadingPreference, Bool, bool, false, "", "") \
-    macro(PluginsEnabled, pluginsEnabled, Bool, bool, false, "", "") \
-    macro(JavaEnabled, javaEnabled, Bool, bool, false, "", "") \
-    macro(JavaEnabledForLocalFiles, javaEnabledForLocalFiles, Bool, bool, false, "", "") \
-    macro(OfflineWebApplicationCacheEnabled, offlineWebApplicationCacheEnabled, Bool, bool, true, "", "") \
-    macro(LocalStorageEnabled, localStorageEnabled, Bool, bool, true, "", "") \
-    macro(DatabasesEnabled, databasesEnabled, Bool, bool, true, "", "") \
-    macro(XSSAuditorEnabled, xssAuditorEnabled, Bool, bool, true, "", "") \
-    macro(PrivateBrowsingEnabled, privateBrowsingEnabled, Bool, bool, false, "", "") \
-    macro(TextAreasAreResizable, textAreasAreResizable, Bool, bool, DEFAULT_TEXT_AREAS_ARE_RESIZABLE, "", "") \
-    macro(JavaScriptCanOpenWindowsAutomatically, javaScriptCanOpenWindowsAutomatically, Bool, bool, DEFAULT_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY, "", "") \
-    macro(HyperlinkAuditingEnabled, hyperlinkAuditingEnabled, Bool, bool, true, "", "") \
-    macro(NeedsSiteSpecificQuirks, needsSiteSpecificQuirks, Bool, bool, false, "", "") \
-    macro(AcceleratedCompositingEnabled, acceleratedCompositingEnabled, Bool, bool, true, "", "") \
-    macro(ForceCompositingMode, forceCompositingMode, Bool, bool, false, "", "") \
-    macro(CanvasUsesAcceleratedDrawing, canvasUsesAcceleratedDrawing, Bool, bool, DEFAULT_CANVAS_USES_ACCELERATED_DRAWING, "", "") \
-    macro(WebGLEnabled, webGLEnabled, Bool, bool, true, "", "") \
-    macro(ForceSoftwareWebGLRendering, forceSoftwareWebGLRendering, Bool, bool, false, "", "") \
-    macro(Accelerated2dCanvasEnabled, accelerated2dCanvasEnabled, Bool, bool, false, "", "") \
-    macro(CSSAnimationTriggersEnabled, cssAnimationTriggersEnabled, Bool, bool, true, "", "") \
-    macro(ForceFTPDirectoryListings, forceFTPDirectoryListings, Bool, bool, false, "", "") \
-    macro(TabsToLinks, tabsToLinks, Bool, bool, DEFAULT_WEBKIT_TABSTOLINKS_ENABLED, "", "") \
-    macro(DNSPrefetchingEnabled, dnsPrefetchingEnabled, Bool, bool, false, "", "") \
-    macro(DOMTimersThrottlingEnabled, domTimersThrottlingEnabled, Bool, bool, true, "", "") \
-    macro(WebArchiveDebugModeEnabled, webArchiveDebugModeEnabled, Bool, bool, false, "", "") \
-    macro(LocalFileContentSniffingEnabled, localFileContentSniffingEnabled, Bool, bool, false, "", "") \
-    macro(UsesPageCache, usesPageCache, Bool, bool, true, "", "") \
-    macro(PageCacheSupportsPlugins, pageCacheSupportsPlugins, Bool, bool, true, "", "") \
-    macro(AuthorAndUserStylesEnabled, authorAndUserStylesEnabled, Bool, bool, true, "", "") \
-    macro(PaginateDuringLayoutEnabled, paginateDuringLayoutEnabled, Bool, bool, false, "", "") \
-    macro(DOMPasteAllowed, domPasteAllowed, Bool, bool, false, "", "") \
-    macro(JavaScriptCanAccessClipboard, javaScriptCanAccessClipboard, Bool, bool, false, "", "") \
-    macro(ShouldPrintBackgrounds, shouldPrintBackgrounds, Bool, bool, DEFAULT_SHOULD_PRINT_BACKGROUNDS, "", "") \
-    macro(LinkPreconnect, linkPreconnect, Bool, bool, DEFAULT_LINK_PRECONNECT_ENABLED, "", "") \
-    macro(FullScreenEnabled, fullScreenEnabled, Bool, bool, false, "", "") \
-    macro(AsynchronousSpellCheckingEnabled, asynchronousSpellCheckingEnabled, Bool, bool, false, "", "") \
-    macro(WebSecurityEnabled, webSecurityEnabled, Bool, bool, true, "", "") \
-    macro(AllowUniversalAccessFromFileURLs, allowUniversalAccessFromFileURLs, Bool, bool, false, "", "") \
-    macro(AllowFileAccessFromFileURLs, allowFileAccessFromFileURLs, Bool, bool, false, "", "") \
-    macro(AVFoundationEnabled, isAVFoundationEnabled, Bool, bool, true, "", "") \
-    macro(AVFoundationNSURLSessionEnabled, isAVFoundationNSURLSessionEnabled, Bool, bool, true, "", "") \
-    macro(GStreamerEnabled, isGStreamerEnabled, Bool, bool, true, "", "") \
-    macro(RequiresUserGestureForMediaPlayback, requiresUserGestureForMediaPlayback, Bool, bool, false, "", "") \
-    macro(RequiresUserGestureForVideoPlayback, requiresUserGestureForVideoPlayback, Bool, bool, false, "", "") \
-    macro(RequiresUserGestureForAudioPlayback, requiresUserGestureForAudioPlayback, Bool, bool, DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK, "", "") \
-    macro(RequiresUserGestureToLoadVideo, requiresUserGestureToLoadVideo, Bool, bool, false, "", "") \
-    macro(MainContentUserGestureOverrideEnabled, mainContentUserGestureOverrideEnabled, Bool, bool, false, "", "") \
-    macro(MediaUserGestureInheritsFromDocument, mediaUserGestureInheritsFromDocument, Bool, bool, false, "", "") \
-    macro(AllowsInlineMediaPlayback, allowsInlineMediaPlayback, Bool, bool, DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK, "", "") \
-    macro(AllowsInlineMediaPlaybackAfterFullscreen, allowsInlineMediaPlaybackAfterFullscreen, Bool, bool, DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK_AFTER_FULLSCREEN, "", "") \
-    macro(InlineMediaPlaybackRequiresPlaysInlineAttribute, inlineMediaPlaybackRequiresPlaysInlineAttribute, Bool, bool, DEFAULT_INLINE_MEDIA_PLAYBACK_REQUIRES_PLAYS_INLINE_ATTRIBUTE, "", "") \
-    macro(InvisibleAutoplayNotPermitted, invisibleAutoplayNotPermitted, Bool, bool, DEFAULT_INVISIBLE_AUTOPLAY_NOT_PERMITTED, "", "") \
-    macro(MediaDataLoadsAutomatically, mediaDataLoadsAutomatically, Bool, bool, DEFAULT_MEDIA_DATA_LOADS_AUTOMATICALLY, "", "") \
-    macro(AllowsPictureInPictureMediaPlayback, allowsPictureInPictureMediaPlayback, Bool, bool, DEFAULT_ALLOWS_PICTURE_IN_PICTURE_MEDIA_PLAYBACK, "", "") \
-    macro(AllowsAirPlayForMediaPlayback, allowsAirPlayForMediaPlayback, Bool, bool, true, "", "") \
-    macro(MediaControlsScaleWithPageZoom, mediaControlsScaleWithPageZoom, Bool, bool, DEFAULT_MEDIA_CONTROLS_SCALE_WITH_PAGE_ZOOM, "", "") \
-    macro(InspectorStartsAttached, inspectorStartsAttached, Bool, bool, true, "", "") \
-    macro(ShowsToolTipOverTruncatedText, showsToolTipOverTruncatedText, Bool, bool, false, "", "") \
-    macro(MockScrollbarsEnabled, mockScrollbarsEnabled, Bool, bool, false, "", "") \
-    macro(WebAudioEnabled, webAudioEnabled, Bool, bool, true, "", "") \
-    macro(AttachmentElementEnabled, attachmentElementEnabled, Bool, bool, false, "", "") \
-    macro(SuppressesIncrementalRendering, suppressesIncrementalRendering, Bool, bool, false, "", "") \
-    macro(BackspaceKeyNavigationEnabled, backspaceKeyNavigationEnabled, Bool, bool, DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED, "", "") \
-    macro(CaretBrowsingEnabled, caretBrowsingEnabled, Bool, bool, false, "", "") \
-    macro(ShouldDisplaySubtitles, shouldDisplaySubtitles, Bool, bool, false, "", "") \
-    macro(ShouldDisplayCaptions, shouldDisplayCaptions, Bool, bool, false, "", "") \
-    macro(ShouldDisplayTextDescriptions, shouldDisplayTextDescriptions, Bool, bool, false, "", "") \
-    macro(NotificationsEnabled, notificationsEnabled, Bool, bool, true, "", "") \
-    macro(ShouldRespectImageOrientation, shouldRespectImageOrientation, Bool, bool, DEFAULT_SHOULD_RESPECT_IMAGE_ORIENTATION, "", "") \
-    macro(WantsBalancedSetDefersLoadingBehavior, wantsBalancedSetDefersLoadingBehavior, Bool, bool, false, "", "") \
-    macro(RequestAnimationFrameEnabled, requestAnimationFrameEnabled, Bool, bool, true, "", "") \
-    macro(DiagnosticLoggingEnabled, diagnosticLoggingEnabled, Bool, bool, false, "", "") \
-    macro(AsynchronousPluginInitializationEnabled, asynchronousPluginInitializationEnabled, Bool, bool, false, "", "") \
-    macro(AsynchronousPluginInitializationEnabledForAllPlugins, asynchronousPluginInitializationEnabledForAllPlugins, Bool, bool, false, "", "") \
-    macro(ArtificialPluginInitializationDelayEnabled, artificialPluginInitializationDelayEnabled, Bool, bool, false, "", "") \
-    macro(TabToLinksEnabled, tabToLinksEnabled, Bool, bool, false, "", "") \
-    macro(ScrollingPerformanceLoggingEnabled, scrollingPerformanceLoggingEnabled, Bool, bool, false, "", "") \
-    macro(ScrollAnimatorEnabled, scrollAnimatorEnabled, Bool, bool, DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED, "", "") \
-    macro(ForceUpdateScrollbarsOnMainThreadForPerformanceTesting, forceUpdateScrollbarsOnMainThreadForPerformanceTesting, Bool, bool, false, "", "") \
-    macro(CookieEnabled, cookieEnabled, Bool, bool, true, "", "") \
-    macro(PlugInSnapshottingEnabled, plugInSnapshottingEnabled, Bool, bool, false, "", "") \
-    macro(SnapshotAllPlugIns, snapshotAllPlugIns, Bool, bool, false, "", "") \
-    macro(AutostartOriginPlugInSnapshottingEnabled, autostartOriginPlugInSnapshottingEnabled, Bool, bool, true, "", "") \
-    macro(PrimaryPlugInSnapshotDetectionEnabled, primaryPlugInSnapshotDetectionEnabled, Bool, bool, true, "", "") \
-    macro(PDFPluginEnabled, pdfPluginEnabled, Bool, bool, DEFAULT_PDFPLUGIN_ENABLED, "", "") \
-    macro(UsesEncodingDetector, usesEncodingDetector, Bool, bool, false, "", "") \
-    macro(TextAutosizingEnabled, textAutosizingEnabled, Bool, bool, WebCore::Settings::defaultTextAutosizingEnabled(), "", "") \
-    macro(AggressiveTileRetentionEnabled, aggressiveTileRetentionEnabled, Bool, bool, false, "", "") \
-    macro(TemporaryTileCohortRetentionEnabled, temporaryTileCohortRetentionEnabled, Bool, bool, DEFAULT_TEMPORARY_TILE_COHORT_RETENTION_ENABLED, "", "") \
-    macro(QTKitEnabled, isQTKitEnabled, Bool, bool, WebCore::DeprecatedGlobalSettings::isQTKitEnabled(), "", "") \
-    macro(PageVisibilityBasedProcessSuppressionEnabled, pageVisibilityBasedProcessSuppressionEnabled, Bool, bool, true, "", "") \
-    macro(SmartInsertDeleteEnabled, smartInsertDeleteEnabled, Bool, bool, true, "", "") \
-    macro(SelectTrailingWhitespaceEnabled, selectTrailingWhitespaceEnabled, Bool, bool, false, "", "") \
-    macro(ShowsURLsInToolTipsEnabled, showsURLsInToolTipsEnabled, Bool, bool, false, "", "") \
-    macro(AcceleratedCompositingForOverflowScrollEnabled, acceleratedCompositingForOverflowScrollEnabled, Bool, bool, false, "", "") \
-    macro(HiddenPageDOMTimerThrottlingEnabled, hiddenPageDOMTimerThrottlingEnabled, Bool, bool, DEFAULT_HIDDEN_PAGE_DOM_TIMER_THROTTLING_ENABLED, "", "") \
-    macro(HiddenPageDOMTimerThrottlingAutoIncreases, hiddenPageDOMTimerThrottlingAutoIncreases, Bool, bool, false, "", "") \
-    macro(HiddenPageCSSAnimationSuspensionEnabled, hiddenPageCSSAnimationSuspensionEnabled, Bool, bool, DEFAULT_HIDDEN_PAGE_CSS_ANIMATION_SUSPENSION_ENABLED, "", "") \
-    macro(LowPowerVideoAudioBufferSizeEnabled, lowPowerVideoAudioBufferSizeEnabled, Bool, bool, false, "", "") \
-    macro(ThreadedScrollingEnabled, threadedScrollingEnabled, Bool, bool, true, "", "") \
-    macro(SimpleLineLayoutEnabled, simpleLineLayoutEnabled, Bool, bool, true, "", "") \
-    macro(SubpixelCSSOMElementMetricsEnabled, subpixelCSSOMElementMetricsEnabled, Bool, bool, false, "", "") \
-    macro(UseGiantTiles, useGiantTiles, Bool, bool, false, "", "") \
-    macro(MediaDevicesEnabled, mediaDevicesEnabled, Bool, bool, false, "", "") \
-    macro(MediaStreamEnabled, mediaStreamEnabled, Bool, bool, true, "", "") \
-    macro(PeerConnectionEnabled, peerConnectionEnabled, Bool, bool, WebCore::LibWebRTCProvider::webRTCAvailable(), "", "") \
-    macro(UseLegacyTextAlignPositionedElementBehavior, useLegacyTextAlignPositionedElementBehavior, Bool, bool, false, "", "") \
-    macro(SpatialNavigationEnabled, spatialNavigationEnabled, Bool, bool, false, "", "") \
-    macro(MediaSourceEnabled, mediaSourceEnabled, Bool, bool, true, "", "") \
-    macro(ViewGestureDebuggingEnabled, viewGestureDebuggingEnabled, Bool, bool, false, "", "") \
-    macro(ShouldConvertPositionStyleOnCopy, shouldConvertPositionStyleOnCopy, Bool, bool, false, "", "") \
-    macro(Standalone, standalone, Bool, bool, false, "", "") \
-    macro(TelephoneNumberParsingEnabled, telephoneNumberParsingEnabled, Bool, bool, false, "", "") \
-    macro(AllowMultiElementImplicitSubmission, allowMultiElementImplicitSubmission, Bool, bool, false, "", "") \
-    macro(AlwaysUseAcceleratedOverflowScroll, alwaysUseAcceleratedOverflowScroll, Bool, bool, false, "", "") \
-    macro(PasswordEchoEnabled, passwordEchoEnabled, Bool, bool, DEFAULT_PASSWORD_ECHO_ENABLED, "", "") \
-    macro(ImageControlsEnabled, imageControlsEnabled, Bool, bool, false, "", "") \
-    macro(EnableInheritURIQueryComponent, enableInheritURIQueryComponent, Bool, bool, false, "", "") \
-    macro(ServiceControlsEnabled, serviceControlsEnabled, Bool, bool, false, "", "") \
-    macro(DeferredCSSParserEnabled, deferredCSSParserEnabled, Bool, bool, false, "", "") \
-    macro(HTTPEquivEnabled, httpEquivEnabled, Bool, bool, true, "", "") \
-    macro(MockCaptureDevicesEnabled, mockCaptureDevicesEnabled, Bool, bool, false, "", "") \
-    macro(MockCaptureDevicesPromptEnabled, mockCaptureDevicesPromptEnabled, Bool, bool, true, "", "") \
-    macro(MediaCaptureRequiresSecureConnection, mediaCaptureRequiresSecureConnection, Bool, bool, true, "", "") \
-    macro(EnumeratingAllNetworkInterfacesEnabled, enumeratingAllNetworkInterfacesEnabled, Bool, bool, false, "", "") \
-    macro(ICECandidateFilteringEnabled, iceCandidateFilteringEnabled, Bool, bool, true, "", "") \
-    macro(ShadowDOMEnabled, shadowDOMEnabled, Bool, bool, true, "Shadow DOM", "HTML Shadow DOM prototype") \
-    macro(FetchAPIEnabled, fetchAPIEnabled, Bool, bool, true, "", "") \
-    macro(DownloadAttributeEnabled, downloadAttributeEnabled, Bool, bool, true, "", "") \
-    macro(SelectionPaintingWithoutSelectionGapsEnabled, selectionPaintingWithoutSelectionGapsEnabled, Bool, bool, false, "", "") \
-    macro(ApplePayEnabled, applePayEnabled, Bool, bool, false, "", "") \
-    macro(ApplePayCapabilityDisclosureAllowed, applePayCapabilityDisclosureAllowed, Bool, bool, true, "", "") \
-    macro(VisualViewportEnabled, visualViewportEnabled, Bool, bool, true, "", "") \
-    macro(NeedsStorageAccessFromFileURLsQuirk, needsStorageAccessFromFileURLsQuirk, Bool, bool, true, "", "") \
-    macro(LargeImageAsyncDecodingEnabled, largeImageAsyncDecodingEnabled, Bool, bool, true, "", "") \
-    macro(AnimatedImageAsyncDecodingEnabled, animatedImageAsyncDecodingEnabled, Bool, bool, true, "", "") \
-    macro(CustomElementsEnabled, customElementsEnabled, Bool, bool, true, "", "") \
-    macro(EncryptedMediaAPIEnabled, encryptedMediaAPIEnabled, Bool, bool, false, "", "") \
-    macro(MediaPreloadingEnabled, mediaPreloadingEnabled, Bool, bool, false, "", "") \
-    macro(IntersectionObserverEnabled, intersectionObserverEnabled, Bool, bool, false, "Intersection Observer", "Enable Intersection Observer support") \
-    macro(InteractiveFormValidationEnabled, interactiveFormValidationEnabled, Bool, bool, true, "HTML Interactive Form Validation", "HTML interactive form validation") \
-    macro(ShouldSuppressTextInputFromEditingDuringProvisionalNavigation, shouldSuppressTextInputFromEditingDuringProvisionalNavigation, Bool, bool, false, "", "") \
-    macro(CSSGridLayoutEnabled, cssGridLayoutEnabled, Bool, bool, true, "CSS Grid", "CSS Grid Layout Module support") \
-    macro(GamepadsEnabled, gamepadsEnabled, Bool, bool, true, "Gamepads", "Web Gamepad API support") \
-    macro(InputEventsEnabled, inputEventsEnabled, Bool, bool, true, "Input Events", "Enable InputEvents support") \
-    macro(CredentialManagementEnabled, credentialManagementEnabled, Bool, bool, false, "Credential Management", "Enable Credential Management support") \
-    macro(ModernMediaControlsEnabled, modernMediaControlsEnabled, Bool, bool, DEFAULT_MODERN_MEDIA_CONTROLS_ENABLED, "Modern Media Controls", "Use modern media controls look") \
-    macro(ResourceTimingEnabled, resourceTimingEnabled, Bool, bool, DEFAULT_RESOURCE_TIMING_ENABLED, "Resource Timing", "Enable ResourceTiming API") \
-    macro(UserTimingEnabled, userTimingEnabled, Bool, bool, true, "User Timing", "Enable UserTiming API") \
-    macro(BeaconAPIEnabled, beaconAPIEnabled, Bool, bool, true, "Beacon API", "Beacon API") \
-    macro(LegacyEncryptedMediaAPIEnabled, legacyEncryptedMediaAPIEnabled, Bool, bool, DEFAULT_LEGACY_ENCRYPTED_MEDIA_API_ENABLED, "Enable Legacy EME API", "Enable legacy EME API") \
-    macro(AllowMediaContentTypesRequiringHardwareSupportAsFallback, allowMediaContentTypesRequiringHardwareSupportAsFallback, Bool, bool, DEFAULT_ALLOW_MEDIA_CONTENT_TYPES_REQUIRING_HARDWARE_SUPPORT_AS_FALLBACK, "Allow Media Content Types Requirining Hardware As Fallback", "Allow Media Content Types Requirining Hardware As Fallback") \
-    macro(InspectorAdditionsEnabled, inspectorAdditionsEnabled, Bool, bool, false, "Web Inspector Additions", "Enable additional page APIs used by the Web Inspector frontend page") \
-    macro(DirectoryUploadEnabled, directoryUploadEnabled, Bool, bool, DEFAULT_DIRECTORY_UPLOAD_ENABLED, "Directory Upload", "input.webkitdirectory / dataTransferItem.webkitGetAsEntry()") \
-    macro(DataTransferItemsEnabled, dataTransferItemsEnabled, Bool, bool, DEFAULT_DATA_TRANSFER_ITEMS_ENABLED, "Data Transfer Items", "Enables DataTransferItem in the clipboard API") \
-    macro(CustomPasteboardDataEnabled, customPasteboardDataEnabled, Bool, bool, WebCore::DeprecatedGlobalSettings::defaultCustomPasteboardDataEnabled(), "Custom pateboard data", "Enable custom clipboard types and better security model for clipboard API.") \
-    macro(WebVREnabled, webVREnabled, Bool, bool, false, "WebVR", "WebVR Module support") \
-    macro(ViewportFitEnabled, viewportFitEnabled, Bool, bool, true, "Viewport Fit", "Enable viewport-fit viewport parameter") \
-    \
-
-#define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
-    macro(IncrementalRenderingSuppressionTimeout, incrementalRenderingSuppressionTimeout, Double, double, 5, "", "") \
-    macro(MinimumFontSize, minimumFontSize, Double, double, 0, "", "") \
-    macro(MinimumLogicalFontSize, minimumLogicalFontSize, Double, double, 9, "", "") \
-    macro(MinimumZoomFontSize, minimumZoomFontSize, Double, double, WebCore::Settings::defaultMinimumZoomFontSize(), "", "") \
-    macro(DefaultFontSize, defaultFontSize, Double, double, 16, "", "") \
-    macro(DefaultFixedFontSize, defaultFixedFontSize, Double, double, 13, "", "") \
-    macro(LayoutInterval, layoutInterval, Double, double, -1, "", "") \
-    macro(MaxParseDuration, maxParseDuration, Double, double, -1, "", "") \
-    macro(PasswordEchoDuration, passwordEchoDuration, Double, double, 2, "", "") \
-\
-
-#define FOR_EACH_WEBKIT_UINT32_PREFERENCE(macro) \
-    macro(FontSmoothingLevel, fontSmoothingLevel, UInt32, uint32_t, FontSmoothingLevelMedium, "", "") \
-    macro(LayoutFallbackWidth, layoutFallbackWidth, UInt32, uint32_t, 980, "", "") \
-    macro(DeviceWidth, deviceWidth, UInt32, uint32_t, 0, "", "") \
-    macro(DeviceHeight, deviceHeight, UInt32, uint32_t, 0, "", "") \
-    macro(EditableLinkBehavior, editableLinkBehavior, UInt32, uint32_t, WebCore::EditableLinkNeverLive, "", "") \
-    macro(InspectorAttachedHeight, inspectorAttachedHeight, UInt32, uint32_t, 300, "", "") \
-    macro(InspectorAttachedWidth, inspectorAttachedWidth, UInt32, uint32_t, 750, "", "") \
-    macro(InspectorAttachmentSide, inspectorAttachmentSide, UInt32, uint32_t, 0, "", "") \
-    macro(StorageBlockingPolicy, storageBlockingPolicy, UInt32, uint32_t, WebCore::SecurityOrigin::BlockThirdPartyStorage, "", "") \
-    macro(JavaScriptRuntimeFlags, javaScriptRuntimeFlags, UInt32, uint32_t, 0, "", "") \
-    macro(DataDetectorTypes, dataDetectorTypes, UInt32, uint32_t, 0, "", "") \
-    macro(UserInterfaceDirectionPolicy, userInterfaceDirectionPolicy, UInt32, uint32_t, 0, "", "") \
-    macro(SystemLayoutDirection, systemLayoutDirection, UInt32, uint32_t, 0, "", "") \
-    macro(FrameFlattening, frameFlattening, UInt32, uint32_t, DEFAULT_FRAME_FLATTENING, "", "") \
-    \
-
-#define FOR_EACH_WEBKIT_DEBUG_BOOL_PREFERENCE(macro) \
-    macro(AcceleratedDrawingEnabled, acceleratedDrawingEnabled, Bool, bool, DEFAULT_ACCELERATED_DRAWING_ENABLED, "", "") \
-    macro(SubpixelAntialiasedLayerTextEnabled, subpixelAntialiasedLayerTextEnabled, Bool, bool, DEFAULT_SUBPIXEL_ANTIALIASED_LAYER_TEXT_ENABLED, "", "") \
-    macro(DisplayListDrawingEnabled, displayListDrawingEnabled, Bool, bool, false, "", "") \
-    macro(CompositingBordersVisible, compositingBordersVisible, Bool, bool, false, "", "") \
-    macro(CompositingRepaintCountersVisible, compositingRepaintCountersVisible, Bool, bool, false, "", "") \
-    macro(TiledScrollingIndicatorVisible, tiledScrollingIndicatorVisible, Bool, bool, false, "", "") \
-    macro(SimpleLineLayoutDebugBordersEnabled, simpleLineLayoutDebugBordersEnabled, Bool, bool, false, "", "") \
-    macro(DeveloperExtrasEnabled, developerExtrasEnabled, Bool, bool, false, "", "") \
-    macro(LogsPageMessagesToSystemConsoleEnabled, logsPageMessagesToSystemConsoleEnabled, Bool, bool, false, "", "") \
-    macro(IgnoreViewportScalingConstraints, ignoreViewportScalingConstraints, Bool, bool, true, "", "") \
-    macro(ForceAlwaysUserScalable, forceAlwaysUserScalable, Bool, bool, false, "", "") \
-    macro(ResourceUsageOverlayVisible, resourceUsageOverlayVisible, Bool, bool, false, "", "") \
-    \
-
-#define FOR_EACH_WEBKIT_DEBUG_UINT32_PREFERENCE(macro) \
-    macro(VisibleDebugOverlayRegions, visibleDebugOverlayRegions, UInt32, uint32_t, 0, "", "")
-
-// Our Xcode build system does not currently have any concept of DEVELOPER_MODE.
-// Cocoa ports must disable experimental features on release branches for now.
-#if ENABLE(DEVELOPER_MODE) || PLATFORM(COCOA)
-#define DEFAULT_EXPERIMENTAL_FEATURES_ENABLED true
-#else
-#define DEFAULT_EXPERIMENTAL_FEATURES_ENABLED false
-#endif
-
-// For experimental features:
-// - The type should be boolean.
-// - You must provide the last two parameters for all experimental features. They
-//   are the text exposed to the user from the WebKit client.
-// - They should be alphabetically ordered by the human readable text (the first string).
-// - The default value may be either false (for unstable features) or
-//   DEFAULT_EXPERIMENTAL_FEATURES_ENABLED (for features that are ready for
-//   wider testing).
-
-#define FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(macro) \
-    macro(AsyncFrameScrollingEnabled, asyncFrameScrollingEnabled, Bool, bool, false, "Async Frame Scrolling", "Perform frame scrolling in a dedicated thread or process") \
-    macro(CacheAPIEnabled, cacheAPIEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Cache API", "Enable Cache API") \
-    macro(ConstantPropertiesEnabled, constantPropertiesEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Constant Properties", "Enable CSS constant() properties") \
-    macro(DisplayContentsEnabled, displayContentsEnabled, Bool, bool, false, "CSS display: contents", "Enable CSS display: contents support") \
-    macro(SpringTimingFunctionEnabled, springTimingFunctionEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "CSS Spring Animations", "CSS Spring Animation prototype") \
-    macro(LinkPreloadEnabled, linkPreloadEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Link Preload", "Link preload support") \
-    macro(PaymentRequestEnabled, paymentRequestEnabled, Bool, bool, false, "Payment Request", "W3C Payment Request API") \
-    macro(WebRTCLegacyAPIDisabled, webRTCLegacyAPIDisabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Remove Legacy WebRTC API", "Remove Legacy WebRTC API") \
-    macro(IsSecureContextAttributeEnabled, isSecureContextAttributeEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Secure Contexts API", "Enable Secure Contexts API") \
-    macro(ServiceWorkersEnabled, serviceWorkersEnabled, Bool, bool, false, "ServiceWorkers", "Enable ServiceWorkers") \
-    macro(StorageAccessAPIEnabled, storageAccessAPIEnabled, Bool, bool, false, "Storage Access API", "Enable Storage Access API") \
-    macro(SubresourceIntegrityEnabled, subresourceIntegrityEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "SubresourceIntegrity", "Enable SubresourceIntegrity") \
-    macro(WebAnimationsEnabled, webAnimationsEnabled, Bool, bool, false, "Web Animations", "Web Animations prototype") \
-    macro(WebGL2Enabled, webGL2Enabled, Bool, bool, false, "WebGL 2.0", "WebGL 2 prototype") \
-    macro(WebGPUEnabled, webGPUEnabled, Bool, bool, false, "WebGPU", "WebGPU prototype") \
-    \
-
-#if PLATFORM(COCOA)
-
-#if PLATFORM(IOS)
-#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
-
-
-#define FOR_EACH_WEBKIT_FONT_FAMILY_PREFERENCE(macro) \
-    macro(StandardFontFamily, standardFontFamily, String, String, "Times", "", "") \
-    macro(CursiveFontFamily, cursiveFontFamily, String, String, DEFAULT_CURSIVE_FONT_FAMILY, "", "") \
-    macro(FantasyFontFamily, fantasyFontFamily, String, String, "Papyrus", "", "") \
-    macro(FixedFontFamily, fixedFontFamily, String, String, "Courier", "", "") \
-    macro(SansSerifFontFamily, sansSerifFontFamily, String, String, "Helvetica", "", "") \
-    macro(SerifFontFamily, serifFontFamily, String, String, "Times", "", "") \
-    macro(PictographFontFamily, pictographFontFamily, String, String, "Apple Color Emoji", "", "") \
-    \
-
-#else
-
-#define FOR_EACH_WEBKIT_FONT_FAMILY_PREFERENCE(macro) \
-    macro(StandardFontFamily, standardFontFamily, String, String, "Times", "", "") \
-    macro(CursiveFontFamily, cursiveFontFamily, String, String, "Comic Sans MS", "", "") \
-    macro(FantasyFontFamily, fantasyFontFamily, String, String, "Impact", "", "") \
-    macro(FixedFontFamily, fixedFontFamily, String, String, "Courier New", "", "") \
-    macro(SansSerifFontFamily, sansSerifFontFamily, String, String, "Helvetica", "", "") \
-    macro(SerifFontFamily, serifFontFamily, String, String, "Times", "", "") \
-    macro(PictographFontFamily, pictographFontFamily, String, String, "Times", "", "") \
-    \
-
-#endif
-
-#define FOR_EACH_WEBKIT_STRING_PREFERENCE(macro) \
-    FOR_EACH_WEBKIT_FONT_FAMILY_PREFERENCE(macro) \
-    macro(DefaultTextEncodingName, defaultTextEncodingName, String, String, defaultTextEncodingNameForSystemLanguage(), "", "") \
-    macro(FTPDirectoryTemplatePath, ftpDirectoryTemplatePath, String, String, "", "", "") \
-    macro(MediaContentTypesRequiringHardwareSupport, mediaContentTypesRequiringHardwareSupport, String, String, WebCore::Settings::defaultMediaContentTypesRequiringHardwareSupport(), "", "") \
-    \
-
-#define FOR_EACH_WEBKIT_STRING_PREFERENCE_NOT_IN_WEBCORE(macro) \
-    macro(InspectorWindowFrame, inspectorWindowFrame, String, String, "", "", "") \
-    \
-
-#define FOR_EACH_WEBKIT_DEBUG_PREFERENCE(macro) \
-    FOR_EACH_WEBKIT_DEBUG_BOOL_PREFERENCE(macro) \
-    FOR_EACH_WEBKIT_DEBUG_UINT32_PREFERENCE(macro) \
-    \
-
-#define FOR_EACH_WEBKIT_PREFERENCE(macro) \
-    FOR_EACH_WEBKIT_BOOL_PREFERENCE(macro) \
-    FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
-    FOR_EACH_WEBKIT_UINT32_PREFERENCE(macro) \
-    FOR_EACH_WEBKIT_STRING_PREFERENCE(macro) \
-    FOR_EACH_WEBKIT_STRING_PREFERENCE_NOT_IN_WEBCORE(macro) \
-    \
-
diff --git a/Source/WebKit/Shared/WebPreferencesDefinitionsBase.h b/Source/WebKit/Shared/WebPreferencesDefinitionsBase.h
new file mode 100644 (file)
index 0000000..312f060
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * Copyright (C) 2010-2016 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.
+ */
+
+#pragma once
+
+#if PLATFORM(GTK)
+#define DEFAULT_WEBKIT_TABSTOLINKS_ENABLED true
+#else
+#define DEFAULT_WEBKIT_TABSTOLINKS_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)
+#define DEFAULT_ALLOWS_PICTURE_IN_PICTURE_MEDIA_PLAYBACK true
+#define DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED false
+#define DEFAULT_FRAME_FLATTENING FrameFlattening::FullyEnabled
+#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_PASSWORD_ECHO_ENABLED 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_LEGACY_ENCRYPTED_MEDIA_API_ENABLED false
+#else
+#define DEFAULT_ALLOWS_PICTURE_IN_PICTURE_MEDIA_PLAYBACK false
+#define DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED true
+#define DEFAULT_FRAME_FLATTENING FrameFlattening::Disabled
+#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_PASSWORD_ECHO_ENABLED 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_LEGACY_ENCRYPTED_MEDIA_API_ENABLED true
+#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) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
+#define DEFAULT_SUBPIXEL_ANTIALIASED_LAYER_TEXT_ENABLED true
+#else
+#define DEFAULT_SUBPIXEL_ANTIALIASED_LAYER_TEXT_ENABLED false
+#endif
+
+#if PLATFORM(IOS_SIMULATOR)
+#define DEFAULT_ACCELERATED_DRAWING_ENABLED false
+#define DEFAULT_CANVAS_USES_ACCELERATED_DRAWING false
+#else
+#define DEFAULT_ACCELERATED_DRAWING_ENABLED true
+#define DEFAULT_CANVAS_USES_ACCELERATED_DRAWING true
+#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(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
+// <https://webkit.org/b/168415> El Capitan NetworkLoadTiming values are sometimes jumbled
+#define DEFAULT_RESOURCE_TIMING_ENABLED false
+#else
+#define DEFAULT_RESOURCE_TIMING_ENABLED true
+#endif
+
+#if PLATFORM(COCOA)
+#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)
+
+#define DEFAULT_STANDARD_FONT_FAMILY "Times"
+#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)
+#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
+
+// Our Xcode build system does not currently have any concept of DEVELOPER_MODE.
+// Cocoa ports must disable experimental features on release branches for now.
+#if ENABLE(DEVELOPER_MODE) || PLATFORM(COCOA)
+#define DEFAULT_EXPERIMENTAL_FEATURES_ENABLED true
+#else
+#define DEFAULT_EXPERIMENTAL_FEATURES_ENABLED false
+#endif
index 57f7d65..81dd083 100644 (file)
                7C4ABED51AA8FCB80088AA37 /* WebCompiledContentRuleListData.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4ABED31AA8FCB80088AA37 /* WebCompiledContentRuleListData.h */; };
                7C6D37FC172F555F009D2847 /* PageBannerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C6D37FA172F555F009D2847 /* PageBannerMac.mm */; };
                7C6E70FB18B2DC7A00F24E2E /* WebProcessCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C6E70F918B2D4A000F24E2E /* WebProcessCocoa.mm */; };
-               7C85FD7C193415A8000177C4 /* WebPreferencesDefinitions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C85FD7B193415A8000177C4 /* WebPreferencesDefinitions.h */; };
                7C85FD7F19341665000177C4 /* WebPreferencesKeys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C85FD7D19341665000177C4 /* WebPreferencesKeys.cpp */; };
                7C85FD8019341665000177C4 /* WebPreferencesKeys.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C85FD7E19341665000177C4 /* WebPreferencesKeys.h */; };
                7C882DF71C7E9965006BF731 /* _WKUserContentWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C882DF31C7E995E006BF731 /* _WKUserContentWorld.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7C4ED3271A3119D90079BD49 /* InjectedBundleCSSStyleDeclarationHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundleCSSStyleDeclarationHandle.h; sourceTree = "<group>"; };
                7C6D37FA172F555F009D2847 /* PageBannerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PageBannerMac.mm; sourceTree = "<group>"; };
                7C6E70F918B2D4A000F24E2E /* WebProcessCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebProcessCocoa.mm; sourceTree = "<group>"; };
-               7C85FD7B193415A8000177C4 /* WebPreferencesDefinitions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPreferencesDefinitions.h; sourceTree = "<group>"; };
                7C85FD7D19341665000177C4 /* WebPreferencesKeys.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPreferencesKeys.cpp; sourceTree = "<group>"; };
                7C85FD7E19341665000177C4 /* WebPreferencesKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPreferencesKeys.h; sourceTree = "<group>"; };
                7C882DF31C7E995E006BF731 /* _WKUserContentWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKUserContentWorld.h; 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 /* WebPreferencesDefinitionsBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPreferencesDefinitionsBase.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 = WebPreferencesDefinitions.h; sourceTree = "<group>"; };
                7CE4D2061A46775700C7F152 /* APILegacyContextHistoryClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APILegacyContextHistoryClient.h; sourceTree = "<group>"; };
                7CE4D2151A49148400C7F152 /* WebProcessPoolCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebProcessPoolCocoa.mm; sourceTree = "<group>"; };
                7CE4D2171A4914A300C7F152 /* WebProcessPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebProcessPool.cpp; sourceTree = "<group>"; };
                                C0337DDC127A521C008FF4F4 /* WebPlatformTouchPoint.cpp */,
                                BC5744ED12638FB3006F0F12 /* WebPopupItem.cpp */,
                                BC5744EE12638FB3006F0F12 /* WebPopupItem.h */,
-                               7C85FD7B193415A8000177C4 /* WebPreferencesDefinitions.h */,
+                               7CDE739F1F9DA37A00390312 /* WebPreferences.yaml */,
+                               7CDE73A01F9DA37B00390312 /* WebPreferencesDefinitionsBase.h */,
                                7C85FD7D19341665000177C4 /* WebPreferencesKeys.cpp */,
                                7C85FD7E19341665000177C4 /* WebPreferencesKeys.h */,
                                BCD598AB112B7FDF00EC8C23 /* WebPreferencesStore.cpp */,
                                1AB1F7931D1B3613007C9BD1 /* WebPaymentCoordinatorMessages.h */,
                                1AB1F7941D1B3613007C9BD1 /* WebPaymentCoordinatorProxyMessageReceiver.cpp */,
                                1AB1F7951D1B3613007C9BD1 /* WebPaymentCoordinatorProxyMessages.h */,
+                               7CDE73A31F9DAB6500390312 /* WebPreferencesDefinitions.h */,
                                1A043F6712514D8B00FFBFB5 /* WebProcessConnectionMessageReceiver.cpp */,
                                1A043F6812514D8B00FFBFB5 /* WebProcessConnectionMessages.h */,
                                BC3066BC125A442100E71278 /* WebProcessMessageReceiver.cpp */,
                C0CE73351247F70E00BC0EC4 /* Scripts */ = {
                        isa = PBXGroup;
                        children = (
+                               7CDE73A21F9DA59700390312 /* PreferencesTemplates */,
                                0FC0856E187CE0A900780D86 /* __init__.py */,
                                C0CE73361247F70E00BC0EC4 /* generate-message-receiver.py */,
                                C0CE73371247F70E00BC0EC4 /* generate-messages-header.py */,
+                               7CDE73A11F9DA41400390312 /* GeneratePreferences.rb */,
                                0FC0856F187CE0A900780D86 /* messages.py */,
                                0FC08570187CE0A900780D86 /* model.py */,
                                0FC08571187CE0A900780D86 /* parser.py */,
                                BC574E631267D080006F0F12 /* WebPopupMenuProxy.h in Headers */,
                                BC5750971268F3C6006F0F12 /* WebPopupMenuProxyMac.h in Headers */,
                                BCD597FF112B57BE00EC8C23 /* WebPreferences.h in Headers */,
-                               7C85FD7C193415A8000177C4 /* WebPreferencesDefinitions.h in Headers */,
                                7C85FD8019341665000177C4 /* WebPreferencesKeys.h in Headers */,
                                BCD598AC112B7FDF00EC8C23 /* WebPreferencesStore.h in Headers */,
                                A1C512C9190656E500448914 /* WebPreviewLoaderClient.h in Headers */,