Title: [269308] trunk/Source/WebCore
Revision
269308
Author
wei...@apple.com
Date
2020-11-03 09:20:23 -0800 (Tue, 03 Nov 2020)

Log Message

Convert Settings.yaml to match the rough schema of the WebPreferences*.yaml files as a first step toward merging them
https://bugs.webkit.org/show_bug.cgi?id=218428

Reviewed by Darin Adler.

As the first step toward merging Settings.yaml into the WebPreferences*.yaml files
update Settings.yaml better match. This includes:

- Fix key names start with capital letters.
- A 'type' is now required (no more defaulting to bool)
- 'initial' is renamed to defaultValue and gains the same per-frontend structure.
  This also means we can use PLATFORM() specific default values now rather than
  requiring the SettingsDefaults.h header, though this patch does not take advantage
  of that yet.
- 'type' must now be 'bool', 'double', 'uint32_t' or 'String'. A new refinedType allows
  Settings to maintain the more explicit enum types / URL types.
- Moves comments into the data structure to make it possible to keep them when
  manipulating the yaml programatically.
- Use webcore prefix for webcore specific keys.
- Replace single textAutosizingWindowSizeOverride preference which used an IntSize
  with TextAutosizingWindowSizeOverrideHeight and TextAutosizingWindowSizeOverrideWidth
  which are representable by one of the core types.

* Scripts/GenerateSettings.rb:
* Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb:
* Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb:
* Scripts/SettingsTemplates/Settings.cpp.erb:
* Scripts/SettingsTemplates/Settings.h.erb:
* WebCore.xcodeproj/project.pbxproj:
* page/FrameViewLayoutContext.cpp:
(WebCore::FrameViewLayoutContext::applyTextSizingIfNeeded):
* page/Settings.yaml:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setTextAutosizingWindowSizeOverride):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (269307 => 269308)


--- trunk/Source/WebCore/ChangeLog	2020-11-03 17:14:34 UTC (rev 269307)
+++ trunk/Source/WebCore/ChangeLog	2020-11-03 17:20:23 UTC (rev 269308)
@@ -1,3 +1,42 @@
+2020-11-03  Sam Weinig  <wei...@apple.com>
+
+        Convert Settings.yaml to match the rough schema of the WebPreferences*.yaml files as a first step toward merging them
+        https://bugs.webkit.org/show_bug.cgi?id=218428
+
+        Reviewed by Darin Adler.
+
+        As the first step toward merging Settings.yaml into the WebPreferences*.yaml files
+        update Settings.yaml better match. This includes:
+        
+        - Fix key names start with capital letters.
+        - A 'type' is now required (no more defaulting to bool)
+        - 'initial' is renamed to defaultValue and gains the same per-frontend structure.
+          This also means we can use PLATFORM() specific default values now rather than
+          requiring the SettingsDefaults.h header, though this patch does not take advantage
+          of that yet.
+        - 'type' must now be 'bool', 'double', 'uint32_t' or 'String'. A new refinedType allows
+          Settings to maintain the more explicit enum types / URL types.
+        - Moves comments into the data structure to make it possible to keep them when
+          manipulating the yaml programatically.
+        - Use webcore prefix for webcore specific keys.
+        - Replace single textAutosizingWindowSizeOverride preference which used an IntSize
+          with TextAutosizingWindowSizeOverrideHeight and TextAutosizingWindowSizeOverrideWidth
+          which are representable by one of the core types.
+
+        * Scripts/GenerateSettings.rb:
+        * Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb:
+        * Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb:
+        * Scripts/SettingsTemplates/Settings.cpp.erb:
+        * Scripts/SettingsTemplates/Settings.h.erb:
+        * WebCore.xcodeproj/project.pbxproj:
+        * page/FrameViewLayoutContext.cpp:
+        (WebCore::FrameViewLayoutContext::applyTextSizingIfNeeded):
+        * page/Settings.yaml:
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::Backup::Backup):
+        (WebCore::InternalSettings::Backup::restoreTo):
+        (WebCore::InternalSettings::setTextAutosizingWindowSizeOverride):
+
 2020-11-03  Antti Koivisto  <an...@apple.com>
 
         [LFC][Integration] RenderText::absoluteQuads should use iterator

Modified: trunk/Source/WebCore/Scripts/GenerateSettings.rb (269307 => 269308)


--- trunk/Source/WebCore/Scripts/GenerateSettings.rb	2020-11-03 17:14:34 UTC (rev 269307)
+++ trunk/Source/WebCore/Scripts/GenerateSettings.rb	2020-11-03 17:20:23 UTC (rev 269308)
@@ -37,16 +37,16 @@
   :outputDirectory => nil
 }
 optparse = OptionParser.new do |opts|
-    opts.banner = "Usage: #{File.basename($0)} --input file"
+  opts.banner = "Usage: #{File.basename($0)} --input file"
 
-    opts.separator ""
+  opts.separator ""
 
-    opts.on("--additionalSettings input", "file to generate settings from") { |additionalSettings| options[:additionalSettings] = additionalSettings }
-    opts.on("--base input", "file to generate settings from") { |basePreferences| options[:basePreferences] = basePreferences }
-    opts.on("--debug input", "file to generate debug settings from") { |debugPreferences| options[:debugPreferences] = debugPreferences }
-    opts.on("--experimental input", "file to generate experimental settings from") { |experimentalPreferences| options[:experimentalPreferences] = experimentalPreferences }
-    opts.on("--internal input", "file to generate internal settings from") { |internalPreferences| options[:internalPreferences] = internalPreferences }
-    opts.on("--outputDir output", "directory to generate file in") { |output| options[:outputDirectory] = output }
+  opts.on("--base input", "file to generate settings from") { |basePreferences| options[:basePreferences] = basePreferences }
+  opts.on("--debug input", "file to generate debug settings from") { |debugPreferences| options[:debugPreferences] = debugPreferences }
+  opts.on("--experimental input", "file to generate experimental settings from") { |experimentalPreferences| options[:experimentalPreferences] = experimentalPreferences }
+  opts.on("--internal input", "file to generate internal settings from") { |internalPreferences| options[:internalPreferences] = internalPreferences }
+  opts.on("--additionalSettings input", "file to generate settings from") { |additionalSettings| options[:additionalSettings] = additionalSettings }
+  opts.on("--outputDir output", "directory to generate file in") { |output| options[:outputDirectory] = output }
 end
 
 optparse.parse!
@@ -96,13 +96,13 @@
 parsedPreferences.merge!(load(options[:internalPreferences]))
 
 
-class SettingFromWebPreferences
+class Setting
   attr_accessor :name
   attr_accessor :options
   attr_accessor :type
-  attr_accessor :initial
+  attr_accessor :defaultValues
   attr_accessor :excludeFromInternalSettings
-  attr_accessor :conditional
+  attr_accessor :condition
   attr_accessor :onChange
   attr_accessor :getter
   attr_accessor :inspectorOverride
@@ -111,10 +111,10 @@
   def initialize(name, options)
     @name = normalizeNameForWebCore(name, options)
     @options = options
-    @type = options["type"]
-    @initial = options["defaultValue"]["WebCore"]["default"]
+    @type = options["refinedType"] || options["type"]
+    @defaultValues = options["defaultValue"]["WebCore"]
     @excludeFromInternalSettings = options["webcoreExcludeFromInternalSettings"] || false
