Title: [223828] trunk/Source/WebCore
Revision
223828
Author
[email protected]
Date
2017-10-22 20:13:33 -0700 (Sun, 22 Oct 2017)

Log Message

[Settings] Replace current Settings generation with template file based approach
https://bugs.webkit.org/show_bug.cgi?id=178634

Patch by Sam Weinig <[email protected]> on 2017-10-22
Reviewed by Joseph Pecoraro.

This replaces the recently added python based Settings generation with a generator
built in ruby, so we can take advantage of ERB for templating. The result has much
of the logic in the templates and as a result feels much easier to follow and cleaner.

Since I was moving things to ruby, I took the opertunity to switch the Settings definition
file from our .in format to yaml, which is quite a bit easier to read.

* CMakeLists.txt:
* DerivedSources.make:
* Scripts/GenerateSettings: Removed.
* Scripts/GenerateSettings.py: Removed.
* Scripts/GenerateSettings.rb: Added.
* Scripts/GenerateSettings/GenerateInternalSettingsHeaderFile.py: Removed.
* Scripts/GenerateSettings/GenerateInternalSettingsIDLFile.py: Removed.
* Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py: Removed.
* Scripts/GenerateSettings/GenerateSettings.py: Removed.
* Scripts/GenerateSettings/GenerateSettingsHeaderFile.py: Removed.
* Scripts/GenerateSettings/GenerateSettingsImplementationFile.py: Removed.
* Scripts/GenerateSettings/Settings.py: Removed.
* Scripts/GenerateSettings/__init__.py: Removed.
* Scripts/SettingsTemplates: Added.
* Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb: Added.
* Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb: Added.
* Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb: Added.
* Scripts/SettingsTemplates/Settings.cpp.erb: Added.
* Scripts/SettingsTemplates/Settings.h.erb: Added.
* WebCore.xcodeproj/project.pbxproj:
* WebCoreMacros.cmake:
* page/Settings.in: Removed.
* page/Settings.yaml: Added.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (223827 => 223828)


--- trunk/Source/WebCore/CMakeLists.txt	2017-10-23 02:20:19 UTC (rev 223827)
+++ trunk/Source/WebCore/CMakeLists.txt	2017-10-23 03:13:33 UTC (rev 223828)
@@ -4025,7 +4025,7 @@
 list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/EventTargetInterfaces.h)
 
 
-GENERATE_SETTINGS_MACROS(${WEBCORE_DIR}/page/Settings.in Settings.h)
+GENERATE_SETTINGS_MACROS(${WEBCORE_DIR}/page/Settings.yaml Settings.h)
 list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/Settings.h)
 list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/Settings.cpp)
 list(APPEND WebCoreTestSupport_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.cpp)

Modified: trunk/Source/WebCore/ChangeLog (223827 => 223828)


--- trunk/Source/WebCore/ChangeLog	2017-10-23 02:20:19 UTC (rev 223827)
+++ trunk/Source/WebCore/ChangeLog	2017-10-23 03:13:33 UTC (rev 223828)
@@ -1,3 +1,41 @@
+2017-10-22  Sam Weinig  <[email protected]>
+
+        [Settings] Replace current Settings generation with template file based approach
+        https://bugs.webkit.org/show_bug.cgi?id=178634
+
+        Reviewed by Joseph Pecoraro.
+
+        This replaces the recently added python based Settings generation with a generator
+        built in ruby, so we can take advantage of ERB for templating. The result has much
+        of the logic in the templates and as a result feels much easier to follow and cleaner.
+
+        Since I was moving things to ruby, I took the opertunity to switch the Settings definition
+        file from our .in format to yaml, which is quite a bit easier to read.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * Scripts/GenerateSettings: Removed.
+        * Scripts/GenerateSettings.py: Removed.
+        * Scripts/GenerateSettings.rb: Added.
+        * Scripts/GenerateSettings/GenerateInternalSettingsHeaderFile.py: Removed.
+        * Scripts/GenerateSettings/GenerateInternalSettingsIDLFile.py: Removed.
+        * Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py: Removed.
+        * Scripts/GenerateSettings/GenerateSettings.py: Removed.
+        * Scripts/GenerateSettings/GenerateSettingsHeaderFile.py: Removed.
+        * Scripts/GenerateSettings/GenerateSettingsImplementationFile.py: Removed.
+        * Scripts/GenerateSettings/Settings.py: Removed.
+        * Scripts/GenerateSettings/__init__.py: Removed.
+        * Scripts/SettingsTemplates: Added.
+        * Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb: Added.
+        * Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb: Added.
+        * Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb: Added.
+        * Scripts/SettingsTemplates/Settings.cpp.erb: Added.
+        * Scripts/SettingsTemplates/Settings.h.erb: Added.
+        * WebCore.xcodeproj/project.pbxproj:
+        * WebCoreMacros.cmake:
+        * page/Settings.in: Removed.
+        * page/Settings.yaml: Added.
+
 2017-10-22  Joseph Pecoraro  <[email protected]>
 
         REGRESSION(r219675): Web Inspector: CommandLineAPI getEventListeners does not work

Modified: trunk/Source/WebCore/DerivedSources.make (223827 => 223828)


--- trunk/Source/WebCore/DerivedSources.make	2017-10-23 02:20:19 UTC (rev 223827)
+++ trunk/Source/WebCore/DerivedSources.make	2017-10-23 03:13:33 UTC (rev 223828)
@@ -1372,18 +1372,15 @@
 # Internal Settings
 
 GENERATE_SETTINGS_SCRIPTS = \
-    $(WebCore)/Scripts/GenerateSettings/GenerateInternalSettingsHeaderFile.py \
-    $(WebCore)/Scripts/GenerateSettings/GenerateInternalSettingsIDLFile.py \
-    $(WebCore)/Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py \
-    $(WebCore)/Scripts/GenerateSettings/GenerateSettings.py \
-    $(WebCore)/Scripts/GenerateSettings/GenerateSettingsHeaderFile.py \
-    $(WebCore)/Scripts/GenerateSettings/GenerateSettingsImplementationFile.py \
-    $(WebCore)/Scripts/GenerateSettings/Settings.py \
-    $(WebCore)/Scripts/GenerateSettings/__init__.py
+    $(WebCore)/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb \
+    $(WebCore)/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb \
+    $(WebCore)/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb \
+    $(WebCore)/Scripts/SettingsTemplates/Settings.cpp.erb \
+    $(WebCore)/Scripts/SettingsTemplates/Settings.h.erb
 
 all : InternalSettingsGenerated.idl InternalSettingsGenerated.cpp InternalSettingsGenerated.h Settings.cpp Settings.h
-InternalSettingsGenerated%idl InternalSettingsGenerated%cpp InternalSettingsGenerated%h Settings%cpp Settings%h : $(WebCore)/Scripts/GenerateSettings.py $(GENERATE_SETTINGS_SCRIPTS) page/Settings.in
-	$(PYTHON) $< --input $(WebCore)/page/Settings.in
+InternalSettingsGenerated%idl InternalSettingsGenerated%cpp InternalSettingsGenerated%h Settings%cpp Settings%h : $(WebCore)/Scripts/GenerateSettings.rb $(GENERATE_SETTINGS_SCRIPTS) page/Settings.yaml
+	$(RUBY) $< --input $(WebCore)/page/Settings.yaml
 
 # --------
 

Deleted: trunk/Source/WebCore/Scripts/GenerateSettings.py (223827 => 223828)


--- trunk/Source/WebCore/Scripts/GenerateSettings.py	2017-10-23 02:20:19 UTC (rev 223827)
+++ trunk/Source/WebCore/Scripts/GenerateSettings.py	2017-10-23 03:13:33 UTC (rev 223828)
@@ -1,60 +0,0 @@
-#!/usr/bin/env python
-#
-# 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.
-
-import os.path
-import sys
-from optparse import OptionParser
-
-from GenerateSettings import *
-
-
-def main():
-    parser = OptionParser(usage="usage: %prog --input file")
-    parser.add_option('--input', dest='input', help='file to generate settings from', metavar='file')
-    parser.add_option('--outputDir', dest='outputDir', help='directory to generate file in', metavar='dir')
-
-    (options, arguments) = parser.parse_args()
-
-    if not options.input:
-        print "Error: must provide an input file"
-        parser.print_usage()
-        exit(-1)
-
-    outputDirectory = options.outputDir if options.outputDir else os.getcwd()
-
-    if not os.path.exists(outputDirectory):
-        os.makedirs(outputDirectory)
-
-    settings = parseInput(options.input)
-
-    generateSettingsHeaderFile(outputDirectory, settings)
-    generateSettingsImplementationFile(outputDirectory, settings)
-    generateInternalSettingsIDLFile(outputDirectory, settings)
-    generateInternalSettingsHeaderFile(outputDirectory, settings)
-    generateInternalSettingsImplementationFile(outputDirectory, settings)
-
-
-if __name__ == '__main__':
-    main()

Added: trunk/Source/WebCore/Scripts/GenerateSettings.rb (0 => 223828)


--- trunk/Source/WebCore/Scripts/GenerateSettings.rb	                        (rev 0)
+++ trunk/Source/WebCore/Scripts/GenerateSettings.rb	2017-10-23 03:13:33 UTC (rev 223828)
@@ -0,0 +1,196 @@
+#!/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])
+
+parsedSettings = begin
+  YAML.load_file(options[:input])
+rescue ArgumentError => e
+  puts "Could not parse input file: #{e.message}"
+  exit(-1)
+end
+
+class Setting
+  attr_accessor :name
+  attr_accessor :type
+  attr_accessor :initial
+  attr_accessor :conditional
+  attr_accessor :onChange
+  attr_accessor :getter
+  
+  def initialize(name, opts)
+    @name = name
+    @type = opts["type"] || "bool"
+    @initial = opts["initial"]
+    @conditional = opts["conditional"]
+    @_onChange_ = opts["onChange"]
+    @getter = opts["getter"]
+  end
+
+  def valueType?
+    @type != "String" && @type != "URL"
+  end
+
+  def idlType
+    # FIXME: Add support for more types including enumerate types.
+    if @type == "int"
+      "long"
+    elsif @type == "unsigned"
+      "unsigned long"
+    elsif @type == "double"
+      "double"
+    elsif @type == "float"
+      "float"
+    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 setterFunctionName
+    if @name.start_with?("css", "xss", "ftp", "dom", "dns")
+      "set" + @name[0..2].upcase + @name[[email protected]]
+    else
+      "set" + @name[0].upcase + @name[[email protected]]
+    end
+  end
+
+  def getterFunctionName
+    @getter || @name
+  end
+end
+
+class Conditional
+  attr_accessor :condition
+  attr_accessor :settings
+  attr_accessor :boolSettings
+  attr_accessor :nonBoolSettings
+  attr_accessor :settingsWithComplexSetters
+
+  def initialize(condition, settings)
+    @condition = condition
+    @settings = settings
+    
+    @boolSettings = @settings.select { |setting| setting.type == "bool" }
+    @nonBoolSettings = @settings.reject { |setting| setting.type == "bool" }
+    @settingsWithComplexSetters = @settings.select { |setting| setting.hasComplexSetter? }
+  end
+end
+
+class Settings
+  attr_accessor :settings
+  attr_accessor :unconditionalSetting
+  attr_accessor :unconditionalBoolSetting
+  attr_accessor :unconditionalNonBoolSetting
+  attr_accessor :unconditionalSettingWithComplexSetters
+  attr_accessor :conditionals
+  
+  def initialize(hash)
+    @settings = []
+    hash.each do |name, options|
+      @settings << Setting.new(name, options)
+    end
+    @settings.sort! { |x, y| x.name <=> y.name }
+    
+    @unconditionalSetting = @settings.reject { |setting| setting.conditional }
+    @unconditionalBoolSetting = @unconditionalSetting.select { |setting| setting.type == "bool" }
+    @unconditionalNonBoolSetting = @unconditionalSetting.reject { |setting| setting.type == "bool" }
+    @unconditionalSettingWithComplexSetters = @unconditionalSetting.select { |setting| setting.hasComplexSetter? }
+
+    @conditionals = []
+    conditionalsMap = {}
+    @settings.select { |setting| setting.conditional }.each do |setting|
+      if !conditionalsMap[setting.conditional]
+        conditionalsMap[setting.conditional] = []
+      end
+
+      conditionalsMap[setting.conditional] << setting
+    end
+    conditionalsMap.each do |key, value|
+      @conditionals << Conditional.new(key, value)
+    end
+    @conditionals.sort! { |x, y| x.condition <=> y.condition }
+  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
+
+settings = Settings.new(parsedSettings)
+settings.renderToFile("SettingsTemplates/Settings.h.erb", File.join(options[:outputDirectory], "Settings.h"))
+settings.renderToFile("SettingsTemplates/Settings.cpp.erb", File.join(options[:outputDirectory], "Settings.cpp"))
+settings.renderToFile("SettingsTemplates/InternalSettingsGenerated.idl.erb", File.join(options[:outputDirectory], "InternalSettingsGenerated.idl"))
+settings.renderToFile("SettingsTemplates/InternalSettingsGenerated.h.erb", File.join(options[:outputDirectory], "InternalSettingsGenerated.h"))
+settings.renderToFile("SettingsTemplates/InternalSettingsGenerated.cpp.erb", File.join(options[:outputDirectory], "InternalSettingsGenerated.cpp"))
Property changes on: trunk/Source/WebCore/Scripts/GenerateSettings.rb
___________________________________________________________________

Added: svn:executable

+* \ No newline at end of property

Added: trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb (0 => 223828)


--- trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb	                        (rev 0)
+++ trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb	2017-10-23 03:13:33 UTC (rev 223828)
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "InternalSettingsGenerated.h"
+
+#include "Page.h"
+#include "Settings.h"
+
+namespace WebCore {
+
+InternalSettingsGenerated::InternalSettingsGenerated(Page* page)
+    : m_page(page)
+<%- for @setting in @settings do -%>
+<%- if @setting.idlType -%>
+<%- if @setting.conditional -%>
+#if ENABLE(<%= @setting.conditional %>)
+<%- end -%>
+    , m_<%= @setting.name %>(page->settings().<%= @setting.getterFunctionName %>())
+<%- if @setting.conditional -%>
+#endif
+<%- end -%>
+<%- end -%>
+<%- end -%>
+{
+}
+
+InternalSettingsGenerated::~InternalSettingsGenerated()
+{
+}
+
+void InternalSettingsGenerated::resetToConsistentState()
+{
+<%- for @setting in @settings do -%>
+<%- if @setting.idlType -%>
+<%- if @setting.conditional -%>
+#if ENABLE(<%= @setting.conditional %>)
+<%- end -%>
+    m_page->settings().<%= @setting.setterFunctionName %>(m_<%= @setting.name %>);
+<%- if @setting.conditional -%>
+#endif
+<%- end -%>
+<%- end -%>
+<%- end -%>
+}
+
+<%- for @setting in @settings do -%>
+<%- if @setting.idlType -%>
+void InternalSettingsGenerated::<%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>)
+{
+<%- if @setting.conditional -%>
+#if ENABLE(<%= @setting.conditional %>)
+    m_page->settings().<%= @setting.setterFunctionName %>(<%= @setting.name %>);
+#else
+    UNUSED_PARAM(<%= @setting.name %>);
+#endif
+<%- else -%>
+    m_page->settings().<%= @setting.setterFunctionName %>(<%= @setting.name %>);
+<%- end -%>
+}
+
+<%- end -%>
+<%- end -%>
+} // namespace WebCore

Added: trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb (0 => 223828)


--- trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb	                        (rev 0)
+++ trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb	2017-10-23 03:13:33 UTC (rev 223828)
@@ -0,0 +1,66 @@
+/*
+ * 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 <wtf/RefCounted.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class Page;
+
+class InternalSettingsGenerated : public RefCounted<InternalSettingsGenerated> {
+public:
+    explicit InternalSettingsGenerated(Page*);
+    virtual ~InternalSettingsGenerated();
+
+    void resetToConsistentState();
+
+<%- for @setting in @settings do -%>
+<%- if @setting.idlType -%>
+    void <%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>);
+<%- end -%>
+<%- end -%>
+
+private:
+    Page* m_page;
+
+<%- for @setting in @settings do -%>
+<%- if @setting.idlType -%>
+<%- if @setting.conditional -%>
+#if ENABLE(<%= @setting.conditional %>)
+<%- end -%>
+    <%= @setting.type %> m_<%= @setting.name %>;
+<%- if @setting.conditional -%>
+#endif
+<%- end -%>
+<%- end -%>
+<%- end -%>
+};
+
+} // namespace WebCore

Added: trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb (0 => 223828)


--- trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb	                        (rev 0)
+++ trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb	2017-10-23 03:13:33 UTC (rev 223828)
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+[
+    NoInterfaceObject,
+    ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,
+] interface InternalSettingsGenerated {
+<%- for @setting in @settings do -%>
+<%- if @setting.idlType -%>
+    void <%= @setting.setterFunctionName %>(<%= @setting.idlType %> <%= @setting.name %>);
+<%- end -%>
+<%- end -%>
+};

Added: trunk/Source/WebCore/Scripts/SettingsTemplates/Settings.cpp.erb (0 => 223828)


--- trunk/Source/WebCore/Scripts/SettingsTemplates/Settings.cpp.erb	                        (rev 0)
+++ trunk/Source/WebCore/Scripts/SettingsTemplates/Settings.cpp.erb	2017-10-23 03:13:33 UTC (rev 223828)
@@ -0,0 +1,100 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "Settings.h"
+
+#include "Page.h"
+#include "SettingsDefaultValues.h"
+
+namespace WebCore {
+
+Ref<Settings> Settings::create(Page* page)
+{
+    return adoptRef(*new Settings(page));
+}
+
+Settings::Settings(Page* page)
+    : SettingsBase(page)
+<%- for @setting in @unconditionalNonBoolSetting do -%>
+    , m_<%= @setting.name %>(<%= @setting.initial %>)
+<%- end -%>
+<%- for @conditional in @conditionals do -%>
+<%- if @conditional.nonBoolSettings.length != 0 -%>
+#if ENABLE(<%= @conditional.condition %>)
+<%- for @setting in @conditional.nonBoolSettings -%>
+    , m_<%= @setting.name %>(<%= @setting.initial %>)
+<%- end -%>
+#endif
+<%- end -%>
+<%- end -%>
+<%- for @setting in @unconditionalBoolSetting do -%>
+    , m_<%= @setting.name %>(<%= @setting.initial %>)
+<%- end -%>
+<%- for @conditional in @conditionals do -%>
+<%- if @conditional.boolSettings.length != 0 -%>
+#if ENABLE(<%= @conditional.condition %>)
+<%- for @setting in @conditional.boolSettings -%>
+    , m_<%= @setting.name %>(<%= @setting.initial %>)
+<%- end -%>
+#endif
+<%- end -%>
+<%- end -%>
+{
+}
+
+Settings::~Settings()
+{
+}
+
+<%- for @setting in @unconditionalSettingWithComplexSetters do -%>
+void Settings::<%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>)
+{
+    if (m_<%= @setting.name %> == <%= @setting.name %>)
+        return;
+    m_<%= @setting.name %> = <%= @setting.name %>;
+    <%= @setting.onChange %>();
+}
+
+<%- end -%>
+<%- for @conditional in @conditionals do -%>
+<%- if @conditional.settingsWithComplexSetters.length != 0 -%>
+#if ENABLE(<%= @conditional.condition %>)
+<%- for @setting in @conditional.settingsWithComplexSetters -%>
+void Settings::<%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>)
+{
+    if (m_<%= @setting.name %> == <%= @setting.name %>)
+        return;
+    m_<%= @setting.name %> = <%= @setting.name %>;
+    <%= @setting.onChange %>();
+}
+<%- end -%>
+#endif
+
+<%- end -%>
+<%- end -%>
+}

Added: trunk/Source/WebCore/Scripts/SettingsTemplates/Settings.h.erb (0 => 223828)


--- trunk/Source/WebCore/Scripts/SettingsTemplates/Settings.h.erb	                        (rev 0)
+++ trunk/Source/WebCore/Scripts/SettingsTemplates/Settings.h.erb	2017-10-23 03:13:33 UTC (rev 223828)
@@ -0,0 +1,98 @@
+/*
+ * 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 "SettingsBase.h"
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class Page;
+
+class Settings : public SettingsBase, public RefCounted<Settings> {
+    WTF_MAKE_NONCOPYABLE(Settings); WTF_MAKE_FAST_ALLOCATED;
+public:
+    static Ref<Settings> create(Page*);
+    ~Settings();
+
+<%- for @setting in @unconditionalSetting do -%>
+    <%= @setting.parameterType %> <%= @setting.getterFunctionName %>() const { return m_<%= @setting.name %>; } 
+    <%- if @setting.hasComplexSetter? -%>
+    WEBCORE_EXPORT void <%= @setting.setterFunctionName %>(<%= @setting.parameterType %>);
+    <%- else -%>
+    void <%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>) { m_<%= @setting.name %> = <%= @setting.name %>; }
+    <%- end -%>
+<%- end -%>
+
+<%- for @conditional in @conditionals do -%>
+#if ENABLE(<%= @conditional.condition %>)
+<%- for @setting in @conditional.settings do -%>
+    <%= @setting.parameterType %> <%= @setting.getterFunctionName %>() const { return m_<%= @setting.name %>; } 
+    <%- if @setting.hasComplexSetter? -%>
+    WEBCORE_EXPORT void <%= @setting.setterFunctionName %>(<%= @setting.parameterType %>);
+    <%- else -%>
+    void <%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>) { m_<%= @setting.name %> = <%= @setting.name %>; }
+    <%- end -%>
+<%- end -%>
+#endif
+
+<%- end -%>
+
+private:
+    explicit Settings(Page*);
+
+<%- for @setting in @unconditionalNonBoolSetting do -%>
+    <%= @setting.type %> m_<%= @setting.name %>;
+<%- end -%>
+
+<%- for @conditional in @conditionals do -%>
+<%- if @conditional.nonBoolSettings.length != 0 -%>
+#if ENABLE(<%= @conditional.condition %>)
+<%- for @setting in @conditional.nonBoolSettings -%>
+    <%= @setting.type %> m_<%= @setting.name %>;
+<%- end -%>
+#endif
+<%- end -%>
+<%- end -%>
+
+<%- for @setting in @unconditionalBoolSetting do -%>
+    <%= @setting.type %> m_<%= @setting.name %> : 1;
+<%- end -%>
+
+<%- for @conditional in @conditionals do -%>
+<%- if @conditional.boolSettings.length != 0 -%>
+#if ENABLE(<%= @conditional.condition %>)
+<%- for @setting in @conditional.boolSettings -%>
+    <%= @setting.type %> m_<%= @setting.name %> : 1;
+<%- end -%>
+#endif
+<%- end -%>
+<%- end -%>
+};
+
+}

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (223827 => 223828)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-10-23 02:20:19 UTC (rev 223827)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-10-23 03:13:33 UTC (rev 223828)
@@ -10908,8 +10908,6 @@
 		7C39C36E1DDBA3E000FEFB29 /* SVGPathSegListValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPathSegListValues.cpp; sourceTree = "<group>"; };
 		7C39C36F1DDBA3E000FEFB29 /* SVGPathSegListValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathSegListValues.h; sourceTree = "<group>"; };
 		7C39C3701DDBA44000FEFB29 /* SVGPathSegList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPathSegList.cpp; sourceTree = "<group>"; };
-		7C3A8C5E1F7D72B400F46E84 /* GenerateSettings */ = {isa = PBXFileReference; lastKnownFileType = folder; name = GenerateSettings; path = Scripts/GenerateSettings; sourceTree = "<group>"; };
-		7C3A8C601F7D72B500F46E84 /* GenerateSettings.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; name = GenerateSettings.py; path = Scripts/GenerateSettings.py; sourceTree = "<group>"; };
 		7C3A91E51C963B8800D1A7E3 /* ClipboardAccessPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClipboardAccessPolicy.h; sourceTree = "<group>"; };
 		7C3B796F1908757B00B47A2D /* UserMessageHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserMessageHandler.cpp; sourceTree = "<group>"; };
 		7C3B79701908757B00B47A2D /* UserMessageHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserMessageHandler.h; sourceTree = "<group>"; };
@@ -11121,6 +11119,7 @@
 		7CD344121F3108E2000DCD49 /* JSMutationCallback.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutationCallback.cpp; sourceTree = "<group>"; };
 		7CD494CA1A86EB1D000A87EC /* RenderAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderAttachment.cpp; sourceTree = "<group>"; };
 		7CD494CB1A86EB1D000A87EC /* RenderAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderAttachment.h; sourceTree = "<group>"; };
+		7CDE73961F9BD59500390312 /* Settings.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Settings.yaml; sourceTree = "<group>"; };
 		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>"; };
@@ -14051,7 +14050,6 @@
 		BC53DA471143134D000D817E /* DOMWrapperWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWrapperWorld.cpp; sourceTree = "<group>"; };
 		BC5823F40C0A98DF0053F1B5 /* JSHTMLElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLElementCustom.cpp; sourceTree = "<group>"; };
 		BC5825F20C0B89380053F1B5 /* JSCSSStyleDeclarationCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSStyleDeclarationCustom.cpp; sourceTree = "<group>"; };
-		BC59DEF8169DEDC30016AC34 /* Settings.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = Settings.in; sourceTree = "<group>"; };
 		BC5A12DD0DC0414800C9AFAD /* CSSReflectValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSReflectValue.cpp; sourceTree = "<group>"; };
 		BC5A12DE0DC0414800C9AFAD /* CSSReflectValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSReflectValue.h; sourceTree = "<group>"; };
 		BC5A86810C33676000EEA649 /* DOMSelection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DOMSelection.cpp; sourceTree = "<group>"; };
@@ -17532,9 +17530,7 @@
 			isa = PBXGroup;
 			children = (
 				F48389791E1DD23A0076B7EA /* EditingHistory */,
-				7C3A8C5E1F7D72B400F46E84 /* GenerateSettings */,
 				3717D7E517ECC3A6003C276D /* extract-localizable-strings.pl */,
-				7C3A8C601F7D72B500F46E84 /* GenerateSettings.py */,
 				37D456FB1A9A50B6003330A1 /* LocalizableStrings.pm */,
 			);
 			name = Scripts;