-    @conditional = options["condition"]
+    @condition = options["condition"]
     @_onChange_ = options["webcoreOnChange"]
     @getter = options["webcoreGetter"]
     @inspectorOverride = options["inspectorOverride"]
@@ -152,7 +152,7 @@
     elsif @type == "bool"
       "boolean"
     else
-      nil
+      return nil
     end
   end
 
@@ -189,83 +189,6 @@
   end
 end
 
-
-class SettingFromWebCore
-  attr_accessor :name
-  attr_accessor :options
-  attr_accessor :type
-  attr_accessor :initial
-  attr_accessor :excludeFromInternalSettings
-  attr_accessor :conditional
-  attr_accessor :onChange
-  attr_accessor :getter
-  attr_accessor :inspectorOverride
-  attr_accessor :customImplementation
-  
-  def initialize(name, options)
-    @name = name
-    @options = options
-    @type = options["type"] || "bool"
-    @initial = options["initial"]
-    @excludeFromInternalSettings = options["excludeFromInternalSettings"] || false
-    @conditional = options["conditional"]
-    @_onChange_ = options["onChange"]
-    @getter = options["getter"]
-    @inspectorOverride = options["inspectorOverride"]
-  end
-
-  def valueType?
-    @type != "String" && @type != "URL"
-  end
-
-  def idlType
-    # FIXME: Add support for more types including enum types.
-    if @type == "uint32_t"
-      "unsigned long"
-    elsif @type == "double"
-      "double"
-    elsif @type == "String"
-      "DOMString"
-    elsif @type == "bool"
-      "boolean"
-    else
-      nil
-    end
-  end
-
-  def parameterType
-    if valueType?
-      @type
-    else
-      "const #{@type}&"
-    end
-  end
-
-  def hasComplexSetter?
-    @onChange != nil
-  end
-
-  def hasComplexGetter?
-    hasInspectorOverride?
-  end
-
-  def setterFunctionName
-    if @name.start_with?("css", "xss", "ftp", "dom", "dns", "ice", "hdr")
-      "set" + @name[0..2].upcase + @name[3..@name.length]
-    else
-      "set" + @name[0].upcase + @name[1..@name.length]
-    end
-  end
-
-  def getterFunctionName
-    @getter || @name
-  end
-
-  def hasInspectorOverride?
-    @inspectorOverride == true
-  end
-end
-
 class Conditional
   attr_accessor :condition
   attr_accessor :settings
@@ -302,7 +225,7 @@
 class SettingSet
   attr_accessor :settings
   attr_accessor :inspectorOverrideSettings
-  attr_accessor :conditionals
+  attr_accessor :conditions
 
   def initialize(settings)
     @settings = settings
@@ -310,22 +233,22 @@
 
     @inspectorOverrideSettings = @settings.select { |setting| setting.hasInspectorOverride? }
 
-    @conditionals = []
-    conditionalsMap = {}
-    @settings.select { |setting| setting.conditional }.each do |setting|
-      if !conditionalsMap[setting.conditional]
-        conditionalsMap[setting.conditional] = []
+    @conditions = []
+    conditionsMap = {}
+    @settings.select { |setting| setting.condition }.each do |setting|
+      if !conditionsMap[setting.condition]
+        conditionsMap[setting.condition] = []
       end
 
-      conditionalsMap[setting.conditional] << setting
+      conditionsMap[setting.condition] << setting
     end
-    conditionalsMap.each do |key, value|
-      @conditionals << Conditional.new(key, value)
+    conditionsMap.each do |key, value|
+      @conditions << Conditional.new(key, value)
     end
-    @conditionals.sort! { |x, y| x.condition <=> y.condition }
+    @conditions.sort! { |x, y| x.condition <=> y.condition }
 
-    # We also add the unconditional settings as the first element in the conditional array.
-    @conditionals.unshift(Conditional.new(nil, @settings.reject { |setting| setting.conditional }))
+    # We also add the unconditional settings as the first element in the conditions array.
+    @conditions.unshift(Conditional.new(nil, @settings.reject { |setting| setting.condition }))
   end
 end
 
@@ -333,20 +256,19 @@
   attr_accessor :allSettingsSet
   
   def initialize(parsedSettingsFromWebCore, parsedSettingsFromWebPreferences)
-    settingsFromWebPreferences = []
+    settings = []
     parsedSettingsFromWebPreferences.each do |name, options|
       # An empty "webcoreBinding" entry indicates this preference uses the default, which is bound to Settings.
       if !options["webcoreBinding"]
-        settingsFromWebPreferences << SettingFromWebPreferences.new(name, options)
+        settings << Setting.new(name, options)
       end
     end
 
-    settingsFromWebCore = []
     parsedSettingsFromWebCore.each do |name, options|
-      settingsFromWebCore << SettingFromWebCore.new(name, options)
+      settings << Setting.new(name, options)
     end
 
-    @allSettingsSet = SettingSet.new(settingsFromWebPreferences + settingsFromWebCore)
+    @allSettingsSet = SettingSet.new(settings)
   end
 
   def renderToFile(template, file)

Modified: trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb (269307 => 269308)


--- trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb	2020-11-03 17:14:34 UTC (rev 269307)
+++ trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb	2020-11-03 17:20:23 UTC (rev 269308)
@@ -37,11 +37,11 @@
     : m_page(page)
 <%- for @setting in @allSettingsSet.settings do -%>
 <%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
-<%- if @setting.conditional -%>
-#if <%= @setting.conditional %>
+<%- if @setting.condition -%>
+#if <%= @setting.condition %>
 <%- end -%>
     , m_<%= @setting.name %>(page->settings().<%= @setting.getterFunctionName %>())
-<%- if @setting.conditional -%>
+<%- if @setting.condition -%>
 #endif
 <%- end -%>
 <%- end -%>