@@ -19571,7 +19567,7 @@
 				BCD0E0F90E972C3500265DEA /* SecurityOriginHash.h */,
 				974D2DA2146A535D00D51F8B /* SecurityPolicy.cpp */,
 				974D2DA3146A535D00D51F8B /* SecurityPolicy.h */,
-				BC59DEF8169DEDC30016AC34 /* Settings.in */,
+				7CDE73961F9BD59500390312 /* Settings.yaml */,
 				7CC6609B1F93057900D500E9 /* SettingsBase.cpp */,
 				7CC660991F93057800D500E9 /* SettingsBase.h */,
 				7C6EFEEA1F946A2E00FFAD41 /* SettingsDefaultValues.h */,

Modified: trunk/Source/WebCore/WebCoreMacros.cmake (223827 => 223828)


--- trunk/Source/WebCore/WebCoreMacros.cmake	2017-10-23 02:20:19 UTC (rev 223827)
+++ trunk/Source/WebCore/WebCoreMacros.cmake	2017-10-23 03:13:33 UTC (rev 223828)
@@ -203,7 +203,7 @@
 
 
 macro(GENERATE_SETTINGS_MACROS _infile _outfile)
-    set(NAMES_GENERATOR ${WEBCORE_DIR}/Scripts/GenerateSettings.py)
+    set(NAMES_GENERATOR ${WEBCORE_DIR}/Scripts/GenerateSettings.rb)
 
     # Do not list the output in more than one independent target that may
     # build in parallel or the two instances of the rule may conflict.
@@ -216,14 +216,11 @@
     )
 
     set(GENERATE_SETTINGS_SCRIPTS
-        ${WEBCORE_DIR}/Scripts/GenerateSettings/GenerateInternalSettingsHeaderFile.py
-        ${WEBCORE_DIR}/Scripts/GenerateSettings/GenerateInternalSettingsIDLFile.py
-        ${WEBCORE_DIR}/Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py
-        ${WEBCORE_DIR}/Scripts/GenerateSettings/GenerateSettingsHeaderFile.py
-        ${WEBCORE_DIR}/Scripts/GenerateSettings/GenerateSettingsImplementationFile.py
-        ${WEBCORE_DIR}/Scripts/GenerateSettings/GenerateSettings.py
-        ${WEBCORE_DIR}/Scripts/GenerateSettings/Settings.py
-        ${WEBCORE_DIR}/Scripts/GenerateSettings/__init__.py
+        ${WEBCORE_DIR}/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb
+        ${WEBCORE_DIR}/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb
+        ${WEBCORE_DIR}/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb
+        ${WEBCORE_DIR}/Scripts/SettingsTemplates/Settings.cpp.erb
+        ${WEBCORE_DIR}/Scripts/SettingsTemplates/Settings.h.erb
     )
 
     set(_args BYPRODUCTS ${_extra_output})
@@ -231,7 +228,7 @@
         OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/${_outfile}
         MAIN_DEPENDENCY ${_infile}
         DEPENDS ${NAMES_GENERATOR} ${GENERATE_SETTINGS_SCRIPTS} ${SCRIPTS_BINDINGS}
-        COMMAND ${PYTHON_EXECUTABLE} ${NAMES_GENERATOR} --input ${_infile} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR}
+        COMMAND ${RUBY_EXECUTABLE} ${NAMES_GENERATOR} --input ${_infile} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR}
         VERBATIM ${_args})
 endmacro()
 

Deleted: trunk/Source/WebCore/page/Settings.in (223827 => 223828)