@@ -57,11 +57,11 @@
 {
 <%- for @setting in @allSettingsSet.settings do -%>
 <%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
-<%- if @setting.conditional -%>
-#if <%= @setting.conditional %>
+<%- if @setting.condition -%>
+#if <%= @setting.condition %>
 <%- end -%>
     m_page->settings().<%= @setting.setterFunctionName %>(m_<%= @setting.name %>);
-<%- if @setting.conditional -%>
+<%- if @setting.condition -%>
 #endif
 <%- end -%>
 <%- end -%>
@@ -72,8 +72,8 @@
 <%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
 void InternalSettingsGenerated::<%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>)
 {
-<%- if @setting.conditional -%>
-#if <%= @setting.conditional %>
+<%- if @setting.condition -%>
+#if <%= @setting.condition %>
     m_page->settings().<%= @setting.setterFunctionName %>(<%= @setting.name %>);
 #else
     UNUSED_PARAM(<%= @setting.name %>);

Modified: trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb (269307 => 269308)


--- trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb	2020-11-03 17:14:34 UTC (rev 269307)
+++ trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb	2020-11-03 17:20:23 UTC (rev 269308)
@@ -52,11 +52,11 @@
 
 <%- for @setting in @allSettingsSet.settings do -%>
 <%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
-<%- if @setting.conditional -%>
-#if <%= @setting.conditional %>
+<%- if @setting.condition -%>
+#if <%= @setting.condition %>
 <%- end -%>
     <%= @setting.type %> m_<%= @setting.name %>;
-<%- if @setting.conditional -%>
+<%- if @setting.condition -%>
 #endif
 <%- end -%>
 <%- end -%>

Modified: trunk/Source/WebCore/Scripts/SettingsTemplates/Settings.cpp.erb (269307 => 269308)


--- trunk/Source/WebCore/Scripts/SettingsTemplates/Settings.cpp.erb	2020-11-03 17:14:34 UTC (rev 269307)
+++ trunk/Source/WebCore/Scripts/SettingsTemplates/Settings.cpp.erb	2020-11-03 17:20:23 UTC (rev 269308)
@@ -32,6 +32,32 @@
 #include "Page.h"
 #include "SettingsDefaultValues.h"
 
+// Default values.
+
+<%- for @setting in @allSettingsSet.settings do -%>
+<%-   if @setting.condition -%>
+#if <%= @setting.condition %>
+<%-   end -%>
+<%-   if @setting.defaultValues.size() == 1 -%>
+#define SETTING_DEFAULT_VALUE_FOR_<%= @setting.name %> <%= @setting.defaultValues['default'] %>
+<%-   else -%>
+<%-     @setting.defaultValues.each_with_index do |(key, value), index| -%>
+<%-       if index == 0 -%>
+#if <%= key %>
+<%-       elsif index != @setting.defaultValues.size() - 1 -%>
+#elif <%= key %>
+<%-       else -%>
+#else
+<%-       end -%>
+#define SETTING_DEFAULT_VALUE_FOR_<%= @setting.name %> <%= value %>
+<%-     end -%>
+#endif
+<%-   end -%>
+<%-   if @setting.condition -%>
+#endif
+<%-   end -%>
+<%- end -%>
+
 namespace WebCore {
 
 Ref<Settings> Settings::create(Page* page)
@@ -41,28 +67,28 @@
 
 Settings::Settings(Page* page)
     : SettingsBase(page)
-<%- for @conditional in @allSettingsSet.conditionals do -%>
-<%- if @conditional.nonBoolSettingsNeedingImplementation.length != 0 -%>
-<%- if @conditional.condition -%>
-#if <%= @conditional.condition %>
+<%- for @condition in @allSettingsSet.conditions do -%>
+<%- if @condition.nonBoolSettingsNeedingImplementation.length != 0 -%>
+<%- if @condition.condition -%>
+#if <%= @condition.condition %>
 <%- end -%>
-<%- for @setting in @conditional.nonBoolSettingsNeedingImplementation -%>
-    , m_<%= @setting.name %>(<%= @setting.initial %>)
+<%- for @setting in @condition.nonBoolSettingsNeedingImplementation -%>
+    , m_<%= @setting.name %>(SETTING_DEFAULT_VALUE_FOR_<%= @setting.name %>)
 <%- end -%>
-<%- if @conditional.condition -%>
+<%- if @condition.condition -%>
 #endif
 <%- end -%>
 <%- end -%>
 <%- end -%>
-<%- for @conditional in @allSettingsSet.conditionals do -%>
-<%- if @conditional.boolSettingsNeedingImplementation.length != 0 -%>
-<%- if @conditional.condition -%>
-#if <%= @conditional.condition %>
+<%- for @condition in @allSettingsSet.conditions do -%>
+<%- if @condition.boolSettingsNeedingImplementation.length != 0 -%>
+<%- if @condition.condition -%>
+#if <%= @condition.condition %>
 <%- end -%>
-<%- for @setting in @conditional.boolSettingsNeedingImplementation -%>
-    , m_<%= @setting.name %>(<%= @setting.initial %>)
+<%- for @setting in @condition.boolSettingsNeedingImplementation -%>
+    , m_<%= @setting.name %>(SETTING_DEFAULT_VALUE_FOR_<%= @setting.name %>)
 <%- end -%>
-<%- if @conditional.condition -%>
+<%- if @condition.condition -%>
 #endif
 <%- end -%>
 <%- end -%>
@@ -75,12 +101,12 @@
 {
 }
 
-<%- for @conditional in @allSettingsSet.conditionals do -%>
-<%- if @conditional.settingsWithComplexGettersNeedingImplementation.length != 0 or @conditional.settingsWithComplexSettersNeedingImplementation.length != 0 -%>
-<%- if @conditional.condition -%>
-#if <%= @conditional.condition %>
+<%- for @condition in @allSettingsSet.conditions do -%>
+<%- if @condition.settingsWithComplexGettersNeedingImplementation.length != 0 or @condition.settingsWithComplexSettersNeedingImplementation.length != 0 -%>
+<%- if @condition.condition -%>
+#if <%= @condition.condition %>
 <%- end -%>
-<%- for @setting in @conditional.settingsWithComplexGettersNeedingImplementation do -%>
+<%- for @setting in @condition.settingsWithComplexGettersNeedingImplementation do -%>
 <%= @setting.parameterType %> Settings::<%= @setting.getterFunctionName %>() const
 {
 <%- if @setting.hasInspectorOverride? -%>
@@ -93,7 +119,7 @@
 }
 <%- end -%>
 
-<%- for @setting in @conditional.settingsWithComplexSettersNeedingImplementation -%>
+<%- for @setting in @condition.settingsWithComplexSettersNeedingImplementation -%>
 void Settings::<%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>)
 {
     if (m_<%= @setting.name %> == <%= @setting.name %>)
@@ -102,7 +128,7 @@
     <%= @setting.onChange %>();
 }
 <%- end -%>
-<%- if @conditional.condition -%>
+<%- if @condition.condition -%>
 #endif
 <%- end -%>
 <%- end -%>
@@ -115,12 +141,12 @@
     if (m_<%= @setting.name %>InspectorOverride == <%= @setting.name %>InspectorOverride)
         return;
     m_<%= @setting.name %>InspectorOverride = <%= @setting.name %>InspectorOverride;
-<%- if @setting.conditional -%>
-#if <%= @setting.conditional %>
+<%- if @setting.condition -%>
+#if <%= @setting.condition %>
 <%- end -%>
     <%= @setting.onChange %>();
-<%- if @setting.conditional -%>
-<%- if @conditional.condition -%>
+<%- if @setting.condition -%>
+<%- if @condition.condition -%>
 #endif
 <%- end -%>
 <%- end -%>

Modified: trunk/Source/WebCore/Scripts/SettingsTemplates/Settings.h.erb (269307 => 269308)


--- trunk/Source/WebCore/Scripts/SettingsTemplates/Settings.h.erb	2020-11-03 17:14:34 UTC (rev 269307)
+++ trunk/Source/WebCore/Scripts/SettingsTemplates/Settings.h.erb	2020-11-03 17:20:23 UTC (rev 269308)
@@ -40,11 +40,11 @@
     WEBCORE_EXPORT static Ref<Settings> create(Page*);
     WEBCORE_EXPORT ~Settings();
 
-<%- for @conditional in @allSettingsSet.conditionals do -%>
-<%- if @conditional.condition -%>
-#if <%= @conditional.condition %>
+<%- for @condition in @allSettingsSet.conditions do -%>
+<%- if @condition.condition -%>
+#if <%= @condition.condition %>
 <%- end -%>
-<%- for @setting in @conditional.settingsNeedingImplementation do -%>
+<%- for @setting in @condition.settingsNeedingImplementation do -%>
     <%- if @setting.hasComplexGetter? -%>
     WEBCORE_EXPORT <%= @setting.parameterType %> <%= @setting.getterFunctionName %>() const;
     <%- else -%>
@@ -56,7 +56,7 @@
     void <%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>) { m_<%= @setting.name %> = <%= @setting.name %>; }
     <%- end -%>
 <%- end -%>