--- trunk/Source/WebCore/page/Settings.in	2017-10-23 02:20:19 UTC (rev 223827)
+++ trunk/Source/WebCore/page/Settings.in	2017-10-23 03:13:33 UTC (rev 223828)
@@ -1,363 +0,0 @@
-# FIXME: Add support for global settings.
-# FIXME: Add support for custom getters/setters.
-
-defaultTextEncodingName type=String
-ftpDirectoryTemplatePath type=String
-localStorageDatabasePath type=String
-editableLinkBehavior type=EditableLinkBehavior, initial=EditableLinkDefaultBehavior
-textDirectionSubmenuInclusionBehavior type=TextDirectionSubmenuInclusionBehavior, initial=TextDirectionSubmenuAutomaticallyIncluded
-pdfImageCachingPolicy type=PDFImageCachingPolicy, initial = PDFImageCachingDefault
-passwordEchoDurationInSeconds type=double, initial=1
-
-# Sets the magnification value for validation message timer.  If the
-# magnification value is N, a validation message disappears automatically after
-# <message length> * N / 1000 seconds.  If N is equal to or less than 0, a
-# validation message doesn't disappears automaticaly.
-validationMessageTimerMagnification type=int, initial=50
-
-# Number of pixels below which 2D canvas is rendered in software
-# even if hardware acceleration is enabled.
-# Hardware acceleration is useful for large canvases where it can avoid the
-# pixel bandwidth between the CPU and GPU. But GPU acceleration comes at
-# a price - extra back-buffer and texture copy. Small canvases are also
-# widely used for stylized fonts. Anti-aliasing text in hardware at that
-# scale is generally slower. So below a certain size it is better to
-# draw canvas in software.
-minimumAccelerated2dCanvasSize type=int, initial=257*256
-
-maximumAccelerated2dCanvasSize type=unsigned, initial=5120*2880
-
-layoutFallbackWidth type=int, initial=980
-deviceWidth type=int, initial=0
-deviceHeight type=int, initial=0
-
-# Allow clients concerned with memory consumption to set a quota on session storage
-# since the memory used won't be released until the Page is destroyed.
-sessionStorageQuota type=unsigned, initial=StorageMap::noQuota
-
-minimumFontSize type=int, initial=0, _onChange_=setNeedsRecalcStyleInAllFrames
-minimumLogicalFontSize type=int, initial=0, _onChange_=setNeedsRecalcStyleInAllFrames
-defaultFontSize type=int, initial=16, _onChange_=setNeedsRecalcStyleInAllFrames
-defaultFixedFontSize type=int, initial=0, _onChange_=setNeedsRecalcStyleInAllFrames
-
-editingBehaviorType type=EditingBehaviorType, initial=editingBehaviorTypeForPlatform()
-maximumHTMLParserDOMTreeDepth type=unsigned, initial=defaultMaximumHTMLParserDOMTreeDepth
-
-# This setting only affects site icon image loading if loadsImagesAutomatically setting is false and this setting is true.
-# All other permutations still heed loadsImagesAutomatically setting.
-loadsSiteIconsIgnoringImageLoadingSetting initial=false
-
-caretBrowsingEnabled initial=false
-preventKeyboardDOMEventDispatch initial=false
-localStorageEnabled initial=false
-allowUniversalAccessFromFileURLs initial=true
-allowFileAccessFromFileURLs initial=true
-needsStorageAccessFromFileURLsQuirk initial=true
-_javascript_CanOpenWindowsAutomatically initial=false
-_javascript_CanAccessClipboard initial=false
-shouldPrintBackgrounds initial=false
-usesDashboardBackwardCompatibilityMode initial=false, conditional=DASHBOARD_SUPPORT
-clipboardAccessPolicy type=ClipboardAccessPolicy, initial=ClipboardAccessPolicy::RequiresUserGesture
-
-textAreasAreResizable initial=false, _onChange_=setNeedsRecalcStyleInAllFrames
-authorAndUserStylesEnabled initial=true, _onChange_=setNeedsRecalcStyleInAllFrames
-userStyleSheetLocation type=URL, _onChange_=userStyleSheetLocationChanged
-acceleratedCompositingEnabled initial=true, _onChange_=setNeedsRecalcStyleInAllFrames
-acceleratedCompositedAnimationsEnabled initial=true, _onChange_=setNeedsRecalcStyleInAllFrames
-showDebugBorders initial=false, _onChange_=setNeedsRecalcStyleInAllFrames
-showRepaintCounter initial=false, _onChange_=setNeedsRecalcStyleInAllFrames
-visibleDebugOverlayRegions type=DebugOverlayRegions, initial=0
-showTiledScrollingIndicator initial=false
-resourceUsageOverlayVisible initial=false, _onChange_=resourceUsageOverlayVisibleChanged, condition=RESOURCE_USAGE
-
-# 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
-
-treatsAnyTextCSSLinkAsStylesheet initial=false
-shrinksStandaloneImagesToFit initial=true
-pageCacheSupportsPlugins initial=false
-showsURLsInToolTips initial=false
-showsToolTipOverTruncatedText initial=false
-forceFTPDirectoryListings initial=false
-developerExtrasEnabled initial=false
-scriptMarkupEnabled initial=true
-needsSiteSpecificQuirks initial=false
-domTimersThrottlingEnabled initial=true
-webArchiveDebugModeEnabled initial=false, conditional=WEB_ARCHIVE
-localFileContentSniffingEnabled initial=false
-offlineWebApplicationCacheEnabled initial=false
-enforceCSSMIMETypeInNoQuirksMode initial=true
-usesEncodingDetector initial=false
-allowScriptsToCloseWindows initial=false
-canvasUsesAcceleratedDrawing initial=false
-acceleratedDrawingEnabled initial=false
-displayListDrawingEnabled initial=false
-acceleratedFiltersEnabled initial=false
-useLegacyTextAlignPositionedElementBehavior initial=false
-_javascript_RuntimeFlags type=JSC::RuntimeFlags
-
-# FIXME: This should really be disabled by default as it makes platforms that don't support the feature download files
-# they can't use by. Leaving enabled for now to not change existing behavior.
-downloadableBinaryFontsEnabled initial=true
-
-xssAuditorEnabled initial=false
-acceleratedCompositingForFixedPositionEnabled initial=defaultAcceleratedCompositingForFixedPositionEnabled
-acceleratedCompositingForOverflowScrollEnabled initial=false
-rubberBandingForSubScrollableRegionsEnabled initial=true, conditional=RUBBER_BANDING
-
-experimentalNotificationsEnabled initial=false
-webGLEnabled initial=false
-webGLErrorsToConsoleEnabled initial=true
-forceSoftwareWebGLRendering initial=false
-forceWebGLUsesLowPower initial=false
-accelerated2dCanvasEnabled initial=false
-loadDeferringEnabled initial=true
-webAudioEnabled initial=false
-paginateDuringLayoutEnabled initial=false
-fullScreenEnabled initial=false, conditional=FULLSCREEN_API
-asynchronousSpellCheckingEnabled initial=false
-
-# This feature requires an implementation of ValidationMessageClient.
-interactiveFormValidationEnabled initial=false
-
-usePreHTML5ParserQuirks initial=false
-hyperlinkAuditingEnabled initial=false
-crossOriginCheckInGetMatchedCSSRulesDisabled initial=false
-forceCompositingMode initial=false
-shouldInjectUserScriptsInInitialEmptyDocument initial=false
-fixedElementsLayoutRelativeToFrame initial=false
-allowDisplayOfInsecureContent initial=false
-allowRunningOfInsecureContent initial=false
-requiresUserGestureToLoadVideo initial=defaultRequiresUserGestureToLoadVideo
-videoPlaybackRequiresUserGesture initial=defaultVideoPlaybackRequiresUserGesture
-audioPlaybackRequiresUserGesture initial=defaultAudioPlaybackRequiresUserGesture
-mainContentUserGestureOverrideEnabled initial=false
-mediaUserGestureInheritsFromDocument initial=false
-allowsInlineMediaPlayback initial=defaultAllowsInlineMediaPlayback
-allowsInlineMediaPlaybackAfterFullscreen initial=true
-inlineMediaPlaybackRequiresPlaysInlineAttribute initial=defaultInlineMediaPlaybackRequiresPlaysInlineAttribute
-allowsPictureInPictureMediaPlayback initial=defaultAllowsPictureInPictureMediaPlayback
-mediaControlsScaleWithPageZoom initial=defaultMediaControlsScaleWithPageZoom
-invisibleAutoplayNotPermitted initial=false
-passwordEchoEnabled initial=false
-suppressesIncrementalRendering initial=false
-incrementalRenderingSuppressionTimeoutInSeconds type=double, initial=defaultIncrementalRenderingSuppressionTimeoutInSeconds
-backspaceKeyNavigationEnabled initial=true
-shouldDisplaySubtitles initial=false, conditional=VIDEO_TRACK
-shouldDisplayCaptions initial=false, conditional=VIDEO_TRACK
-shouldDisplayTextDescriptions initial=false, conditional=VIDEO_TRACK
-scrollingCoordinatorEnabled initial=false
-scrollingTreeIncludesFrames initial=defaultScrollingTreeIncludesFrames
-scrollAnimatorEnabled initial=true, conditional=SMOOTH_SCROLLING
-forceUpdateScrollbarsOnMainThreadForPerformanceTesting initial=false
-notificationsEnabled initial=true
-
-# Some apps needs isLoadingInAPISense to account for active subresource loaders.
-needsIsLoadingInAPISenseQuirk initial=false
-
-shouldRespectImageOrientation initial=defaultShouldRespectImageOrientation
-imageSubsamplingEnabled initial=defaultImageSubsamplingEnabled
-wantsBalancedSetDefersLoadingBehavior initial=false
-requestAnimationFrameEnabled initial=true
-
-cookieEnabled initial=true
-mediaEnabled initial=true
-DOMPasteAllowed initial=false
-
-# When enabled, window.blur() does not change focus, and
-# window.focus() only changes focus when invoked from the context that
-# created the window.
-windowFocusRestricted initial=true
-
-diagnosticLoggingEnabled initial=false
-delegatesPageScaling initial=false
-plugInSnapshottingEnabled initial=false
-snapshotAllPlugIns initial=false
-autostartOriginPlugInSnapshottingEnabled initial=true
-primaryPlugInSnapshotDetectionEnabled initial=true
-maximumPlugInSnapshotAttempts type=unsigned, initial=20
-frameFlattening type=FrameFlattening, initial=FrameFlattening::Disabled
-asyncFrameScrollingEnabled initial=false
-
-webSecurityEnabled initial=true
-spatialNavigationEnabled initial=false
-
-autoscrollForDragAndDropEnabled initial=false
-
-unifiedTextCheckerEnabled initial=defaultUnifiedTextCheckerEnabled
-
-logsPageMessagesToSystemConsoleEnabled initial=false
-
-backForwardCacheExpirationInterval type=double, initial=1800
-
-# Some apps could have a default video poster if it is not set.
-defaultVideoPosterURL type=String
-
-smartInsertDeleteEnabled initial=defaultSmartInsertDeleteEnabled
-selectTrailingWhitespaceEnabled initial=defaultSelectTrailingWhitespaceEnabled
-
-useLegacyBackgroundSizeShorthandBehavior initial=false
-fixedBackgroundsPaintRelativeToDocument initial=defaultFixedBackgroundsPaintRelativeToDocument
-
-textAutosizingEnabled initial=defaultTextAutosizingEnabled(), _onChange_=setNeedsRecalcStyleInAllFrames, conditional=TEXT_AUTOSIZING
-textAutosizingWindowSizeOverride type=IntSize, _onChange_=setNeedsRecalcStyleInAllFrames, conditional=TEXT_AUTOSIZING
-minimumZoomFontSize type=float, initial=defaultMinimumZoomFontSize(), conditional=TEXT_AUTOSIZING
-
-subpixelAntialiasedLayerTextEnabled initial=false, _onChange_=setNeedsRecalcStyleInAllFrames
-simpleLineLayoutEnabled initial=true, _onChange_=setNeedsRecalcStyleInAllFrames
-simpleLineLayoutDebugBordersEnabled initial=false, _onChange_=setNeedsRecalcStyleInAllFrames
-
-subpixelCSSOMElementMetricsEnabled initial=false
-
-useGiantTiles initial=false
-
-mediaSourceEnabled initial=true, conditional=MEDIA_SOURCE
-
-# FIXME: Rename to allowMultiElementImplicitFormSubmission once we upstream the iOS changes to WebView.mm.
-allowMultiElementImplicitSubmission initial=false
-
-allowsAirPlayForMediaPlayback initial=true, conditional=WIRELESS_PLAYBACK_TARGET
-
-shouldConvertPositionStyleOnCopy initial=false
-
-maxParseDuration type=double, initial=-1
-standalone initial=false
-telephoneNumberParsingEnabled initial=false
-mediaDataLoadsAutomatically initial=defaultMediaDataLoadsAutomatically
-alwaysUseAcceleratedOverflowScroll initial=false
-imageControlsEnabled initial=false, conditional=SERVICE_CONTROLS
-
-enableInheritURIQueryComponent initial=false
-
-aggressiveTileRetentionEnabled initial=false
-temporaryTileCohortRetentionEnabled initial=true
-
-useImageDocumentForSubframePDF initial=false
-dataDetectorTypes type=DataDetectorTypes, initial=DataDetectorTypeNone, conditional=DATA_DETECTION
-
-# Allow SourceBuffers to store up to 304MB each, enough for approximately five minutes
-# of 1080p video and stereo audio.
-maximumSourceBufferSize type=int, initial=318767104, conditional=MEDIA_SOURCE
-
-serviceControlsEnabled initial=false, conditional=SERVICE_CONTROLS
-
-appleMailPaginationQuirkEnabled initial=false
-
-deferredCSSParserEnabled initial=false
-
-repaintOutsideLayoutEnabled initial=false
-
-httpEquivEnabled initial=true
-
-# 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
-
-userInterfaceDirectionPolicy type=UserInterfaceDirectionPolicy, initial=UserInterfaceDirectionPolicy::Content
-systemLayoutDirection type=TextDirection, initial=LTR
-
-allowContentSecurityPolicySourceStarToMatchAnyProtocol initial=false
-
-selectionPaintingWithoutSelectionGapsEnabled initial=false
-
-shouldConvertInvalidURLsToBlank initial=true
-
-springTimingFunctionEnabled initial=false
-
-treatIPAddressAsDomain initial=false
-
-mediaPreloadingEnabled initial=false
-
-# Runtime-enabled features
-visualViewportEnabled initial=false, _onChange_=setNeedsRecalcStyleInAllFrames
-
-inputEventsEnabled initial=true
-
-quickTimePluginReplacementEnabled initial=defaultQuickTimePluginReplacementEnabled
-youTubeFlashPluginReplacementEnabled initial=defaultYouTubeFlashPluginReplacementEnabled
-
-forcedColorsAreInvertedAccessibilityValue type=ForcedAccessibilityValue, initial=defaultForcedColorsAreInvertedAccessibilityValue
-forcedDisplayIsMonochromeAccessibilityValue type=ForcedAccessibilityValue, initial=defaultForcedDisplayIsMonochromeAccessibilityValue
-forcedPrefersReducedMotionAccessibilityValue type=ForcedAccessibilityValue, initial=defaultForcedPrefersReducedMotionAccessibilityValue
-
-largeImageAsyncDecodingEnabled initial=true
-animatedImageAsyncDecodingEnabled initial=true
-webkitImageReadyEventEnabled initial=false
-
-shouldSuppressTextInputFromEditingDuringProvisionalNavigation initial=false
-
-langAttributeAwareFormControlUIEnabled initial=false
-
-subresourceIntegrityEnabled initial=true
-
-linkPreconnectEnabled initial=false
-
-beaconAPIEnabled initial=false
-
-geolocationFloorLevelEnabled initial=true
-
-constantPropertiesEnabled initial=false
-
-viewportFitEnabled initial=false
-
-allowMediaContentTypesRequiringHardwareSupportAsFallback initial=false
-
-storageAccessAPIEnabled initial=false
-
-timeWithoutMouseMovementBeforeHidingControls type=Seconds, initial=3_s 
-
-fontFallbackPrefersPictographs initial=false, _onChange_=setNeedsRecalcStyleInAllFrames
-
-fontLoadTimingOverride type=FontLoadTimingOverride, initial=FontLoadTimingOverride::None
-shouldIgnoreFontLoadCompletions initial=false
-
-paymentRequestEnabled initial=false, conditional=PAYMENT_REQUEST
-applePayEnabled initial=false, conditional=APPLE_PAY
-applePayCapabilityDisclosureAllowed initial=true, conditional=APPLE_PAY
-
-javaEnabled initial=false, getter=isJavaEnabled
-javaEnabledForLocalFiles initial=true, getter=isJavaEnabledForLocalFiles
-
-# Unlike the imagesEnabled setting, this only suppresses the network load of
-# the image URL. A cached image will still be rendered if requested.
-loadsImagesAutomatically initial=false, _onChange_=imagesEnabledChanged
-imagesEnabled initial=true, getter=areImagesEnabled, _onChange_=imagesEnabledChanged
-scriptEnabled initial=false, getter=isScriptEnabled, _onChange_=scriptEnabledChanged
-pluginsEnabled initial=false, getter=arePluginsEnabled, _onChange_=pluginsEnabledChanged
-
-usesPageCache initial=false, _onChange_=usesPageCacheChanged
-
-dnsPrefetchingEnabled initial=false, _onChange_=dnsPrefetchingEnabledChanged
-
-backgroundShouldExtendBeyondPage initial=false, _onChange_=backgroundShouldExtendBeyondPageChanged
-
-scrollingPerformanceLoggingEnabled initial=false, _onChange_=scrollingPerformanceLoggingEnabledChanged
-
-hiddenPageDOMTimerThrottlingEnabled initial=false, _onChange_=hiddenPageDOMTimerThrottlingStateChanged
-hiddenPageDOMTimerThrottlingAutoIncreases initial=false, _onChange_=hiddenPageDOMTimerThrottlingStateChanged
-hiddenPageCSSAnimationSuspensionEnabled initial=false, _onChange_=hiddenPageCSSAnimationSuspensionEnabledChanged
-
-storageBlockingPolicy type=SecurityOrigin::StorageBlockingPolicy, initial=SecurityOrigin::AllowAllStorage, _onChange_=storageBlockingPolicyChanged
-
-# Only set by Layout Tests.
-mediaTypeOverride type=String, initial="screen", _onChange_=mediaTypeOverrideChanged
-
-
-fontRenderingMode type=FontRenderingMode, initial=FontRenderingMode::Normal
-
-preferMIMETypeForImages initial=false
-
-forcePendingWebGLPolicy initial=false, getter=isForcePendingWebGLPolicy
-
-mediaKeysStorageDirectory type=String, conditional=LEGACY_ENCRYPTED_MEDIA
-mediaDeviceIdentifierStorageDirectory type=String, conditional=MEDIA_STREAM
-
-# 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
-
-touchEventEmulationEnabled initial=false, getter=isTouchEventEmulationEnabled, conditional=TOUCH_EVENTS

Added: trunk/Source/WebCore/page/Settings.yaml (0 => 223828)


--- trunk/Source/WebCore/page/Settings.yaml	                        (rev 0)
+++ trunk/Source/WebCore/page/Settings.yaml	2017-10-23 03:13:33 UTC (rev 223828)
@@ -0,0 +1,693 @@
+# FIXME: Add support for global settings.
+# FIXME: Add support for custom getters/setters.
+
+defaultTextEncodingName:
+  type: String
+ftpDirectoryTemplatePath:
+  type: String
+localStorageDatabasePath:
+  type: String
+editableLinkBehavior:
+  type: EditableLinkBehavior
+  initial: EditableLinkDefaultBehavior
+textDirectionSubmenuInclusionBehavior:
+  type: TextDirectionSubmenuInclusionBehavior
+  initial: TextDirectionSubmenuAutomaticallyIncluded
+pdfImageCachingPolicy:
+  type: PDFImageCachingPolicy
+  initial: PDFImageCachingDefault
+passwordEchoDurationInSeconds:
+  type: double
+  initial: 1
+
+# Sets the magnification value for validation message timer.  If the
+# magnification value is N, a validation message disappears automatically after
+# <message length> * N / 1000 seconds.  If N is equal to or less than 0, a
+# validation message doesn't disappears automaticaly.
+validationMessageTimerMagnification:
+  type: int
+  initial: 50
+
+# Number of pixels below which 2D canvas is rendered in software
+# even if hardware acceleration is enabled.
+# Hardware acceleration is useful for large canvases where it can avoid the
+# pixel bandwidth between the CPU and GPU. But GPU acceleration comes at
+# a price - extra back-buffer and texture copy. Small canvases are also
+# widely used for stylized fonts. Anti-aliasing text in hardware at that
+# scale is generally slower. So below a certain size it is better to
+# draw canvas in software.
+minimumAccelerated2dCanvasSize:
+  type: int
+  initial: 257*256
+
+maximumAccelerated2dCanvasSize:
+  type: unsigned
+  initial: 5120*2880
+
+layoutFallbackWidth:
+  type: int
+  initial: 980
+deviceWidth:
+  type: int
+  initial: 0
+deviceHeight:
+  type: int
+  initial: 0
+
+# Allow clients concerned with memory consumption to set a quota on session storage
+# since the memory used won't be released until the Page is destroyed.
+sessionStorageQuota:
+  type: unsigned
+  initial: StorageMap::noQuota
+
+minimumFontSize:
+  type: int
+  initial: 0
+  onChange: setNeedsRecalcStyleInAllFrames
+minimumLogicalFontSize:
+  type: int
+  initial: 0
+  onChange: setNeedsRecalcStyleInAllFrames
+defaultFontSize:
+  type: int
+  initial: 16
+  onChange: setNeedsRecalcStyleInAllFrames
+defaultFixedFontSize:
+  type: int
+  initial: 0
+  onChange: setNeedsRecalcStyleInAllFrames
+
+editingBehaviorType:
+  type: EditingBehaviorType
+  initial: editingBehaviorTypeForPlatform()
+maximumHTMLParserDOMTreeDepth:
+  type: unsigned
+  initial: defaultMaximumHTMLParserDOMTreeDepth
+
+# This setting only affects site icon image loading if loadsImagesAutomatically setting is false and this setting is true.
+# All other permutations still heed loadsImagesAutomatically setting.
+loadsSiteIconsIgnoringImageLoadingSetting:
+  initial: false
+
+caretBrowsingEnabled:
+  initial: false
+preventKeyboardDOMEventDispatch:
+  initial: false
+localStorageEnabled:
+  initial: false
+allowUniversalAccessFromFileURLs:
+  initial: true
+allowFileAccessFromFileURLs:
+  initial: true
+needsStorageAccessFromFileURLsQuirk:
+  initial: true
+_javascript_CanOpenWindowsAutomatically:
+  initial: false
+_javascript_CanAccessClipboard:
+  initial: false
+shouldPrintBackgrounds:
+  initial: false
+usesDashboardBackwardCompatibilityMode:
+  initial: false
+  conditional: DASHBOARD_SUPPORT
+clipboardAccessPolicy:
+  type: ClipboardAccessPolicy
+  initial: ClipboardAccessPolicy::RequiresUserGesture
+
+textAreasAreResizable:
+  initial: false
+  onChange: setNeedsRecalcStyleInAllFrames
+authorAndUserStylesEnabled:
+  initial: true
+  onChange: setNeedsRecalcStyleInAllFrames
+userStyleSheetLocation:
+  type: URL
+  onChange: userStyleSheetLocationChanged
+acceleratedCompositingEnabled:
+  initial: true
+  onChange: setNeedsRecalcStyleInAllFrames
+acceleratedCompositedAnimationsEnabled:
+  initial: true
+  onChange: setNeedsRecalcStyleInAllFrames
+showDebugBorders:
+  initial: false
+  onChange: setNeedsRecalcStyleInAllFrames
+showRepaintCounter:
+  initial: false
+  onChange: setNeedsRecalcStyleInAllFrames
+visibleDebugOverlayRegions:
+  type: DebugOverlayRegions
+  initial: 0
+showTiledScrollingIndicator:
+  initial: false
+resourceUsageOverlayVisible:
+  initial: false
+  onChange: resourceUsageOverlayVisibleChanged
+  condition: RESOURCE_USAGE
+
+# 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
+
+treatsAnyTextCSSLinkAsStylesheet:
+  initial: false
+shrinksStandaloneImagesToFit:
+  initial: true
+pageCacheSupportsPlugins:
+  initial: false
+showsURLsInToolTips:
+  initial: false
+showsToolTipOverTruncatedText:
+  initial: false
+forceFTPDirectoryListings:
+  initial: false
+developerExtrasEnabled:
+  initial: false
+scriptMarkupEnabled:
+  initial: true
+needsSiteSpecificQuirks:
+  initial: false
+domTimersThrottlingEnabled:
+  initial: true
+webArchiveDebugModeEnabled:
+  initial: false
+  conditional: WEB_ARCHIVE
+localFileContentSniffingEnabled:
+  initial: false
+offlineWebApplicationCacheEnabled:
+  initial: false
+enforceCSSMIMETypeInNoQuirksMode:
+  initial: true
+usesEncodingDetector:
+  initial: false
+allowScriptsToCloseWindows:
+  initial: false
+canvasUsesAcceleratedDrawing:
+  initial: false
+acceleratedDrawingEnabled:
+  initial: false
+displayListDrawingEnabled:
+  initial: false
+acceleratedFiltersEnabled:
+  initial: false
+useLegacyTextAlignPositionedElementBehavior:
+  initial: false
+_javascript_RuntimeFlags:
+  type: JSC::RuntimeFlags
+
+# FIXME: This should really be disabled by default as it makes platforms that don't support the feature download files
+# they can't use by. Leaving enabled for now to not change existing behavior.
+downloadableBinaryFontsEnabled:
+  initial: true
+
+xssAuditorEnabled:
+  initial: false
+acceleratedCompositingForFixedPositionEnabled:
+  initial: defaultAcceleratedCompositingForFixedPositionEnabled
+acceleratedCompositingForOverflowScrollEnabled:
+  initial: false
+rubberBandingForSubScrollableRegionsEnabled:
+  initial: true
+  conditional: RUBBER_BANDING
+
+experimentalNotificationsEnabled:
+  initial: false
+webGLEnabled:
+  initial: false
+webGLErrorsToConsoleEnabled:
+  initial: true
+forceSoftwareWebGLRendering:
+  initial: false
+forceWebGLUsesLowPower:
+  initial: false
+accelerated2dCanvasEnabled:
+  initial: false
+loadDeferringEnabled:
+  initial: true
+webAudioEnabled:
+  initial: false
+paginateDuringLayoutEnabled:
+  initial: false
+fullScreenEnabled:
+  initial: false
+  conditional: FULLSCREEN_API
+asynchronousSpellCheckingEnabled:
+  initial: false
+
+# This feature requires an implementation of ValidationMessageClient.
+interactiveFormValidationEnabled:
+  initial: false
+
+usePreHTML5ParserQuirks:
+  initial: false
+hyperlinkAuditingEnabled:
+  initial: false
+crossOriginCheckInGetMatchedCSSRulesDisabled:
+  initial: false
+forceCompositingMode:
+  initial: false
+shouldInjectUserScriptsInInitialEmptyDocument:
+  initial: false
+fixedElementsLayoutRelativeToFrame:
+  initial: false
+allowDisplayOfInsecureContent:
+  initial: false
+allowRunningOfInsecureContent:
+  initial: false
+requiresUserGestureToLoadVideo:
+  initial: defaultRequiresUserGestureToLoadVideo
+videoPlaybackRequiresUserGesture:
+  initial: defaultVideoPlaybackRequiresUserGesture
+audioPlaybackRequiresUserGesture:
+  initial: defaultAudioPlaybackRequiresUserGesture
+mainContentUserGestureOverrideEnabled:
+  initial: false
+mediaUserGestureInheritsFromDocument:
+  initial: false
+allowsInlineMediaPlayback:
+  initial: defaultAllowsInlineMediaPlayback
+allowsInlineMediaPlaybackAfterFullscreen:
+  initial: true
+inlineMediaPlaybackRequiresPlaysInlineAttribute:
+  initial: defaultInlineMediaPlaybackRequiresPlaysInlineAttribute
+allowsPictureInPictureMediaPlayback:
+  initial: defaultAllowsPictureInPictureMediaPlayback
+mediaControlsScaleWithPageZoom:
+  initial: defaultMediaControlsScaleWithPageZoom
+invisibleAutoplayNotPermitted:
+  initial: false
+passwordEchoEnabled:
+  initial: false
+suppressesIncrementalRendering:
+  initial: false
+incrementalRenderingSuppressionTimeoutInSeconds:
+  type: double
+  initial: defaultIncrementalRenderingSuppressionTimeoutInSeconds
+backspaceKeyNavigationEnabled:
+  initial: true
+shouldDisplaySubtitles:
+  initial: false
+  conditional: VIDEO_TRACK
+shouldDisplayCaptions:
+  initial: false
+  conditional: VIDEO_TRACK
+shouldDisplayTextDescriptions:
+  initial: false
+  conditional: VIDEO_TRACK
+scrollingCoordinatorEnabled:
+  initial: false
+scrollingTreeIncludesFrames:
+  initial: defaultScrollingTreeIncludesFrames
+scrollAnimatorEnabled:
+  initial: true
+  conditional: SMOOTH_SCROLLING
+forceUpdateScrollbarsOnMainThreadForPerformanceTesting:
+  initial: false
+notificationsEnabled:
+  initial: true
+
+# Some apps needs isLoadingInAPISense to account for active subresource loaders.
+needsIsLoadingInAPISenseQuirk:
+  initial: false
+
+shouldRespectImageOrientation:
+  initial: defaultShouldRespectImageOrientation
+imageSubsamplingEnabled:
+  initial: defaultImageSubsamplingEnabled
+wantsBalancedSetDefersLoadingBehavior:
+  initial: false
+requestAnimationFrameEnabled:
+  initial: true
+
+cookieEnabled:
+  initial: true
+mediaEnabled:
+  initial: true
+DOMPasteAllowed:
+  initial: false
+
+# When enabled, window.blur() does not change focus, and
+# window.focus() only changes focus when invoked from the context that
+# created the window.
+windowFocusRestricted:
+  initial: true
+
+diagnosticLoggingEnabled:
+  initial: false
+delegatesPageScaling:
+  initial: false
+plugInSnapshottingEnabled:
+  initial: false
+snapshotAllPlugIns:
+  initial: false
+autostartOriginPlugInSnapshottingEnabled:
+  initial: true
+primaryPlugInSnapshotDetectionEnabled:
+  initial: true
+maximumPlugInSnapshotAttempts:
+  type: unsigned
+  initial: 20
+frameFlattening:
+  type: FrameFlattening
+  initial: FrameFlattening::Disabled
+asyncFrameScrollingEnabled:
+  initial: false
+
+webSecurityEnabled:
+  initial: true
+spatialNavigationEnabled:
+  initial: false
+
+autoscrollForDragAndDropEnabled:
+  initial: false
+
+unifiedTextCheckerEnabled:
+  initial: defaultUnifiedTextCheckerEnabled
+
+logsPageMessagesToSystemConsoleEnabled:
+  initial: false
+
+backForwardCacheExpirationInterval:
+  type: double
+  initial: 1800
+
+# Some apps could have a default video poster if it is not set.
+defaultVideoPosterURL:
+  type: String
+
+smartInsertDeleteEnabled:
+  initial: defaultSmartInsertDeleteEnabled
+selectTrailingWhitespaceEnabled:
+  initial: defaultSelectTrailingWhitespaceEnabled
+
+useLegacyBackgroundSizeShorthandBehavior:
+  initial: false
+fixedBackgroundsPaintRelativeToDocument:
+  initial: defaultFixedBackgroundsPaintRelativeToDocument
+
+textAutosizingEnabled:
+  initial: defaultTextAutosizingEnabled()
+  onChange: setNeedsRecalcStyleInAllFrames
+  conditional: TEXT_AUTOSIZING
+textAutosizingWindowSizeOverride:
+  type: IntSize
+  onChange: setNeedsRecalcStyleInAllFrames
+  conditional: TEXT_AUTOSIZING
+minimumZoomFontSize:
+  type: float
+  initial: defaultMinimumZoomFontSize()
+  conditional: TEXT_AUTOSIZING
+
+subpixelAntialiasedLayerTextEnabled:
+  initial: false
+  onChange: setNeedsRecalcStyleInAllFrames
+simpleLineLayoutEnabled:
+  initial: true
+  onChange: setNeedsRecalcStyleInAllFrames
+simpleLineLayoutDebugBordersEnabled:
+  initial: false
+  onChange: setNeedsRecalcStyleInAllFrames
+
+subpixelCSSOMElementMetricsEnabled:
+  initial: false
+
+useGiantTiles:
+  initial: false
+
+mediaSourceEnabled:
+  initial: true
+  conditional: MEDIA_SOURCE
+
+# FIXME: Rename to allowMultiElementImplicitFormSubmission once we upstream the iOS changes to WebView.mm.
+allowMultiElementImplicitSubmission:
+  initial: false
+
+allowsAirPlayForMediaPlayback:
+  initial: true
+  conditional: WIRELESS_PLAYBACK_TARGET
+
+shouldConvertPositionStyleOnCopy:
+  initial: false
+
+maxParseDuration:
+  type: double
+  initial: -1
+standalone:
+  initial: false
+telephoneNumberParsingEnabled:
+  initial: false
+mediaDataLoadsAutomatically:
+  initial: defaultMediaDataLoadsAutomatically
+alwaysUseAcceleratedOverflowScroll:
+  initial: false
+imageControlsEnabled:
+  initial: false
+  conditional: SERVICE_CONTROLS
+
+enableInheritURIQueryComponent:
+  initial: false
+
+aggressiveTileRetentionEnabled:
+  initial: false
+temporaryTileCohortRetentionEnabled:
+  initial: true
+
+useImageDocumentForSubframePDF:
+  initial: false
+dataDetectorTypes:
+  type: DataDetectorTypes
+  initial: DataDetectorTypeNone
+  conditional: DATA_DETECTION
+
+# Allow SourceBuffers to store up to 304MB each, enough for approximately five minutes
+# of 1080p video and stereo audio.
+maximumSourceBufferSize:
+  type: int
+  initial: 318767104
+  conditional: MEDIA_SOURCE
+
+serviceControlsEnabled:
+  initial: false
+  conditional: SERVICE_CONTROLS
+
+appleMailPaginationQuirkEnabled:
+  initial: false
+
+deferredCSSParserEnabled:
+  initial: false
+
+repaintOutsideLayoutEnabled:
+  initial: false
+
+httpEquivEnabled:
+  initial: true
+
+# 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
+
+userInterfaceDirectionPolicy:
+  type: UserInterfaceDirectionPolicy
+  initial: UserInterfaceDirectionPolicy::Content
+systemLayoutDirection:
+  type: TextDirection
+  initial: LTR
+
+allowContentSecurityPolicySourceStarToMatchAnyProtocol:
+  initial: false
+
+selectionPaintingWithoutSelectionGapsEnabled:
+  initial: false
+
+shouldConvertInvalidURLsToBlank:
+  initial: true
+
+springTimingFunctionEnabled:
+  initial: false
+
+treatIPAddressAsDomain:
+  initial: false
+
+mediaPreloadingEnabled:
+  initial: false
+
+# Runtime-enabled features
+visualViewportEnabled:
+  initial: false
+  onChange: setNeedsRecalcStyleInAllFrames
+
+inputEventsEnabled:
+  initial: true
+
+quickTimePluginReplacementEnabled:
+  initial: defaultQuickTimePluginReplacementEnabled
+youTubeFlashPluginReplacementEnabled:
+  initial: defaultYouTubeFlashPluginReplacementEnabled
+
+forcedColorsAreInvertedAccessibilityValue:
+  type: ForcedAccessibilityValue
+  initial: defaultForcedColorsAreInvertedAccessibilityValue
+forcedDisplayIsMonochromeAccessibilityValue:
+  type: ForcedAccessibilityValue
+  initial: defaultForcedDisplayIsMonochromeAccessibilityValue
+forcedPrefersReducedMotionAccessibilityValue:
+  type: ForcedAccessibilityValue
+  initial: defaultForcedPrefersReducedMotionAccessibilityValue
+
+largeImageAsyncDecodingEnabled:
+  initial: true
+animatedImageAsyncDecodingEnabled:
+  initial: true
+webkitImageReadyEventEnabled:
+  initial: false
+
+shouldSuppressTextInputFromEditingDuringProvisionalNavigation:
+  initial: false
+
+langAttributeAwareFormControlUIEnabled:
+  initial: false
+
+subresourceIntegrityEnabled:
+  initial: true
+
+linkPreconnectEnabled:
+  initial: false
+
+beaconAPIEnabled:
+  initial: false
+
+geolocationFloorLevelEnabled:
+  initial: true
+
+constantPropertiesEnabled:
+  initial: false
+
+viewportFitEnabled:
+  initial: false
+
+allowMediaContentTypesRequiringHardwareSupportAsFallback:
+  initial: false
+
+storageAccessAPIEnabled:
+  initial: false
+
+timeWithoutMouseMovementBeforeHidingControls:
+  type: Seconds
+  initial: 3_s
+
+fontFallbackPrefersPictographs:
+  initial: false
+  onChange: setNeedsRecalcStyleInAllFrames
+
+fontLoadTimingOverride:
+  type: FontLoadTimingOverride
+  initial: FontLoadTimingOverride::None
+shouldIgnoreFontLoadCompletions:
+  initial: false
+
+paymentRequestEnabled:
+  initial: false
+  conditional: PAYMENT_REQUEST
+applePayEnabled:
+  initial: false
+  conditional: APPLE_PAY
+applePayCapabilityDisclosureAllowed:
+  initial: true
+  conditional: APPLE_PAY
+
+javaEnabled:
+  initial: false
+  getter: isJavaEnabled
+javaEnabledForLocalFiles:
+  initial: true
+  getter: isJavaEnabledForLocalFiles
+
+# Unlike the imagesEnabled setting, this only suppresses the network load of
+# the image URL. A cached image will still be rendered if requested.
+loadsImagesAutomatically:
+  initial: false
+  onChange: imagesEnabledChanged
+imagesEnabled:
+  initial: true
+  getter: areImagesEnabled
+  onChange: imagesEnabledChanged
+scriptEnabled:
+  initial: false
+  getter: isScriptEnabled
+  onChange: scriptEnabledChanged
+pluginsEnabled:
+  initial: false
+  getter: arePluginsEnabled
+  onChange: pluginsEnabledChanged
+
+usesPageCache:
+  initial: false
+  onChange: usesPageCacheChanged
+
+dnsPrefetchingEnabled:
+  initial: false
+  onChange: dnsPrefetchingEnabledChanged
+
+backgroundShouldExtendBeyondPage:
+  initial: false
+  onChange: backgroundShouldExtendBeyondPageChanged
+
+scrollingPerformanceLoggingEnabled:
+  initial: false
+  onChange: scrollingPerformanceLoggingEnabledChanged
+
+hiddenPageDOMTimerThrottlingEnabled:
+  initial: false
+  onChange: hiddenPageDOMTimerThrottlingStateChanged
+hiddenPageDOMTimerThrottlingAutoIncreases:
+  initial: false
+  onChange: hiddenPageDOMTimerThrottlingStateChanged
+hiddenPageCSSAnimationSuspensionEnabled:
+  initial: false
+  onChange: hiddenPageCSSAnimationSuspensionEnabledChanged
+
+storageBlockingPolicy:
+  type: SecurityOrigin::StorageBlockingPolicy
+  initial: SecurityOrigin::AllowAllStorage
+  onChange: storageBlockingPolicyChanged
+
+# Only set by Layout Tests.
+mediaTypeOverride:
+  type: String
+  initial: '"screen"'
+  onChange: mediaTypeOverrideChanged
+
+
+fontRenderingMode:
+  type: FontRenderingMode
+  initial: FontRenderingMode::Normal
+
+preferMIMETypeForImages:
+  initial: false
+
+forcePendingWebGLPolicy:
+  initial: false
+  getter: isForcePendingWebGLPolicy
+
+mediaKeysStorageDirectory:
+  type: String
+  conditional: LEGACY_ENCRYPTED_MEDIA
+mediaDeviceIdentifierStorageDirectory:
+  type: String
+  conditional: MEDIA_STREAM
+
+# 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
+
+touchEventEmulationEnabled:
+  initial: false
+  getter: isTouchEventEmulationEnabled
+  conditional: TOUCH_EVENTS
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to