-<%- if @conditional.condition -%>
+<%- if @condition.condition -%>
 #endif
 <%- end -%>
 <%- end -%>
@@ -76,29 +76,29 @@
     Optional<<%= @setting.type %>> m_<%= @setting.name %>InspectorOverride;
 <%- end -%>
 
-<%- for @conditional in @allSettingsSet.conditionals do -%>
-<%- if @conditional.nonBoolSettingsNeedingImplementation.length != 0 -%>
-<%- if @conditional.condition -%>
-#if <%= @conditional.condition %>
+<%- for @condition in @allSettingsSet.conditions do -%>
+<%- if @condition.nonBoolSettingsNeedingImplementation.length != 0 -%>
+<%- if @condition.condition -%>
+#if <%= @condition.condition %>
 <%- end -%>
-<%- for @setting in @conditional.nonBoolSettingsNeedingImplementation -%>
+<%- for @setting in @condition.nonBoolSettingsNeedingImplementation -%>
     <%= @setting.type %> m_<%= @setting.name %>;
 <%- end -%>
-<%- if @conditional.condition -%>
+<%- if @condition.condition -%>
 #endif
 <%- end -%>
 <%- end -%>
 <%- end -%>
 
-<%- for @conditional in @allSettingsSet.conditionals do -%>
-<%- if @conditional.boolSettingsNeedingImplementation.length != 0 -%>
-<%- if @conditional.condition -%>
-#if <%= @conditional.condition %>
+<%- for @condition in @allSettingsSet.conditions do -%>
+<%- if @condition.boolSettingsNeedingImplementation.length != 0 -%>
+<%- if @condition.condition -%>
+#if <%= @condition.condition %>
 <%- end -%>
-<%- for @setting in @conditional.boolSettingsNeedingImplementation -%>
+<%- for @setting in @condition.boolSettingsNeedingImplementation -%>
     <%= @setting.type %> m_<%= @setting.name %> : 1;
 <%- end -%>
-<%- if @conditional.condition -%>
+<%- if @condition.condition -%>
 #endif
 <%- end -%>
 <%- end -%>

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (269307 => 269308)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-11-03 17:14:34 UTC (rev 269307)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-11-03 17:20:23 UTC (rev 269308)
@@ -10464,7 +10464,7 @@
 		7CD70C4624A28CD700E61040 /* SVGTransformList.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SVGTransformList.cpp; sourceTree = "<group>"; };
 		7CDA7912250E88F0007D1B36 /* InnerHTML.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = InnerHTML.idl; sourceTree = "<group>"; };
 		7CDA7919250E8C92007D1B36 /* Element+DOMParsing.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Element+DOMParsing.idl"; sourceTree = "<group>"; };
-		7CDE73961F9BD59500390312 /* Settings.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Settings.yaml; sourceTree = "<group>"; };
+		7CDE73961F9BD59500390312 /* Settings.yaml */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; path = Settings.yaml; sourceTree = "<group>"; tabWidth = 2; };
 		7CDE8EBC1F193BC500168FE7 /* CSSStyleDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSStyleDeclaration.cpp; sourceTree = "<group>"; };
 		7CE191471F2A98AF00272F78 /* FetchRequestInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FetchRequestInit.h; sourceTree = "<group>"; };
 		7CE191491F2A98B000272F78 /* FetchRequestInit.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FetchRequestInit.idl; sourceTree = "<group>"; };

Modified: trunk/Source/WebCore/page/FrameViewLayoutContext.cpp (269307 => 269308)


--- trunk/Source/WebCore/page/FrameViewLayoutContext.cpp	2020-11-03 17:14:34 UTC (rev 269307)
+++ trunk/Source/WebCore/page/FrameViewLayoutContext.cpp	2020-11-03 17:20:23 UTC (rev 269308)
@@ -513,7 +513,7 @@
     if (!idempotentMode && !minimumZoomFontSize)
         return;
     auto textAutosizingWidth = layoutRoot.page().textAutosizingWidth();
-    if (auto overrideWidth = settings.textAutosizingWindowSizeOverride().width())
+    if (auto overrideWidth = settings.textAutosizingWindowSizeOverrideWidth())
         textAutosizingWidth = overrideWidth;
     if (!idempotentMode && !textAutosizingWidth)
         return;

Modified: trunk/Source/WebCore/page/Settings.yaml (269307 => 269308)


--- trunk/Source/WebCore/page/Settings.yaml	2020-11-03 17:14:34 UTC (rev 269307)
+++ trunk/Source/WebCore/page/Settings.yaml	2020-11-03 17:20:23 UTC (rev 269308)
@@ -22,419 +22,759 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 # THE POSSIBILITY OF SUCH DAMAGE.
 
-acceleratedCompositedAnimationsEnabled:
-  initial: true
-  onChange: setNeedsRecalcStyleInAllFrames
+AcceleratedCompositedAnimationsEnabled:
+  type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
+  defaultValue:
+    WebCore:
+      default: true
 
-acceleratedCompositingForFixedPositionEnabled:
-  initial: defaultAcceleratedCompositingForFixedPositionEnabled
+AcceleratedCompositingForFixedPositionEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: defaultAcceleratedCompositingForFixedPositionEnabled
 
-acceleratedFiltersEnabled:
-  initial: false
+AcceleratedFiltersEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-allowContentSecurityPolicySourceStarToMatchAnyProtocol:
-  initial: false
+AllowContentSecurityPolicySourceStarToMatchAnyProtocol:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-allowDisplayOfInsecureContent:
-  initial: false
+AllowDisplayOfInsecureContent:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-allowRunningOfInsecureContent:
-  initial: false
+AllowRunningOfInsecureContent:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-animatedImageDebugCanvasDrawingEnabled:
-  initial: false
+AnimatedImageDebugCanvasDrawingEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-appleMailPaginationQuirkEnabled:
-  initial: false
+AppleMailPaginationQuirkEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-audioPlaybackRequiresUserGesture:
-  initial: defaultAudioPlaybackRequiresUserGesture
+AudioPlaybackRequiresUserGesture:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: defaultAudioPlaybackRequiresUserGesture
 
-autoscrollForDragAndDropEnabled:
-  initial: false
+AutoscrollForDragAndDropEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-backForwardCacheExpirationInterval:
-  type: Seconds
-  initial: 30_min
+BackForwardCacheExpirationInterval:
+  type: double
+  refinedType: Seconds
+  defaultValue:
+    WebCore:
+      default: 30_min
 
-backgroundShouldExtendBeyondPage:
-  initial: false
-  onChange: backgroundShouldExtendBeyondPageChanged
+BackgroundShouldExtendBeyondPage:
+  type: bool
+  webcoreOnChange: backgroundShouldExtendBeyondPageChanged
+  defaultValue:
+    WebCore:
+      default: false
 
-clientCoordinatesRelativeToLayoutViewport:
-  initial: false
-  onChange: setNeedsRecalcStyleInAllFrames
+ClientCoordinatesRelativeToLayoutViewport:
+  type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
+  defaultValue:
+    WebCore:
+      default: false
 
-clipboardAccessPolicy:
-  type: ClipboardAccessPolicy
-  initial: ClipboardAccessPolicy::RequiresUserGesture
+ClipboardAccessPolicy:
+  type: uint32_t
+  refinedType: ClipboardAccessPolicy
+  defaultValue:
+    WebCore:
+      default: ClipboardAccessPolicy::RequiresUserGesture
 
-# Some ports (e.g. iOS) might choose to display attachments inline, regardless of whether the response includes the
-# HTTP header "Content-Disposition: attachment". This setting enables a sandbox around these attachments. The sandbox
-# enforces all frame sandbox flags (see enum SandboxFlag in SecurityContext.h), and also disables <meta http-equiv>
-# processing and subframe loading.
-contentDispositionAttachmentSandboxEnabled:
-  initial: false
+ContentDispositionAttachmentSandboxEnabled:
+  comment: >-
+    Some ports (e.g. iOS) might choose to display attachments inline, regardless of whether the
+    response includes the HTTP header \"Content-Disposition: attachment\". This setting enables
+    a sandbox around these attachments. The sandbox enforces all frame sandbox flags (see enum
+    SandboxFlag in SecurityContext.h), and also disables <meta http-equiv> processing and subframe
+    loading.
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-crossOriginCheckInGetMatchedCSSRulesDisabled:
-  initial: false
+CrossOriginCheckInGetMatchedCSSRulesDisabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-dataDetectorTypes:
-  type: DataDetectorTypes
-  initial:
-  conditional: ENABLE(DATA_DETECTION)
+DataDetectorTypes:
+  type: uint32_t
+  refinedType: DataDetectorTypes
+  condition: ENABLE(DATA_DETECTION)
+  defaultValue:
+    WebCore:
+      default:
 
-# Some apps could have a default video poster if it is not set.
-defaultVideoPosterURL:
+DefaultVideoPosterURL:
+  comment: >-
+    Some apps could have a default video poster if it is not set.
   type: String
+  defaultValue:
+    WebCore:
+      default:
 
-disableScreenSizeOverride:
-  initial: false
+DisableScreenSizeOverride:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-# FIXME: This should really be disabled by default as it makes platforms that don't support the feature download files
-# they can't use by. Leaving enabled for now to not change existing behavior.
-downloadableBinaryFontsEnabled:
-  initial: defaultDownloadableBinaryFontsEnabled()
+DownloadableBinaryFontsEnabled:
+  comment: >-
+    FIXME: This should really be disabled by default as it makes platforms that don't support the
+    feature download files they can't use by. Leaving enabled for now to not change existing behavior.
+  type: bool
+  defaultValue:
+    WebCore:
+      default: defaultDownloadableBinaryFontsEnabled()
 
-editableLinkBehavior:
-  type: EditableLinkBehavior
-  initial: EditableLinkDefaultBehavior
+EditableLinkBehavior:
+  type: uint32_t
+  refinedType: EditableLinkBehavior
+  defaultValue:
+    WebCore:
+      default: EditableLinkDefaultBehavior
 
-editingBehaviorType:
-  type: EditingBehaviorType
-  initial: editingBehaviorTypeForPlatform()
+EditingBehaviorType:
+  type: uint32_t
+  refinedType: EditingBehaviorType
+  defaultValue:
+    WebCore:
+      default: editingBehaviorTypeForPlatform()
 
-enforceCSSMIMETypeInNoQuirksMode:
-  initial: true
+EnforceCSSMIMETypeInNoQuirksMode:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: true
 
-experimentalNotificationsEnabled:
-  initial: false
+ExperimentalNotificationsEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-fixedBackgroundsPaintRelativeToDocument:
-  initial: defaultFixedBackgroundsPaintRelativeToDocument
+FixedBackgroundsPaintRelativeToDocument:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: defaultFixedBackgroundsPaintRelativeToDocument
 
-fixedElementsLayoutRelativeToFrame:
-  initial: false
+FixedElementsLayoutRelativeToFrame:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-fontFallbackPrefersPictographs:
-  initial: false
-  onChange: setNeedsRecalcStyleInAllFrames
+FontFallbackPrefersPictographs:
+  type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
+  defaultValue:
+    WebCore:
+      default: false
 
-fontLoadTimingOverride:
-  type: FontLoadTimingOverride
-  initial: FontLoadTimingOverride::None
+FontLoadTimingOverride:
+  type: uint32_t
+  refinedType: FontLoadTimingOverride
+  defaultValue:
+    WebCore:
+      default: FontLoadTimingOverride::None
 
-fontRenderingMode:
-  type: FontRenderingMode
-  initial: FontRenderingMode::Normal
+FontRenderingMode:
+  type: uint32_t
+  refinedType: FontRenderingMode
+  defaultValue:
+    WebCore:
+      default: FontRenderingMode::Normal
 
-forceCompositingMode:
-  initial: false
+ForceCompositingMode:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-forcePendingWebGLPolicy:
-  initial: false
-  getter: isForcePendingWebGLPolicy
+ForcePendingWebGLPolicy:
+  type: bool
+  webcoreGetter: isForcePendingWebGLPolicy
+  defaultValue:
+    WebCore:
+      default: false
 
-forceWebGLUsesLowPower:
-  initial: false
+ForceWebGLUsesLowPower:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-forcedColorsAreInvertedAccessibilityValue:
-  type: ForcedAccessibilityValue
-  initial: defaultForcedColorsAreInvertedAccessibilityValue
+ForcedColorsAreInvertedAccessibilityValue:
+  type: uint32_t
+  refinedType: ForcedAccessibilityValue
+  defaultValue:
+    WebCore:
+      default: defaultForcedColorsAreInvertedAccessibilityValue
 
-forcedDisplayIsMonochromeAccessibilityValue:
-  type: ForcedAccessibilityValue
-  initial: defaultForcedDisplayIsMonochromeAccessibilityValue
+ForcedDisplayIsMonochromeAccessibilityValue:
+  type: uint32_t
+  refinedType: ForcedAccessibilityValue
+  defaultValue:
+    WebCore:
+      default: defaultForcedDisplayIsMonochromeAccessibilityValue
 
-forcedPrefersReducedMotionAccessibilityValue:
-  type: ForcedAccessibilityValue
-  initial: defaultForcedPrefersReducedMotionAccessibilityValue
+ForcedPrefersReducedMotionAccessibilityValue:
+  type: uint32_t
+  refinedType: ForcedAccessibilityValue
+  defaultValue:
+    WebCore:
+      default: defaultForcedPrefersReducedMotionAccessibilityValue
 
-forcedSupportsHighDynamicRangeValue:
-  type: ForcedAccessibilityValue
-  initial: defaultForcedSupportsHighDynamicRangeValue
-  onChange: setNeedsRecalcStyleInAllFrames
+ForcedSupportsHighDynamicRangeValue:
+  type: uint32_t
+  refinedType: ForcedAccessibilityValue
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
+  defaultValue:
+    WebCore:
+      default: defaultForcedSupportsHighDynamicRangeValue
 
-frameFlattening:
-  type: FrameFlattening
-  initial: FrameFlattening::Disabled
-  onChange: setNeedsRelayoutAllFrames
+FrameFlattening:
+  type: uint32_t
+  refinedType: FrameFlattening
+  webcoreOnChange: setNeedsRelayoutAllFrames
+  defaultValue:
+    WebCore:
+      default: FrameFlattening::Disabled
 
-geolocationFloorLevelEnabled:
-  initial: true
+GeolocationFloorLevelEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: true
 
-idempotentModeAutosizingOnlyHonorsPercentages:
-  initial: false
-  conditional: ENABLE(TEXT_AUTOSIZING)
+IdempotentModeAutosizingOnlyHonorsPercentages:
+  type: bool
+  condition: ENABLE(TEXT_AUTOSIZING)
+  defaultValue:
+    WebCore:
+      default: false
 
-imageSubsamplingEnabled:
-  initial: defaultImageSubsamplingEnabled
+ImageSubsamplingEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: defaultImageSubsamplingEnabled
 
-imagesEnabled:
-  initial: true
-  getter: areImagesEnabled
-  onChange: imagesEnabledChanged
+ImagesEnabled:
+  type: bool
+  webcoreGetter: areImagesEnabled
+  webcoreOnChange: imagesEnabledChanged
   inspectorOverride: true
+  defaultValue:
+    WebCore:
+      default: true
 
-isAccessibilityIsolatedTreeEnabled:
-  initial: false
+IsAccessibilityIsolatedTreeEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-isPerActivityStateCPUUsageMeasurementEnabled:
-  initial: defaultPerActivityStateCPUUsageMeasurementEnabled
+IsPerActivityStateCPUUsageMeasurementEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: defaultPerActivityStateCPUUsageMeasurementEnabled
 
-isPostBackgroundingCPUUsageMeasurementEnabled:
-  initial: defaultPostBackgroundingCPUUsageMeasurementEnabled
+IsPostBackgroundingCPUUsageMeasurementEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: defaultPostBackgroundingCPUUsageMeasurementEnabled
 
-isPostBackgroundingMemoryUsageMeasurementEnabled:
-  initial: defaultPostBackgroundingMemoryUsageMeasurementEnabled
+IsPostBackgroundingMemoryUsageMeasurementEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: defaultPostBackgroundingMemoryUsageMeasurementEnabled
 
-isPostLoadCPUUsageMeasurementEnabled:
-  initial: defaultPostLoadCPUUsageMeasurementEnabled
+IsPostLoadCPUUsageMeasurementEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: defaultPostLoadCPUUsageMeasurementEnabled
 
-isPostLoadMemoryUsageMeasurementEnabled:
-  initial: defaultPostLoadMemoryUsageMeasurementEnabled
+IsPostLoadMemoryUsageMeasurementEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: defaultPostLoadMemoryUsageMeasurementEnabled
 
-_javascript_RuntimeFlags:
-  type: JSC::RuntimeFlags
+_javascript_RuntimeFlags:
+  type: uint32_t
+  refinedType: JSC::RuntimeFlags
+  defaultValue:
+    WebCore:
+      default:
 
-langAttributeAwareFormControlUIEnabled:
-  initial: false
+LangAttributeAwareFormControlUIEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-# FIMXE: This does not appear to ever be set to true. Remove once verified.
-legacyBeforeLoadEventEnabled:
-  initial: false
+LegacyBeforeLoadEventEnabled:
+  comment: >-
+    FIMXE: This does not appear to ever be set to true. Remove once verified.
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-loadDeferringEnabled:
-  initial: true
+LoadDeferringEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: true
 
-localStorageDatabasePath:
+LocalStorageDatabasePath:
   type: String
+  defaultValue:
+    WebCore:
+      default:
 
-maximumAccelerated2dCanvasSize:
+MaximumAccelerated2dCanvasSize:
   type: uint32_t
-  initial: 5120*2880
+  defaultValue:
+    WebCore:
+      default: 5120*2880
 
-maximumHTMLParserDOMTreeDepth:
+MaximumHTMLParserDOMTreeDepth:
   type: uint32_t
-  initial: defaultMaximumHTMLParserDOMTreeDepth
+  defaultValue:
+    WebCore:
+      default: defaultMaximumHTMLParserDOMTreeDepth
 
-maximumPlugInSnapshotAttempts:
+MaximumPlugInSnapshotAttempts:
   type: uint32_t
-  initial: 20
+  defaultValue:
+    WebCore:
+      default: 20
 
-# Allow SourceBuffers to store up to 304MB each, enough for approximately five minutes
-# of 1080p video and stereo audio.
-maximumSourceBufferSize:
+MaximumSourceBufferSize:
+  comment: >-
+    Allow SourceBuffers to store up to 304MB each, enough for approximately five minutes
+    of 1080p video and stereo audio.
   type: uint32_t
-  initial: 318767104
-  conditional: ENABLE(MEDIA_SOURCE)
+  condition: ENABLE(MEDIA_SOURCE)
+  defaultValue:
+    WebCore:
+      default: 318767104
 
-mediaDeviceIdentifierStorageDirectory:
+MediaDeviceIdentifierStorageDirectory:
   type: String
-  conditional: ENABLE(MEDIA_STREAM)
+  condition: ENABLE(MEDIA_STREAM)
+  defaultValue:
+    WebCore:
+      default:
 
-mediaKeysStorageDirectory:
+MediaKeysStorageDirectory:
   type: String
+  defaultValue:
+    WebCore:
+      default:
 
-mediaTypeOverride:
+MediaTypeOverride:
   type: String
-  initial: '"screen"'
-  onChange: mediaTypeOverrideChanged
+  webcoreOnChange: mediaTypeOverrideChanged
+  defaultValue:
+    WebCore:
+      default: '"screen"'
 
-# Number of pixels below which 2D canvas is rendered in software
-# even if hardware acceleration is enabled.
-# Hardware acceleration is useful for large canvases where it can avoid the
-# pixel bandwidth between the CPU and GPU. But GPU acceleration comes at
-# a price - extra back-buffer and texture copy. Small canvases are also
-# widely used for stylized fonts. Anti-aliasing text in hardware at that
-# scale is generally slower. So below a certain size it is better to
-# draw canvas in software.
-minimumAccelerated2dCanvasSize:
+MinimumAccelerated2dCanvasSize:
+  comment: >-
+    Number of pixels below which 2D canvas is rendered in software
+    even if hardware acceleration is enabled.
+    Hardware acceleration is useful for large canvases where it can avoid the
+    pixel bandwidth between the CPU and GPU. But GPU acceleration comes at
+    a price - extra back-buffer and texture copy. Small canvases are also
+    widely used for stylized fonts. Anti-aliasing text in hardware at that
+    scale is generally slower. So below a certain size it is better to
+    draw canvas in software.
   type: uint32_t
-  initial: 257*256
+  defaultValue:
+    WebCore:
+      default: 257*256
 
-# FIXME: This quirk is needed because of Radar 4674537 and 5211271. We need to phase it out once Adobe
-# can fix the bug from their end.
-needsAdobeFrameReloadingQuirk:
-  initial: false
-  getter: needsAcrobatFrameReloadingQuirk
+NeedsAdobeFrameReloadingQuirk:
+  comment: >-
+    FIXME: This quirk is needed because of Radar 4674537 and 5211271. We need to phase it
+    out once Adobe can fix the bug from their end.
+  type: bool
+  webcoreGetter: needsAcrobatFrameReloadingQuirk
+  defaultValue:
+    WebCore:
+      default: false
 
-# This is an iOS-specific quirk. Unlike Mac, keyboard operations are asynchronous and hence a DOM update as
-# a result of text insertion or deletion does not occur within the same event loop iteration as a dispatched
-# DOM keydown event. Some sites, notably Google Sheets, schedule timers on keypress and expect on a DOM update
-# to have occurred on expiration. When enabled, this quirk puts all such scheduled timers in a holding tank
-# until the keyboard performs the insertion or deletion. This gives Google Sheets the illusion that the DOM
-# update happened within the same event loop iteration that the keypress event was dispatched in.
-needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommandQuirk:
-  initial: false
+NeedsDeferKeyDownAndKeyPressTimersUntilNextEditingCommandQuirk:
+  comment: >-
+    This is an iOS-specific quirk. Unlike Mac, keyboard operations are asynchronous and hence a DOM update as
+    a result of text insertion or deletion does not occur within the same event loop iteration as a dispatched
+    DOM keydown event. Some sites, notably Google Sheets, schedule timers on keypress and expect on a DOM update
+    to have occurred on expiration. When enabled, this quirk puts all such scheduled timers in a holding tank
+    until the keyboard performs the insertion or deletion. This gives Google Sheets the illusion that the DOM
+    update happened within the same event loop iteration that the keypress event was dispatched in.
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-needsFrameNameFallbackToIdQuirk:
-  initial: false
+NeedsFrameNameFallbackToIdQuirk:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-# Some apps needs isLoadingInAPISense to account for active subresource loaders.
-needsIsLoadingInAPISenseQuirk:
-  initial: false
+NeedsIsLoadingInAPISenseQuirk:
+  comment: >-
+    Some apps needs isLoadingInAPISense to account for active subresource loaders.
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-# This is a quirk we are pro-actively applying to old applications. It changes keyboard event dispatching,
-# making keyIdentifier available on keypress events, making charCode available on keydown/keyup events,
-# and getting keypress dispatched in more cases.
-needsKeyboardEventDisambiguationQuirks:
-  initial: false
+NeedsKeyboardEventDisambiguationQuirks:
+  comment: >-
+    This is a quirk we are pro-actively applying to old applications. It changes keyboard event dispatching,
+    making keyIdentifier available on keypress events, making charCode available on keydown/keyup events,
+    and getting keypress dispatched in more cases.
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-parserScriptingFlagPolicy:
-  type: ParserScriptingFlagPolicy
-  initial: ParserScriptingFlagPolicy::OnlyIfScriptIsEnabled
+ParserScriptingFlagPolicy:
+  type: uint32_t
+  refinedType: ParserScriptingFlagPolicy
+  defaultValue:
+    WebCore:
+      default: ParserScriptingFlagPolicy::OnlyIfScriptIsEnabled
 
-paymentRequestEnabled:
-  conditional: ENABLE(PAYMENT_REQUEST)
-  initial: false
+PaymentRequestEnabled:
+  type: bool
+  condition: ENABLE(PAYMENT_REQUEST)
+  defaultValue:
+    WebCore:
+      default: false
 
-pdfImageCachingPolicy:
-  type: PDFImageCachingPolicy
-  initial: PDFImageCachingDefault
+PDFImageCachingPolicy:
+  type: uint32_t
+  refinedType: PDFImageCachingPolicy
+  defaultValue:
+    WebCore:
+      default: PDFImageCachingDefault
 
-preferMIMETypeForImages:
-  initial: false
+PreferMIMETypeForImages:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-preventKeyboardDOMEventDispatch:
-  initial: false
+PreventKeyboardDOMEventDispatch:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-quickTimePluginReplacementEnabled:
-  initial: defaultQuickTimePluginReplacementEnabled
+QuickTimePluginReplacementEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: defaultQuickTimePluginReplacementEnabled
 
-repaintOutsideLayoutEnabled:
-  initial: false
+RepaintOutsideLayoutEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-rubberBandingForSubScrollableRegionsEnabled:
-  initial: true
-  conditional: ENABLE(RUBBER_BANDING)
+RubberBandingForSubScrollableRegionsEnabled:
+  type: bool
+  condition: ENABLE(RUBBER_BANDING)
+  defaultValue:
+    WebCore:
+      default: true
 
-scrollingCoordinatorEnabled:
-  initial: false
+ScrollingCoordinatorEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-scrollingPerformanceLoggingEnabled:
-  initial: false
-  onChange: scrollingPerformanceLoggingEnabledChanged
+ScrollingPerformanceLoggingEnabled:
+  type: bool
+  webcoreOnChange: scrollingPerformanceLoggingEnabledChanged
+  defaultValue:
+    WebCore:
+      default: false
 
-scrollingTreeIncludesFrames:
-  initial: defaultScrollingTreeIncludesFrames
+ScrollingTreeIncludesFrames:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: defaultScrollingTreeIncludesFrames
 
-# Allow clients concerned with memory consumption to set a quota on session storage
-# since the memory used won't be released until the Page is destroyed.
-sessionStorageQuota:
+SessionStorageQuota:
+  comment: >-
+    Allow clients concerned with memory consumption to set a quota on session storage
+    since the memory used won't be released until the Page is destroyed.
   type: uint32_t
-  initial: StorageMap::noQuota
+  defaultValue:
+    WebCore:
+      default: StorageMap::noQuota
 
-shouldConvertInvalidURLsToBlank:
-  initial: true
+ShouldConvertInvalidURLsToBlank:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: true
 
-shouldDispatchSyntheticMouseEventsWhenModifyingSelection:
-  initial: false
+ShouldDispatchSyntheticMouseEventsWhenModifyingSelection:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-shouldDispatchSyntheticMouseOutAfterSyntheticClick:
-  initial: false
+ShouldDispatchSyntheticMouseOutAfterSyntheticClick:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-shouldIgnoreFontLoadCompletions:
-  initial: false
+ShouldIgnoreFontLoadCompletions:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-shouldInjectUserScriptsInInitialEmptyDocument:
-  initial: false
+ShouldInjectUserScriptsInInitialEmptyDocument:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-shrinksStandaloneImagesToFit:
-  initial: true
+ShrinksStandaloneImagesToFit:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: true
 
-storageAccessAPIPerPageScopeEnabled:
-  initial: true
+StorageAccessAPIPerPageScopeEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: true
 
-storageBlockingPolicy:
-  type: SecurityOrigin::StorageBlockingPolicy
-  initial: SecurityOrigin::AllowAllStorage
-  onChange: storageBlockingPolicyChanged
+StorageBlockingPolicy:
+  type: uint32_t
+  refinedType: SecurityOrigin::StorageBlockingPolicy
+  webcoreOnChange: storageBlockingPolicyChanged
+  defaultValue:
+    WebCore:
+      default: SecurityOrigin::AllowAllStorage
 
-systemLayoutDirection:
-  type: TextDirection
-  initial: TextDirection::LTR
+SystemLayoutDirection:
+  type: uint32_t
+  refinedType: TextDirection
+  defaultValue:
+    WebCore:
+      default: TextDirection::LTR
 
-textAutosizingWindowSizeOverride:
-  type: IntSize
-  onChange: setNeedsRecalcStyleInAllFrames
-  conditional: ENABLE(TEXT_AUTOSIZING)
+TextAutosizingWindowSizeOverrideHeight:
+  type: uint32_t
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
+  condition: ENABLE(TEXT_AUTOSIZING)
+  defaultValue:
+    WebCore:
+      default: 0
 
-textDirectionSubmenuInclusionBehavior:
-  type: TextDirectionSubmenuInclusionBehavior
-  initial: TextDirectionSubmenuAutomaticallyIncluded
+TextAutosizingWindowSizeOverrideWidth:
+  type: uint32_t
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
+  condition: ENABLE(TEXT_AUTOSIZING)
+  defaultValue:
+    WebCore:
+      default: 0
 
-timeWithoutMouseMovementBeforeHidingControls:
-  type: Seconds
-  initial: 3_s
+TextDirectionSubmenuInclusionBehavior:
+  type: uint32_t
+  refinedType: TextDirectionSubmenuInclusionBehavior
+  defaultValue:
+    WebCore:
+      default: TextDirectionSubmenuAutomaticallyIncluded
 
-touchEventEmulationEnabled:
-  initial: false
-  getter: isTouchEventEmulationEnabled
-  conditional: ENABLE(TOUCH_EVENTS)
+TimeWithoutMouseMovementBeforeHidingControls:
+  type: double
+  refinedType: Seconds
+  defaultValue:
+    WebCore:
+      default: 3_s
 
-treatIPAddressAsDomain:
-  initial: false
+TouchEventEmulationEnabled:
+  type: bool
+  webcoreGetter: isTouchEventEmulationEnabled
+  condition: ENABLE(TOUCH_EVENTS)
+  defaultValue:
+    WebCore:
+      default: false
 
-treatsAnyTextCSSLinkAsStylesheet:
-  initial: false
+TreatIPAddressAsDomain:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-unhandledPromiseRejectionToConsoleEnabled:
-  initial: true
+TreatsAnyTextCSSLinkAsStylesheet:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-unifiedTextCheckerEnabled:
-  initial: defaultUnifiedTextCheckerEnabled
+UnhandledPromiseRejectionToConsoleEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: true
 
-useAnonymousModeWhenFetchingMaskImages:
-  initial: true
+UnifiedTextCheckerEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: defaultUnifiedTextCheckerEnabled
 
-useImageDocumentForSubframePDF:
-  initial: false
+UseAnonymousModeWhenFetchingMaskImages:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: true
 
-useLegacyBackgroundSizeShorthandBehavior:
-  initial: false
+UseImageDocumentForSubframePDF:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-usePreHTML5ParserQuirks:
-  initial: false
+UseLegacyBackgroundSizeShorthandBehavior:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-userInterfaceDirectionPolicy:
-  type: UserInterfaceDirectionPolicy
-  initial: UserInterfaceDirectionPolicy::Content
+UsePreHTML5ParserQuirks:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-userStyleSheetLocation:
-  type: URL
-  onChange: userStyleSheetLocationChanged
+UserInterfaceDirectionPolicy:
+  type: uint32_t
+  refinedType: UserInterfaceDirectionPolicy
+  defaultValue:
+    WebCore:
+      default: UserInterfaceDirectionPolicy::Content
 
-# Sets the magnification value for validation message timer.  If the
-# magnification value is N, a validation message disappears automatically after
-# <message length> * N / 1000 seconds.  If N is equal to or less than 0, a
-# validation message doesn't disappears automaticaly.
-validationMessageTimerMagnification:
+UserStyleSheetLocation:
+  type: String
+  refinedType: URL
+  webcoreOnChange: userStyleSheetLocationChanged
+  defaultValue:
+    WebCore:
+      default:
+
+ValidationMessageTimerMagnification:
+  comment: >-
+    Sets the magnification value for validation message timer. If the
+    magnification value is N, a validation message disappears automatically after
+    message length * N / 1000 seconds.  If N is equal to or less than 0, a
+    validation message doesn't disappears automaticaly.
   type: uint32_t
-  initial: 50
+  defaultValue:
+    WebCore:
+      default: 50
 
-videoPlaybackRequiresUserGesture:
-  initial: defaultVideoPlaybackRequiresUserGesture
+VideoPlaybackRequiresUserGesture:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: defaultVideoPlaybackRequiresUserGesture
 
-visualViewportEnabled:
-  initial: true
-  onChange: setNeedsRecalcStyleInAllFrames
+VisualViewportEnabled:
+  type: bool
+  webcoreOnChange: setNeedsRecalcStyleInAllFrames
+  defaultValue:
+    WebCore:
+      default: true
 
-webGLErrorsToConsoleEnabled:
-  initial: true
+WebGLErrorsToConsoleEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: true
 
-webRTCEncryptionEnabled:
-  initial: true
+WebRTCEncryptionEnabled:
+  type: bool
   inspectorOverride: true
+  defaultValue:
+    WebCore:
+      default: true
 
-webkitImageReadyEventEnabled:
-  initial: false
+WebkitImageReadyEventEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: false
 
-# When enabled, window.blur() does not change focus, and
-# window.focus() only changes focus when invoked from the context that
-# created the window.
-windowFocusRestricted:
-  initial: true
+WindowFocusRestricted:
+  comment: >-
+    When enabled, window.blur() does not change focus, and
+    window.focus() only changes focus when invoked from the context that
+    created the window.
+  type: bool
+  defaultValue:
+    WebCore:
+      default: true
 
-youTubeFlashPluginReplacementEnabled:
-  initial: defaultYouTubeFlashPluginReplacementEnabled
+YouTubeFlashPluginReplacementEnabled:
+  type: bool
+  defaultValue:
+    WebCore:
+      default: defaultYouTubeFlashPluginReplacementEnabled

Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (269307 => 269308)


--- trunk/Source/WebCore/testing/InternalSettings.cpp	2020-11-03 17:14:34 UTC (rev 269307)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp	2020-11-03 17:20:23 UTC (rev 269308)
@@ -57,7 +57,7 @@
     : m_originalEditingBehavior(settings.editingBehaviorType())
 #if ENABLE(TEXT_AUTOSIZING)
     , m_originalTextAutosizingEnabled(settings.textAutosizingEnabled())
-    , m_originalTextAutosizingWindowSizeOverride(settings.textAutosizingWindowSizeOverride())
+    , m_originalTextAutosizingWindowSizeOverride(IntSize { static_cast<int>(settings.textAutosizingWindowSizeOverrideWidth()), static_cast<int>(settings.textAutosizingWindowSizeOverrideHeight()) })
     , m_originalTextAutosizingUsesIdempotentMode(settings.textAutosizingUsesIdempotentMode())
 #endif
     , m_originalMediaTypeOverride(settings.mediaTypeOverride())
@@ -156,7 +156,8 @@
 
 #if ENABLE(TEXT_AUTOSIZING)
     settings.setTextAutosizingEnabled(m_originalTextAutosizingEnabled);
-    settings.setTextAutosizingWindowSizeOverride(m_originalTextAutosizingWindowSizeOverride);
+    settings.setTextAutosizingWindowSizeOverrideWidth(m_originalTextAutosizingWindowSizeOverride.width());
+    settings.setTextAutosizingWindowSizeOverrideHeight(m_originalTextAutosizingWindowSizeOverride.height());
     settings.setTextAutosizingUsesIdempotentMode(m_originalTextAutosizingUsesIdempotentMode);
 #endif
     settings.setMediaTypeOverride(m_originalMediaTypeOverride);
@@ -412,7 +413,8 @@
     if (!m_page)
         return Exception { InvalidAccessError };
 #if ENABLE(TEXT_AUTOSIZING)
-    settings().setTextAutosizingWindowSizeOverride(IntSize(width, height));
+    settings().setTextAutosizingWindowSizeOverrideWidth(width);
+    settings().setTextAutosizingWindowSizeOverrideHeight(height);
 #else
     UNUSED_PARAM(width);
     UNUSED_PARAM(height);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to