[Settings] Replace SettingsMacros.h with a generated base class for Settings
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Oct 2017 01:13:34 +0000 (01:13 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Oct 2017 01:13:34 +0000 (01:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177681

Patch by Sam Weinig <sam@webkit.org> on 2017-09-30
Reviewed by Darin Adler.

- Adds a SettingsGenerated class that Settings inherits from. The new class
  has the members and getters/setters for all the generated bindings.
- Some default values for settings are literals in Settings.in, but rather
  constants or functions defined externally. These have all been moved to
  SettingsDefaultValues.h to allow for the script to include them all for
  SettingsGenerated.
- Previously, a few enums were declared in Settings.h for use by Settings.
  Now that SettingsGenerated needs access, we standarize the same way that
  exists for the IDL generator; expecting the enum to be in a header of the
  same name.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* WebCoreMacros.cmake:

    Add new files / generation steps.

* Scripts/GenerateSettings.py:
* Scripts/GenerateSettings/GenerateSettings.py:
* Scripts/GenerateSettings/GenerateSettingsHeaderFile.py: Added.
* Scripts/GenerateSettings/GenerateSettingsImplementationFile.py: Added.
* Scripts/GenerateSettings/GenerateSettingsMacrosHeader.py: Removed.
* Scripts/GenerateSettings/Settings.py:

    Replace script to generate SettingsMacros.h with scripts to generate a SettingsGenerated.{h,cpp}.

* accessibility/ForcedAccessibilityValue.h: Added.
* editing/EditableLinkBehavior.h: Added.
* editing/EditingBehavior.h:
* editing/EditingBehaviorType.h: Copied from editing/EditingBehaviorTypes.h.
* editing/EditingBehaviorTypes.h: Removed.
* editing/cocoa/DataDetection.h:
* editing/cocoa/DataDetectorTypes.h: Added.
* page/DebugOverlayRegions.h: Added.
* page/FrameFlattening.h: Added.
* page/PDFImageCachingPolicy.h: Added.
* page/TextDirectionSubmenuInclusionBehavior.h: Added.
* page/UserInterfaceDirectionPolicy.h: Added.
* platform/text/TextDirection.h: Added.
* platform/text/WritingMode.h:

    Split out enums from Settings.h

* css/MediaQueryEvaluator.cpp:

    Update for new name of ForcedAccessibilityValue.

* html/parser/HTMLParserOptions.cpp:

    Update for new name of defaultMaximumHTMLParserDOMTreeDepth.

* page/Settings.cpp:
* page/Settings.h:

    - Move defaults to SettingsDefaultValues.h (and SettingsDefaultValuesCocoa.mm for defaultTextAutosizingEnabled).
    - Move enums to their own files.
    - Inherit from SettingsGenerated.h

* page/Settings.in:

    - Use new 'include' option for javaScriptRuntimeFlags setting to include <runtime/RuntimeFlags.h>,
      as it doesn't fit the normal idiomatic model.
    - Replace call to defaultMinimumZoomFontSize() with direct constant access.

* page/SettingsDefaultValues.h: Added.
* page/cocoa/SettingsDefaultValuesCocoa.mm: Added.

    Move default values from Settings to this new file.

* page/cocoa/SettingsCocoa.mm:

    Move defaultTextAutosizingEnabled() out of here and into SettingsDefaultValuesCocoa.mm.

* style/StyleTreeResolver.cpp:

    - Update for new scoping of defaultMaximumRenderTreeDepth.
    - Move defaultMaximumRenderTreeDepth from Settings here. This is the only use.

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::forcedColorsAreInvertedAccessibilityValue const):
(WebCore::InternalSettings::setForcedColorsAreInvertedAccessibilityValue):
(WebCore::InternalSettings::forcedDisplayIsMonochromeAccessibilityValue const):
(WebCore::InternalSettings::setForcedDisplayIsMonochromeAccessibilityValue):
(WebCore::InternalSettings::forcedPrefersReducedMotionAccessibilityValue const):
(WebCore::InternalSettings::setForcedPrefersReducedMotionAccessibilityValue):
(WebCore::settingsToInternalSettingsValue): Deleted.
(WebCore::internalSettingsToSettingsValue): Deleted.
* testing/InternalSettings.h:

    Replace duplicate definition of ForcedAccessibilityValue with a using declaration
    and simplify code now that it doesn't need to map between the two enums.

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

35 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Scripts/GenerateSettings.py
Source/WebCore/Scripts/GenerateSettings/GenerateSettings.py
Source/WebCore/Scripts/GenerateSettings/GenerateSettingsHeaderFile.py [new file with mode: 0755]
Source/WebCore/Scripts/GenerateSettings/GenerateSettingsImplementationFile.py [new file with mode: 0755]
Source/WebCore/Scripts/GenerateSettings/GenerateSettingsMacrosHeader.py [deleted file]
Source/WebCore/Scripts/GenerateSettings/Settings.py
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/WebCoreMacros.cmake
Source/WebCore/accessibility/ForcedAccessibilityValue.h [new file with mode: 0644]
Source/WebCore/css/MediaQueryEvaluator.cpp
Source/WebCore/editing/EditableLinkBehavior.h [new file with mode: 0644]
Source/WebCore/editing/EditingBehavior.h
Source/WebCore/editing/EditingBehaviorType.h [moved from Source/WebCore/editing/EditingBehaviorTypes.h with 100% similarity]
Source/WebCore/editing/cocoa/DataDetection.h
Source/WebCore/editing/cocoa/DataDetectorTypes.h [new file with mode: 0644]
Source/WebCore/html/parser/HTMLParserOptions.cpp
Source/WebCore/page/DebugOverlayRegions.h [new file with mode: 0644]
Source/WebCore/page/FrameFlattening.h [new file with mode: 0644]
Source/WebCore/page/PDFImageCachingPolicy.h [new file with mode: 0644]
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/page/Settings.in
Source/WebCore/page/SettingsDefaultValues.h [new file with mode: 0644]
Source/WebCore/page/TextDirectionSubmenuInclusionBehavior.h [new file with mode: 0644]
Source/WebCore/page/UserInterfaceDirectionPolicy.h [new file with mode: 0644]
Source/WebCore/page/cocoa/SettingsCocoa.mm
Source/WebCore/page/cocoa/SettingsDefaultValuesCocoa.mm [new file with mode: 0644]
Source/WebCore/platform/text/TextDirection.h [new file with mode: 0644]
Source/WebCore/platform/text/WritingMode.h
Source/WebCore/style/StyleTreeResolver.cpp
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h

index 8886e14..7b5f07c 100644 (file)
@@ -4019,8 +4019,9 @@ GENERATE_EVENT_FACTORY(${WEBCORE_DIR}/dom/EventTargetFactory.in EventTargetInter
 list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/EventTargetInterfaces.h)
 
 
-GENERATE_SETTINGS_MACROS(${WEBCORE_DIR}/page/Settings.in SettingsMacros.h)
-list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SettingsMacros.h)
+GENERATE_SETTINGS_MACROS(${WEBCORE_DIR}/page/Settings.in SettingsGenerated.h)
+list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SettingsGenerated.h)
+list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SettingsGenerated.cpp)
 list(APPEND WebCoreTestSupport_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.cpp)
 
 
index 141fb88..0e04cb6 100644 (file)
@@ -1,3 +1,103 @@
+2017-09-30  Sam Weinig  <sam@webkit.org>
+
+        [Settings] Replace SettingsMacros.h with a generated base class for Settings
+        https://bugs.webkit.org/show_bug.cgi?id=177681
+
+        Reviewed by Darin Adler.
+
+        - Adds a SettingsGenerated class that Settings inherits from. The new class
+          has the members and getters/setters for all the generated bindings.
+        - Some default values for settings are literals in Settings.in, but rather
+          constants or functions defined externally. These have all been moved to
+          SettingsDefaultValues.h to allow for the script to include them all for
+          SettingsGenerated.
+        - Previously, a few enums were declared in Settings.h for use by Settings.
+          Now that SettingsGenerated needs access, we standarize the same way that
+          exists for the IDL generator; expecting the enum to be in a header of the
+          same name.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * WebCoreMacros.cmake:
+
+            Add new files / generation steps.
+        
+        * Scripts/GenerateSettings.py:
+        * Scripts/GenerateSettings/GenerateSettings.py:
+        * Scripts/GenerateSettings/GenerateSettingsHeaderFile.py: Added.
+        * Scripts/GenerateSettings/GenerateSettingsImplementationFile.py: Added.
+        * Scripts/GenerateSettings/GenerateSettingsMacrosHeader.py: Removed.
+        * Scripts/GenerateSettings/Settings.py:
+        
+            Replace script to generate SettingsMacros.h with scripts to generate a SettingsGenerated.{h,cpp}.
+        
+        * accessibility/ForcedAccessibilityValue.h: Added.
+        * editing/EditableLinkBehavior.h: Added.
+        * editing/EditingBehavior.h:
+        * editing/EditingBehaviorType.h: Copied from editing/EditingBehaviorTypes.h.
+        * editing/EditingBehaviorTypes.h: Removed.
+        * editing/cocoa/DataDetection.h:
+        * editing/cocoa/DataDetectorTypes.h: Added.
+        * page/DebugOverlayRegions.h: Added.
+        * page/FrameFlattening.h: Added.
+        * page/PDFImageCachingPolicy.h: Added.
+        * page/TextDirectionSubmenuInclusionBehavior.h: Added.
+        * page/UserInterfaceDirectionPolicy.h: Added.
+        * platform/text/TextDirection.h: Added.
+        * platform/text/WritingMode.h:
+
+            Split out enums from Settings.h
+
+        * css/MediaQueryEvaluator.cpp:
+
+            Update for new name of ForcedAccessibilityValue.
+
+        * html/parser/HTMLParserOptions.cpp:
+
+            Update for new name of defaultMaximumHTMLParserDOMTreeDepth.
+
+        * page/Settings.cpp:
+        * page/Settings.h:
+        
+            - Move defaults to SettingsDefaultValues.h (and SettingsDefaultValuesCocoa.mm for defaultTextAutosizingEnabled).
+            - Move enums to their own files.
+            - Inherit from SettingsGenerated.h
+        
+        * page/Settings.in:
+        
+            - Use new 'include' option for javaScriptRuntimeFlags setting to include <runtime/RuntimeFlags.h>,
+              as it doesn't fit the normal idiomatic model.
+            - Replace call to defaultMinimumZoomFontSize() with direct constant access.
+
+        * page/SettingsDefaultValues.h: Added.
+        * page/cocoa/SettingsDefaultValuesCocoa.mm: Added.
+
+            Move default values from Settings to this new file.
+
+        * page/cocoa/SettingsCocoa.mm:
+        
+            Move defaultTextAutosizingEnabled() out of here and into SettingsDefaultValuesCocoa.mm.
+        
+        * style/StyleTreeResolver.cpp:
+
+            - Update for new scoping of defaultMaximumRenderTreeDepth.
+            - Move defaultMaximumRenderTreeDepth from Settings here. This is the only use.
+
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::forcedColorsAreInvertedAccessibilityValue const):
+        (WebCore::InternalSettings::setForcedColorsAreInvertedAccessibilityValue):
+        (WebCore::InternalSettings::forcedDisplayIsMonochromeAccessibilityValue const):
+        (WebCore::InternalSettings::setForcedDisplayIsMonochromeAccessibilityValue):
+        (WebCore::InternalSettings::forcedPrefersReducedMotionAccessibilityValue const):
+        (WebCore::InternalSettings::setForcedPrefersReducedMotionAccessibilityValue):
+        (WebCore::settingsToInternalSettingsValue): Deleted.
+        (WebCore::internalSettingsToSettingsValue): Deleted.
+        * testing/InternalSettings.h:
+        
+            Replace duplicate definition of ForcedAccessibilityValue with a using declaration
+            and simplify code now that it doesn't need to map between the two enums.
+
 2017-09-30  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [iOS WK2] API test EditorStateTests.ContentViewHasTextInContentEditableElement is a flaky failure
index 45c626b..108b377 100644 (file)
@@ -1378,12 +1378,13 @@ GENERATE_SETTINGS_SCRIPTS = \
     $(WebCore)/Scripts/GenerateSettings/GenerateInternalSettingsIDLFile.py \
     $(WebCore)/Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py \
     $(WebCore)/Scripts/GenerateSettings/GenerateSettings.py \
-    $(WebCore)/Scripts/GenerateSettings/GenerateSettingsMacrosHeader.py \
+    $(WebCore)/Scripts/GenerateSettings/GenerateSettingsHeaderFile.py \
+    $(WebCore)/Scripts/GenerateSettings/GenerateSettingsImplementationFile.py \
     $(WebCore)/Scripts/GenerateSettings/Settings.py \
     $(WebCore)/Scripts/GenerateSettings/__init__.py
 
-all : InternalSettingsGenerated.idl InternalSettingsGenerated.cpp InternalSettingsGenerated.h SettingsMacros.h
-InternalSettingsGenerated%idl InternalSettingsGenerated%cpp InternalSettingsGenerated%h SettingsMacros%h : $(WebCore)/Scripts/GenerateSettings.py $(GENERATE_SETTINGS_SCRIPTS) page/Settings.in
+all : InternalSettingsGenerated.idl InternalSettingsGenerated.cpp InternalSettingsGenerated.h SettingsGenerated.cpp SettingsGenerated.h
+InternalSettingsGenerated%idl InternalSettingsGenerated%cpp InternalSettingsGenerated%h SettingsGenerated%cpp SettingsGenerated%h : $(WebCore)/Scripts/GenerateSettings.py $(GENERATE_SETTINGS_SCRIPTS) page/Settings.in
        $(PYTHON) $< --input $(WebCore)/page/Settings.in
 
 # --------
index 92cb4f7..e2bac81 100755 (executable)
@@ -49,7 +49,8 @@ def main():
 
     settings = parseInput(options.input)
 
-    generateSettingsMacrosHeader(outputDirectory, settings)
+    generateSettingsHeaderFile(outputDirectory, settings)
+    generateSettingsImplementationFile(outputDirectory, settings)
     generateInternalSettingsIDLFile(outputDirectory, settings)
     generateInternalSettingsHeaderFile(outputDirectory, settings)
     generateInternalSettingsImplementationFile(outputDirectory, settings)
index 4038102..0089fee 100644 (file)
@@ -1,5 +1,6 @@
 from Settings import *
-from GenerateInternalSettingsHeaderFile import *
 from GenerateInternalSettingsIDLFile import *
+from GenerateInternalSettingsHeaderFile import *
 from GenerateInternalSettingsImplementationFile import *
-from GenerateSettingsMacrosHeader import *
+from GenerateSettingsHeaderFile import *
+from GenerateSettingsImplementationFile import *
diff --git a/Source/WebCore/Scripts/GenerateSettings/GenerateSettingsHeaderFile.py b/Source/WebCore/Scripts/GenerateSettings/GenerateSettingsHeaderFile.py
new file mode 100755 (executable)
index 0000000..5b97a28
--- /dev/null
@@ -0,0 +1,234 @@
+#!/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
+
+from Settings import license, makeConditionalString, makeSetterFunctionName
+
+
+def generateSettingsHeaderFile(outputDirectory, settings):
+    outputPath = os.path.join(outputDirectory, "SettingsGenerated.h")
+    outputFile = open(outputPath, 'w')
+    outputFile.write(license())
+
+    settingsByConditional = {}
+    unconditionalSettings = {}
+
+    for settingName in sorted(settings.iterkeys()):
+        setting = settings[settingName]
+        if setting.conditional:
+            if setting.conditional not in settingsByConditional:
+                settingsByConditional[setting.conditional] = {}
+            settingsByConditional[setting.conditional][setting.name] = True
+        else:
+            unconditionalSettings[setting.name] = True
+
+    sortedUnconditionalSettingsNames = sorted(unconditionalSettings.iterkeys())
+    sortedConditionals = sorted(settingsByConditional.iterkeys())
+
+    outputFile.write("#pragma once\n\n")
+
+    outputFile.write("#include <wtf/RefCounted.h>\n\n")
+
+    printIncludes(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settingsByConditional, settings)
+
+    outputFile.write("namespace WebCore {\n\n")
+
+    outputFile.write("class Page;\n\n")
+
+    outputFile.write("class SettingsGenerated : public RefCounted<SettingsGenerated> {\n")
+    outputFile.write("public:\n")
+    outputFile.write("    ~SettingsGenerated();\n\n")
+
+    printGettersAndSetters(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settingsByConditional, settings)
+
+    outputFile.write("\n")
+    outputFile.write("protected:\n")
+    outputFile.write("    SettingsGenerated();\n\n")
+
+    outputFile.write("    Page* m_page { nullptr };\n")
+    printMemberVariables(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settingsByConditional, settings)
+
+    outputFile.write("};\n\n")
+    outputFile.write("}\n")
+
+    outputFile.close()
+
+
+def includeForSetting(setting):
+    # Always prefer an explicit include.
+    if setting.include:
+        return setting.include
+
+    # Include nothing for primitive types.
+    if setting.type == 'int':
+        return None
+    if setting.type == 'unsigned':
+        return None
+    if setting.type == 'double':
+        return None
+    if setting.type == 'float':
+        return None
+    if setting.type == 'bool':
+        return None
+
+    # Special case String, as it doesn't follow the pattern of being in a file with the
+    # same name as the class.
+    if setting.type == 'String':
+        return "<wtf/text/WTFString.h>"
+
+    # Default to using the type name for the include.
+    return "\"" + setting.type + ".h\""
+
+
+def printIncludes(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settingsByConditional, settings):
+    unconditionalIncludes = set()
+    includesByConditional = {}
+
+    for unconditionalSettingName in sortedUnconditionalSettingsNames:
+        include = includeForSetting(settings[unconditionalSettingName])
+        if include:
+            unconditionalIncludes.add(include)
+
+    for conditional in sortedConditionals:
+        includesForCondition = set()
+        for settingName in sorted(settingsByConditional[conditional].iterkeys()):
+            include = includeForSetting(settings[settingName])
+            if include and include not in unconditionalIncludes:
+                includesForCondition.add(include)
+
+        if len(includesForCondition) != 0:
+            includesByConditional[conditional] = includesForCondition
+
+    for unconditionalInclude in sorted(unconditionalIncludes):
+        outputFile.write("#include " + unconditionalInclude + "\n")
+
+    outputFile.write("\n")
+
+    for conditional in sorted(includesByConditional.iterkeys()):
+        outputFile.write("#if " + makeConditionalString(conditional) + "\n")
+
+        for conditionalInclude in sorted(includesByConditional[conditional]):
+            outputFile.write("#include " + conditionalInclude + "\n")
+
+        outputFile.write("#endif\n\n")
+
+
+def printGetterAndSetter(outputFile, setting):
+    setterFunctionName = makeSetterFunctionName(setting)
+
+    # Export is only needed if the definition is not in the header.
+    webcoreExport = "WEBCORE_EXPORT " if setting.setNeedsStyleRecalcInAllFrames else ""
+
+    if setting.type[0].islower():
+        outputFile.write("    " + setting.type + " " + setting.name + "() const { return m_" + setting.name + "; } \n")
+        outputFile.write("    " + webcoreExport + "void " + setterFunctionName + "(" + setting.type + " " + setting.name + ")")
+    else:
+        outputFile.write("    const " + setting.type + "& " + setting.name + "() const { return m_" + setting.name + "; } \n")
+        outputFile.write("    " + webcoreExport + "void " + setterFunctionName + "(const " + setting.type + "& " + setting.name + ")")
+
+    if setting.setNeedsStyleRecalcInAllFrames:
+        outputFile.write("; \n")
+    else:
+        outputFile.write(" { m_" + setting.name + " = " + setting.name + "; } \n")
+
+
+def printGettersAndSetters(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settingsByConditional, settings):
+    for unconditionalSettingName in sortedUnconditionalSettingsNames:
+        printGetterAndSetter(outputFile, settings[unconditionalSettingName])
+
+    for conditional in sortedConditionals:
+        outputFile.write("#if " + makeConditionalString(conditional) + "\n")
+
+        for settingName in sorted(settingsByConditional[conditional].iterkeys()):
+            printGetterAndSetter(outputFile, settings[settingName])
+
+        outputFile.write("#endif\n")
+
+
+def printMemberVariables(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settingsByConditional, settings):
+    # We list the bools together so we can bit pack them.
+
+    # Print all the bools
+
+    for unconditionalSettingName in sortedUnconditionalSettingsNames:
+        setting = settings[unconditionalSettingName]
+        if setting.type != "bool":
+            continue
+        outputFile.write("    " + setting.type + " m_" + setting.name + " : 1; \n")
+
+    for conditional in sortedConditionals:
+        sortedSettingsNames = sorted(settingsByConditional[conditional].iterkeys())
+
+        hasMember = False
+        for settingName in sortedSettingsNames:
+            setting = settings[settingName]
+            if setting.type == "bool":
+                hasMember = True
+                break
+
+        if not hasMember:
+            continue
+
+        outputFile.write("#if " + makeConditionalString(conditional) + "\n")
+
+        for settingName in sortedSettingsNames:
+            setting = settings[settingName]
+            if setting.type != "bool":
+                continue
+            outputFile.write("    " + setting.type + " m_" + setting.name + " : 1; \n")
+
+        outputFile.write("#endif\n")
+
+    # Print all the non-bools
+
+    for unconditionalSettingName in sortedUnconditionalSettingsNames:
+        setting = settings[unconditionalSettingName]
+        if setting.type == "bool":
+            continue
+        outputFile.write("    " + setting.type + " m_" + setting.name + ";\n")
+
+    for conditional in sortedConditionals:
+        sortedSettingsNames = sorted(settingsByConditional[conditional].iterkeys())
+
+        hasMember = False
+        for settingName in sortedSettingsNames:
+            setting = settings[settingName]
+            if setting.type != "bool":
+                hasMember = True
+                break
+
+        if not hasMember:
+            continue
+
+        outputFile.write("#if " + makeConditionalString(conditional) + "\n")
+
+        for settingName in sortedSettingsNames:
+            setting = settings[settingName]
+            if setting.type == "bool":
+                continue
+            outputFile.write("    " + setting.type + " m_" + setting.name + ";\n")
+
+        outputFile.write("#endif\n")
diff --git a/Source/WebCore/Scripts/GenerateSettings/GenerateSettingsImplementationFile.py b/Source/WebCore/Scripts/GenerateSettings/GenerateSettingsImplementationFile.py
new file mode 100755 (executable)
index 0000000..cef4bb0
--- /dev/null
@@ -0,0 +1,194 @@
+#!/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
+
+from Settings import license, makeConditionalString, makeSetterFunctionName
+
+
+def generateSettingsImplementationFile(outputDirectory, settings):
+    outputPath = os.path.join(outputDirectory, "SettingsGenerated.cpp")
+    outputFile = open(outputPath, 'w')
+    outputFile.write(license())
+
+    settingsByConditional = {}
+    unconditionalSettings = {}
+
+    for settingName in sorted(settings.iterkeys()):
+        setting = settings[settingName]
+        if setting.conditional:
+            if setting.conditional not in settingsByConditional:
+                settingsByConditional[setting.conditional] = {}
+            settingsByConditional[setting.conditional][setting.name] = True
+        else:
+            unconditionalSettings[setting.name] = True
+
+    sortedUnconditionalSettingsNames = sorted(unconditionalSettings.iterkeys())
+    sortedConditionals = sorted(settingsByConditional.iterkeys())
+
+    outputFile.write("#include \"config.h\"\n")
+    outputFile.write("#include \"SettingsGenerated.h\"\n\n")
+
+    outputFile.write("#include \"Page.h\"\n")
+    outputFile.write("#include \"SettingsDefaultValues.h\"\n\n")
+
+    outputFile.write("namespace WebCore {\n\n")
+
+    printConstructor(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settingsByConditional, settings)
+
+    outputFile.write("SettingsGenerated::~SettingsGenerated()\n")
+    outputFile.write("{\n")
+    outputFile.write("}\n\n")
+
+    printSetterBodies(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settingsByConditional, settings)
+
+    outputFile.write("}\n")
+
+    outputFile.close()
+
+
+def needsInitializer(setting, state):
+    if not setting.initial:
+        return False
+
+    if state["processingBool"] and setting.type != "bool":
+        return False
+
+    if not state["processingBool"] and setting.type == "bool":
+        return False
+
+    return True
+
+
+def printInitializer(outputFile, setting, state):
+    if not needsInitializer(setting, state):
+        return
+
+    if not state["handledFirstVariable"]:
+        outputFile.write("    : m_" + setting.name + "(" + setting.initial + ")\n")
+        state["handledFirstVariable"] = True
+    else:
+        outputFile.write("    , m_" + setting.name + "(" + setting.initial + ")\n")
+
+
+def printConditionalInitializers(outputFile, conditional, settingsByConditional, settings, state):
+    hasInitializer = False
+
+    sortedSettingsNames = sorted(settingsByConditional[conditional].iterkeys())
+    for settingName in sortedSettingsNames:
+        setting = settings[settingName]
+        if needsInitializer(setting, state):
+            hasInitializer = True
+            break
+
+    if not hasInitializer:
+        return
+
+    outputFile.write("#if " + makeConditionalString(conditional) + "\n")
+
+    for settingName in sortedSettingsNames:
+        setting = settings[settingName]
+        printInitializer(outputFile, setting, state)
+
+    outputFile.write("#endif\n")
+
+
+def printConstructor(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settingsByConditional, settings):
+    outputFile.write("SettingsGenerated::SettingsGenerated()\n")
+
+    state = {
+        "handledFirstVariable": False,
+        "processingBool": True
+    }
+
+    for unconditionalSettingName in sortedUnconditionalSettingsNames:
+        setting = settings[unconditionalSettingName]
+        printInitializer(outputFile, setting, state)
+
+    for conditional in sortedConditionals:
+        printConditionalInitializers(outputFile, conditional, settingsByConditional, settings, state)
+
+    state["processingBool"] = False
+
+    for unconditionalSettingName in sortedUnconditionalSettingsNames:
+        setting = settings[unconditionalSettingName]
+        printInitializer(outputFile, setting, state)
+
+    for conditional in sortedConditionals:
+        printConditionalInitializers(outputFile, conditional, settingsByConditional, settings, state)
+
+    outputFile.write("{\n")
+    outputFile.write("}\n\n")
+
+
+def needsSetterBody(setting):
+    if setting.setNeedsStyleRecalcInAllFrames:
+        return True
+    return False
+
+
+def printSetterBody(outputFile, setting):
+    if not needsSetterBody(setting):
+        return
+
+    setterFunctionName = makeSetterFunctionName(setting)
+
+    if setting.type[0].islower():
+        outputFile.write("void SettingsGenerated::" + setterFunctionName + "(" + setting.type + " " + setting.name + ")\n")
+    else:
+        outputFile.write("void SettingsGenerated::" + setterFunctionName + "(const " + setting.type + "& " + setting.name + ")\n")
+
+    outputFile.write("{\n")
+    outputFile.write("    if (m_" + setting.name + " == " + setting.name + ")\n")
+    outputFile.write("        return;\n")
+    outputFile.write("    m_" + setting.name + " = " + setting.name + ";\n")
+    outputFile.write("    m_page->setNeedsRecalcStyleInAllFrames();\n")
+    outputFile.write("}\n\n")
+
+
+def printSetterBodies(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settingsByConditional, settings):
+    for unconditionalSettingName in sortedUnconditionalSettingsNames:
+        setting = settings[unconditionalSettingName]
+        printSetterBody(outputFile, setting)
+
+    for conditional in sortedConditionals:
+        hasSetter = False
+        sortedSettingsNames = sorted(settingsByConditional[conditional].iterkeys())
+        for settingName in sortedSettingsNames:
+            setting = settings[settingName]
+            if needsSetterBody(setting):
+                hasSetter = True
+                break
+
+        if not hasSetter:
+            continue
+
+        outputFile.write("#if " + makeConditionalString(conditional) + "\n")
+
+        for settingName in sortedSettingsNames:
+            setting = settings[settingName]
+            printSetterBody(outputFile, setting)
+
+        outputFile.write("#endif\n")
diff --git a/Source/WebCore/Scripts/GenerateSettings/GenerateSettingsMacrosHeader.py b/Source/WebCore/Scripts/GenerateSettings/GenerateSettingsMacrosHeader.py
deleted file mode 100755 (executable)
index f0c3265..0000000
+++ /dev/null
@@ -1,272 +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
-
-from Settings import license, makeConditionalString, makeSetterFunctionName, makePreferredConditional
-
-
-def generateSettingsMacrosHeader(outputDirectory, settings):
-    settingsByConditional = {}
-    unconditionalSettings = {}
-
-    for settingName in sorted(settings.iterkeys()):
-        setting = settings[settingName]
-        if setting.conditional:
-            if setting.conditional not in settingsByConditional:
-                settingsByConditional[setting.conditional] = {}
-            settingsByConditional[setting.conditional][setting.name] = True
-        else:
-            unconditionalSettings[setting.name] = True
-
-    outputPath = os.path.join(outputDirectory, "SettingsMacros.h")
-    outputFile = open(outputPath, 'w')
-    outputFile.write(license())
-
-    # FIXME: Sort by type so bools come last and are bit packed.
-
-    # FIXME: Convert to #pragma once
-    outputFile.write("#ifndef SettingsMacros_h\n")
-    outputFile.write("#define SettingsMacros_h\n\n")
-
-    sortedUnconditionalSettingsNames = sorted(unconditionalSettings.iterkeys())
-    sortedConditionals = sorted(settingsByConditional.iterkeys())
-
-    printConditionalMacros(outputFile, sortedConditionals, settingsByConditional, settings)
-
-    printGettersAndSetters(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settings)
-    printMemberVariables(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settings)
-    printInitializerList(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settings)
-    printSetterBodies(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settings)
-
-    outputFile.write("#endif // SettingsMacros_h\n")
-    outputFile.close()
-
-
-def printGetterAndSetter(outputFile, setting):
-    setterFunctionName = makeSetterFunctionName(setting)
-
-    # Export is only needed if the definition is not in the header.
-    webcoreExport = "WEBCORE_EXPORT" if setting.setNeedsStyleRecalcInAllFrames else ""
-
-    # FIXME: When webcoreExport is "", line has extra space.
-
-    if setting.type[0].islower():
-        outputFile.write("    " + setting.type + " " + setting.name + "() const { return m_" + setting.name + "; } \\\n")
-        outputFile.write("    " + webcoreExport + " void " + setterFunctionName + "(" + setting.type + " " + setting.name + ")")
-    else:
-        outputFile.write("    const " + setting.type + "& " + setting.name + "() const { return m_" + setting.name + "; } \\\n")
-        outputFile.write("    " + webcoreExport + " void " + setterFunctionName + "(const " + setting.type + "& " + setting.name + ")")
-
-    if setting.setNeedsStyleRecalcInAllFrames:
-        outputFile.write("; \\\n")
-    else:
-        outputFile.write(" { m_" + setting.name + " = " + setting.name + "; } \\\n")
-
-
-def printSetterBody(outputFile, setting):
-    if not setting.setNeedsStyleRecalcInAllFrames:
-        return
-
-    setterFunctionName = makeSetterFunctionName(setting)
-
-    if setting.type[0].islower():
-        outputFile.write("void Settings::" + setterFunctionName + "(" + setting.type + " " + setting.name + ") \\\n")
-    else:
-        outputFile.write("void Settings::" + setterFunctionName + "(const " + setting.type + "& " + setting.name + ") \\\n")
-
-    outputFile.write("{ \\\n")
-    outputFile.write("    if (m_" + setting.name + " == " + setting.name + ") \\\n")
-    outputFile.write("        return; \\\n")
-    outputFile.write("    m_" + setting.name + " = " + setting.name + "; \\\n")
-    outputFile.write("    m_page->setNeedsRecalcStyleInAllFrames(); \\\n")
-    outputFile.write("} \\\n")
-
-
-def printConditionalMacros(outputFile, sortedConditionals, settingsByConditional, settings):
-    for conditional in sortedConditionals:
-        outputFile.write("#if " + makeConditionalString(conditional) + "\n")
-
-        # Getter/Setters
-
-        sortedSettingsNames = sorted(settingsByConditional[conditional].iterkeys())
-
-        preferredConditional = makePreferredConditional(conditional)
-
-        outputFile.write("#define " + preferredConditional + "_SETTINGS_GETTER_AND_SETTERS \\\n")
-
-        for settingName in sortedSettingsNames:
-            printGetterAndSetter(outputFile, settings[settingName])
-
-        outputFile.write("// End of " + preferredConditional + "_SETTINGS_GETTER_AND_SETTERS\n")
-
-        # Member variables
-
-        outputFile.write("#define " + preferredConditional + "_SETTINGS_NON_BOOL_MEMBER_VARIABLES \\\n")
-
-        for settingName in sortedSettingsNames:
-            setting = settings[settingName]
-            if setting.type == 'bool':
-                continue
-            outputFile.write("    " + setting.type + " m_" + setting.name + "; \\\n")
-
-        outputFile.write("// End of " + preferredConditional + "_SETTINGS_NON_BOOL_MEMBER_VARIABLES\n")
-
-        outputFile.write("#define " + preferredConditional + "_SETTINGS_BOOL_MEMBER_VARIABLES \\\n")
-
-        for settingName in sortedSettingsNames:
-            setting = settings[settingName]
-            if setting.type != 'bool':
-                continue
-            outputFile.write("    " + setting.type + " m_" + setting.name + " : 1; \\\n")
-
-        outputFile.write("// End of " + preferredConditional + "_SETTINGS_BOOL_MEMBER_VARIABLES\n")
-
-        # Initializers
-
-        outputFile.write("#define " + preferredConditional + "_SETTINGS_NON_BOOL_INITIALIZERS \\\n")
-
-        for settingName in sortedSettingsNames:
-            setting = settings[settingName]
-            if setting.type == 'bool':
-                continue
-            if not setting.initial:
-                continue
-            outputFile.write("    , m_" + setting.name + "(" + setting.initial + ") \\\n")
-
-        outputFile.write("// End of " + preferredConditional + "_SETTINGS_NON_BOOL_INITIALIZERS\n")
-
-        outputFile.write("#define " + preferredConditional + "_SETTINGS_BOOL_INITIALIZERS \\\n")
-
-        for settingName in sortedSettingsNames:
-            setting = settings[settingName]
-            if setting.type != 'bool':
-                continue
-            if not setting.initial:
-                continue
-            outputFile.write("    , m_" + setting.name + "(" + setting.initial + ") \\\n")
-
-        outputFile.write("// End of " + preferredConditional + "_SETTINGS_BOOL_INITIALIZERS\n")
-
-        # Setter Bodies
-
-        outputFile.write("#define " + preferredConditional + "_SETTINGS_SETTER_BODIES \\\n")
-
-        for settingName in sortedSettingsNames:
-            setting = settings[settingName]
-            printSetterBody(outputFile, setting)
-
-        outputFile.write("// End of " + preferredConditional + "_SETTINGS_SETTER_BODIES\n")
-
-        outputFile.write("#else\n")
-        outputFile.write("#define " + preferredConditional + "_SETTINGS_GETTER_AND_SETTERS\n")
-        outputFile.write("#define " + preferredConditional + "_SETTINGS_NON_BOOL_MEMBER_VARIABLES\n")
-        outputFile.write("#define " + preferredConditional + "_SETTINGS_BOOL_MEMBER_VARIABLES\n")
-        outputFile.write("#define " + preferredConditional + "_SETTINGS_NON_BOOL_INITIALIZERS\n")
-        outputFile.write("#define " + preferredConditional + "_SETTINGS_BOOL_INITIALIZERS\n")
-        outputFile.write("#define " + preferredConditional + "_SETTINGS_SETTER_BODIES\n")
-        outputFile.write("#endif\n")
-        outputFile.write("\n")
-
-
-def printGettersAndSetters(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settings):
-    outputFile.write("#define SETTINGS_GETTERS_AND_SETTERS \\\n")
-
-    for unconditionalSettingName in sortedUnconditionalSettingsNames:
-        printGetterAndSetter(outputFile, settings[unconditionalSettingName])
-
-    for conditional in sortedConditionals:
-        outputFile.write("    " + makePreferredConditional(conditional) + "_SETTINGS_GETTER_AND_SETTERS \\\n")
-
-    outputFile.write("// End of SETTINGS_GETTERS_AND_SETTERS.\n\n")
-
-
-def printMemberVariables(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settings):
-    outputFile.write("#define SETTINGS_MEMBER_VARIABLES \\\n")
-
-    # We list the bools last so we can bit pack them.
-
-    for unconditionalSettingName in sortedUnconditionalSettingsNames:
-        setting = settings[unconditionalSettingName]
-        if setting.type == "bool":
-            continue
-        outputFile.write("    " + setting.type + " m_" + setting.name + "; \\\n")
-
-    for conditional in sortedConditionals:
-        outputFile.write("    " + makePreferredConditional(conditional) + "_SETTINGS_NON_BOOL_MEMBER_VARIABLES \\\n")
-
-    for unconditionalSettingName in sortedUnconditionalSettingsNames:
-        setting = settings[unconditionalSettingName]
-        if setting.type != "bool":
-            continue
-        outputFile.write("    " + setting.type + " m_" + setting.name + " : 1; \\\n")
-
-    for conditional in sortedConditionals:
-        outputFile.write("    " + makePreferredConditional(conditional) + "_SETTINGS_BOOL_MEMBER_VARIABLES \\\n")
-
-    outputFile.write("// End of SETTINGS_MEMBER_VARIABLES.\n\n")
-
-
-def printInitializerList(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settings):
-    outputFile.write("#define SETTINGS_INITIALIZER_LIST \\\n")
-
-    # We list the bools last so we can bit pack them.
-
-    for unconditionalSettingName in sortedUnconditionalSettingsNames:
-        setting = settings[unconditionalSettingName]
-        if setting.type == "bool":
-            continue
-        if not setting.initial:
-            continue
-        outputFile.write("    , m_" + setting.name + "(" + setting.initial + ") \\\n")
-
-    for conditional in sortedConditionals:
-        outputFile.write("    " + makePreferredConditional(conditional) + "_SETTINGS_NON_BOOL_INITIALIZERS \\\n")
-
-    for unconditionalSettingName in sortedUnconditionalSettingsNames:
-        setting = settings[unconditionalSettingName]
-        if setting.type != "bool":
-            continue
-        if not setting.initial:
-            continue
-        outputFile.write("    , m_" + setting.name + "(" + setting.initial + ") \\\n")
-
-    for conditional in sortedConditionals:
-        outputFile.write("    " + makePreferredConditional(conditional) + "_SETTINGS_BOOL_INITIALIZERS \\\n")
-
-    outputFile.write("// End of SETTINGS_INITIALIZER_LIST.\n\n")
-
-
-def printSetterBodies(outputFile, sortedUnconditionalSettingsNames, sortedConditionals, settings):
-    outputFile.write("#define SETTINGS_SETTER_BODIES \\\n")
-
-    for unconditionalSettingName in sortedUnconditionalSettingsNames:
-        setting = settings[unconditionalSettingName]
-        printSetterBody(outputFile, setting)
-
-    for conditional in sortedConditionals:
-        outputFile.write("    " + makePreferredConditional(conditional) + "_SETTINGS_SETTER_BODIES \\\n")
-
-    outputFile.write("// End of SETTINGS_SETTER_BODIES.\n\n")
index 47f1b9e..c4f57be 100755 (executable)
@@ -65,6 +65,7 @@ class Setting:
         self.initial = None
         self.conditional = None
         self.setNeedsStyleRecalcInAllFrames = None
+        self.include = None
 
     def __str__(self):
         result = self.name + " TYPE:" + self.type
@@ -74,6 +75,8 @@ class Setting:
             result += " COND:" + self.conditional
         if (self.setNeedsStyleRecalcInAllFrames):
             result += " RECALC:" + self.setNeedsStyleRecalcInAllFrames
+        if (self.include):
+            result += " INCLUDE:" + self.include
         return result
 
 
@@ -118,7 +121,6 @@ def parseInput(input):
     settings = {}
     for line in open(input, "r"):
         if not line.startswith("#") and not line.isspace():
-
             (name, optionsString) = line.rstrip().split(' ', 1)
 
             options = re.split(r' *, *', optionsString)
@@ -134,6 +136,8 @@ def parseInput(input):
                     setting.conditional = value
                 if (name == 'setNeedsStyleRecalcInAllFrames'):
                     setting.setNeedsStyleRecalcInAllFrames = value
+                if (name == 'include'):
+                    setting.include = value
 
             # FIXME: ASSERT something about setting.initial
 
index 803a725..257236f 100644 (file)
                4E19592B0A39DACC00220FE5 /* MediaQueryEvaluator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4E1959250A39DACC00220FE5 /* MediaQueryEvaluator.cpp */; };
                4E19592C0A39DACC00220FE5 /* MediaQueryEvaluator.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1959260A39DACC00220FE5 /* MediaQueryEvaluator.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4F1534DE11B532EC0021FD86 /* EditingBehavior.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F1534DD11B532EC0021FD86 /* EditingBehavior.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               4F1534E011B533020021FD86 /* EditingBehaviorTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F1534DF11B533020021FD86 /* EditingBehaviorTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               4F1534E011B533020021FD86 /* EditingBehaviorType.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F1534DF11B533020021FD86 /* EditingBehaviorType.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4F6FDD641341DEDD001F8EE3 /* InspectorPageAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F6FDD621341DEDD001F8EE3 /* InspectorPageAgent.cpp */; };
                4F6FDD651341DEDD001F8EE3 /* InspectorPageAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F6FDD631341DEDD001F8EE3 /* InspectorPageAgent.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4FA65A6B1108ABED002615E0 /* MathMLSpaceElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FA65A691108ABED002615E0 /* MathMLSpaceElement.cpp */; };
                53E29E5F167A8A1900586D3D /* InternalSettingsGenerated.h in Headers */ = {isa = PBXBuildFile; fileRef = 53E29E5D167A8A1900586D3D /* InternalSettingsGenerated.h */; };
                53ED3FDE167A88E7006762E6 /* JSInternalSettingsGenerated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 53ED3FDC167A88E7006762E6 /* JSInternalSettingsGenerated.cpp */; };
                53ED3FDF167A88E7006762E6 /* JSInternalSettingsGenerated.h in Headers */ = {isa = PBXBuildFile; fileRef = 53ED3FDD167A88E7006762E6 /* JSInternalSettingsGenerated.h */; };
-               53EF766B16530A61004CBE49 /* SettingsMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 53EF766A16530A61004CBE49 /* SettingsMacros.h */; };
-               53EF766C16531994004CBE49 /* SettingsMacros.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 53EF766A16530A61004CBE49 /* SettingsMacros.h */; };
                550A0BC9085F6039007353D6 /* QualifiedName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BC7085F6039007353D6 /* QualifiedName.cpp */; };
                550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */ = {isa = PBXBuildFile; fileRef = 550A0BC8085F6039007353D6 /* QualifiedName.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5550CB421E955E3C00111AA0 /* ImageTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 5550CB411E955E3C00111AA0 /* ImageTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7AF9B20E18CFB5F400C64BEF /* JSVTTRegionList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AF9B20A18CFB5F300C64BEF /* JSVTTRegionList.cpp */; };
                7AF9B20F18CFB5F400C64BEF /* JSVTTRegionList.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AF9B20B18CFB5F300C64BEF /* JSVTTRegionList.h */; };
                7BE7427381FA906FBB4F0F2C /* JSSVGGraphicsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 950C4C02BED8936F818E2F99 /* JSSVGGraphicsElement.h */; };
+               7C017CB61F7E704B00444E9B /* SettingsGenerated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C017CB21F7E6FFF00444E9B /* SettingsGenerated.cpp */; };
+               7C017CB71F7E705000444E9B /* SettingsGenerated.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C017CB31F7E6FFF00444E9B /* SettingsGenerated.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               7C017CBB1F7E97CE00444E9B /* DebugOverlayRegions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C017CBA1F7E97CE00444E9B /* DebugOverlayRegions.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               7C017CBD1F7E983700444E9B /* EditableLinkBehavior.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C017CBC1F7E983700444E9B /* EditableLinkBehavior.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               7C017CBF1F7E988800444E9B /* ForcedAccessibilityValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C017CBE1F7E988800444E9B /* ForcedAccessibilityValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               7C017CC11F7E99BB00444E9B /* FrameFlattening.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C017CC01F7E99BB00444E9B /* FrameFlattening.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               7C017CC31F7E9A1E00444E9B /* PDFImageCachingPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C017CC21F7E9A1E00444E9B /* PDFImageCachingPolicy.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               7C017CC51F7E9A7400444E9B /* UserInterfaceDirectionPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C017CC41F7E9A7400444E9B /* UserInterfaceDirectionPolicy.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               7C017CC71F7E9ACB00444E9B /* TextDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C017CC61F7E9ACB00444E9B /* TextDirection.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               7C017CC91F7E9B3000444E9B /* TextDirectionSubmenuInclusionBehavior.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C017CC81F7E9B3000444E9B /* TextDirectionSubmenuInclusionBehavior.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               7C017CCB1F7E9B8B00444E9B /* SettingsDefaultValues.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C017CCA1F7E9B8B00444E9B /* SettingsDefaultValues.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               7C017CCF1F7EB28F00444E9B /* DataDetectorTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C017CCE1F7EB28F00444E9B /* DataDetectorTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               7C017CD31F7ECA6300444E9B /* SettingsDefaultValuesCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C017CD11F7ECA6200444E9B /* SettingsDefaultValuesCocoa.mm */; };
                7C1843FD1C8B7283002EB973 /* Autofill.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1843FB1C8B7283002EB973 /* Autofill.cpp */; };
                7C1843FE1C8B7283002EB973 /* Autofill.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C1843FC1C8B7283002EB973 /* Autofill.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7C193BBB1F5E0EED0088F3E6 /* CanvasDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BB61F5E0EB90088F3E6 /* CanvasDirection.h */; };
                9B2D8A7914997CCF00ECEF3E /* UndoStep.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B2D8A7814997CCF00ECEF3E /* UndoStep.h */; settings = {ATTRIBUTES = (Private, ); }; };
                9B32CDA913DF7FA900F34D13 /* RenderedPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B32CDA713DF7FA900F34D13 /* RenderedPosition.h */; };
                9B32CDAA13DF7FA900F34D13 /* RenderedPosition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9B32CDA813DF7FA900F34D13 /* RenderedPosition.cpp */; };
-               9B3A8872145632F9003AE8F5 /* DOMDOMSettableTokenList.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B3A8871145632F9003AE8F5 /* DOMDOMSettableTokenList.h */; };
                9B417064125662B3006B28FC /* ApplyBlockElementCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B417062125662B3006B28FC /* ApplyBlockElementCommand.h */; };
                9B417065125662B3006B28FC /* ApplyBlockElementCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9B417063125662B3006B28FC /* ApplyBlockElementCommand.cpp */; };
                9B50B1DE17CD4C0F0087F63C /* FormNamedItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B50B1DC17CD4C0F0087F63C /* FormNamedItem.h */; settings = {ATTRIBUTES = (Private, ); }; };
                                A8D06B390A265DCD005E7203 /* HTMLNames.h in Copy Generated Headers */,
                                1403BA0F09EB18F900797C7F /* JSDOMWindow.h in Copy Generated Headers */,
                                14DC0D3809FED073007B0235 /* JSNode.h in Copy Generated Headers */,
-                               53EF766C16531994004CBE49 /* SettingsMacros.h in Copy Generated Headers */,
                                08C7A2C710DC7462002D368B /* SVGNames.h in Copy Generated Headers */,
                                1A1414B613A0F0500019996C /* WebKitFontFamilyNames.h in Copy Generated Headers */,
                        );
                4E1959250A39DACC00220FE5 /* MediaQueryEvaluator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MediaQueryEvaluator.cpp; sourceTree = "<group>"; };
                4E1959260A39DACC00220FE5 /* MediaQueryEvaluator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MediaQueryEvaluator.h; sourceTree = "<group>"; };
                4F1534DD11B532EC0021FD86 /* EditingBehavior.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditingBehavior.h; sourceTree = "<group>"; };
-               4F1534DF11B533020021FD86 /* EditingBehaviorTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditingBehaviorTypes.h; sourceTree = "<group>"; };
+               4F1534DF11B533020021FD86 /* EditingBehaviorType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditingBehaviorType.h; sourceTree = "<group>"; };
                4F6FDD621341DEDD001F8EE3 /* InspectorPageAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorPageAgent.cpp; sourceTree = "<group>"; };
                4F6FDD631341DEDD001F8EE3 /* InspectorPageAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorPageAgent.h; sourceTree = "<group>"; };
                4FA65A691108ABED002615E0 /* MathMLSpaceElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLSpaceElement.cpp; sourceTree = "<group>"; };
                53E29E5D167A8A1900586D3D /* InternalSettingsGenerated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InternalSettingsGenerated.h; sourceTree = "<group>"; };
                53ED3FDC167A88E7006762E6 /* JSInternalSettingsGenerated.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInternalSettingsGenerated.cpp; sourceTree = "<group>"; };
                53ED3FDD167A88E7006762E6 /* JSInternalSettingsGenerated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInternalSettingsGenerated.h; sourceTree = "<group>"; };
-               53EF766A16530A61004CBE49 /* SettingsMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsMacros.h; sourceTree = "<group>"; };
                550A0BC7085F6039007353D6 /* QualifiedName.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QualifiedName.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                550A0BC8085F6039007353D6 /* QualifiedName.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QualifiedName.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                5550CB411E955E3C00111AA0 /* ImageTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageTypes.h; sourceTree = "<group>"; };
                7AF9B20918CFB5F200C64BEF /* JSVTTRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVTTRegion.h; sourceTree = "<group>"; };
                7AF9B20A18CFB5F300C64BEF /* JSVTTRegionList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSVTTRegionList.cpp; sourceTree = "<group>"; };
                7AF9B20B18CFB5F300C64BEF /* JSVTTRegionList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVTTRegionList.h; sourceTree = "<group>"; };
+               7C017CB21F7E6FFF00444E9B /* SettingsGenerated.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SettingsGenerated.cpp; sourceTree = "<group>"; };
+               7C017CB31F7E6FFF00444E9B /* SettingsGenerated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsGenerated.h; sourceTree = "<group>"; };
+               7C017CBA1F7E97CE00444E9B /* DebugOverlayRegions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DebugOverlayRegions.h; sourceTree = "<group>"; };
+               7C017CBC1F7E983700444E9B /* EditableLinkBehavior.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditableLinkBehavior.h; sourceTree = "<group>"; };
+               7C017CBE1F7E988800444E9B /* ForcedAccessibilityValue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ForcedAccessibilityValue.h; sourceTree = "<group>"; };
+               7C017CC01F7E99BB00444E9B /* FrameFlattening.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FrameFlattening.h; sourceTree = "<group>"; };
+               7C017CC21F7E9A1E00444E9B /* PDFImageCachingPolicy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PDFImageCachingPolicy.h; sourceTree = "<group>"; };
+               7C017CC41F7E9A7400444E9B /* UserInterfaceDirectionPolicy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserInterfaceDirectionPolicy.h; sourceTree = "<group>"; };
+               7C017CC61F7E9ACB00444E9B /* TextDirection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TextDirection.h; sourceTree = "<group>"; };
+               7C017CC81F7E9B3000444E9B /* TextDirectionSubmenuInclusionBehavior.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TextDirectionSubmenuInclusionBehavior.h; sourceTree = "<group>"; };
+               7C017CCA1F7E9B8B00444E9B /* SettingsDefaultValues.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SettingsDefaultValues.h; sourceTree = "<group>"; };
+               7C017CCE1F7EB28F00444E9B /* DataDetectorTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DataDetectorTypes.h; sourceTree = "<group>"; };
+               7C017CD11F7ECA6200444E9B /* SettingsDefaultValuesCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = SettingsDefaultValuesCocoa.mm; sourceTree = "<group>"; };
                7C0CEF281E4A542C008DEB80 /* JSDOMConstructorBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConstructorBase.h; sourceTree = "<group>"; };
                7C0CEF291E4A54D3008DEB80 /* JSDOMConstructorWithDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConstructorWithDocument.h; sourceTree = "<group>"; };
                7C0CEF2A1E4A556C008DEB80 /* JSDOMBuiltinConstructorBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMBuiltinConstructorBase.h; sourceTree = "<group>"; };
                9B2D8A7814997CCF00ECEF3E /* UndoStep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UndoStep.h; sourceTree = "<group>"; };
                9B32CDA713DF7FA900F34D13 /* RenderedPosition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderedPosition.h; sourceTree = "<group>"; };
                9B32CDA813DF7FA900F34D13 /* RenderedPosition.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderedPosition.cpp; sourceTree = "<group>"; };
-               9B3A8871145632F9003AE8F5 /* DOMDOMSettableTokenList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMDOMSettableTokenList.h; sourceTree = "<group>"; };
                9B417062125662B3006B28FC /* ApplyBlockElementCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplyBlockElementCommand.h; sourceTree = "<group>"; };
                9B417063125662B3006B28FC /* ApplyBlockElementCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ApplyBlockElementCommand.cpp; sourceTree = "<group>"; };
                9B50B1DC17CD4C0F0087F63C /* FormNamedItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormNamedItem.h; sourceTree = "<group>"; };
                                2981CAAF131822EC00D12F2A /* AXObjectCache.cpp */,
                                29A8121A0FBB9C1D00510293 /* AXObjectCache.h */,
                                91C9F2F81AE3BE240095B61C /* AXTextStateChangeIntent.h */,
+                               7C017CBE1F7E988800444E9B /* ForcedAccessibilityValue.h */,
                        );
                        path = accessibility;
                        sourceTree = "<group>";
                                ADFE2B541BD5F41200DAB457 /* ResourceUsageOverlayCocoa.mm */,
                                A5071E881C56D4FA009951BE /* ResourceUsageThreadCocoa.mm */,
                                A182D5B61BE722620087A7CC /* SettingsCocoa.mm */,
+                               7C017CD11F7ECA6200444E9B /* SettingsDefaultValuesCocoa.mm */,
                                26255F0118878E110006E1FD /* UserAgent.h */,
                                5D5975B61963637B00D00878 /* UserAgent.mm */,
                        );
                                E41EA0391198374900710BC5 /* CSSValueKeywords.cpp */,
                                6565814709D13043000E61D7 /* CSSValueKeywords.gperf */,
                                6565814809D13043000E61D7 /* CSSValueKeywords.h */,
-                               9B3A8871145632F9003AE8F5 /* DOMDOMSettableTokenList.h */,
                                E334825E1DC93AA0009C9544 /* DOMJITAbstractHeapRepository.h */,
                                E1C6CFC21746D293007B87A1 /* DOMWindowConstructors.idl */,
                                970B72A5145008EB00F00A37 /* EventHeaders.h */,
                                43B85ED318CBEC5200E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.gperf */,
                                26AA0F9D18D2A18B00419381 /* SelectorPseudoElementTypeMap.cpp */,
                                26AA0F9F18D2A1C100419381 /* SelectorPseudoElementTypeMap.gperf */,
-                               53EF766A16530A61004CBE49 /* SettingsMacros.h */,
+                               7C017CB21F7E6FFF00444E9B /* SettingsGenerated.cpp */,
+                               7C017CB31F7E6FFF00444E9B /* SettingsGenerated.h */,
                                9908B0FD1BCAD07D00ED0F55 /* StreamInternalsBuiltins.cpp */,
                                9B03D8061BB3110D00B764C9 /* StreamInternalsBuiltins.h */,
                                8386A96E19F61E4F00E1EC4A /* StyleBuilder.cpp */,
                                975CA289130365F800E99AD9 /* Crypto.idl */,
                                1ACB2B211A5733F400333392 /* DatabaseProvider.cpp */,
                                1ACB2B221A5733F400333392 /* DatabaseProvider.h */,
+                               7C017CBA1F7E97CE00444E9B /* DebugOverlayRegions.h */,
                                0F6A12BB1A00923700C6DE72 /* DebugPageOverlays.cpp */,
                                0F6A12BC1A00923700C6DE72 /* DebugPageOverlays.h */,
                                CCC2B51015F613060048CDD6 /* DeviceClient.h */,
                                65BF022A0974816300C43196 /* Frame.h */,
                                974A862014B7ADBB003FDC76 /* FrameDestructionObserver.cpp */,
                                974A862114B7ADBB003FDC76 /* FrameDestructionObserver.h */,
+                               7C017CC01F7E99BB00444E9B /* FrameFlattening.h */,
                                C4CD629818383766007EBAF1 /* FrameSnapshotting.cpp */,
                                C4CD629918383766007EBAF1 /* FrameSnapshotting.h */,
                                65A21482097A3F5300B9050A /* FrameTree.cpp */,
                                371E65CD13661EED00BEEDB0 /* PageSerializer.cpp */,
                                371E65CB13661EDC00BEEDB0 /* PageSerializer.h */,
                                FFD5B978135CC97800D5E92A /* PageVisibilityState.h */,
+                               7C017CC21F7E9A1E00444E9B /* PDFImageCachingPolicy.h */,
                                E526AF3E1727F8F200E41781 /* Performance.cpp */,
                                8A844D0211D3C18E0014065C /* Performance.h */,
                                8A844D0311D3C18E0014065C /* Performance.idl */,
                                14C9A5E90B3D105F005A0232 /* Settings.cpp */,
                                F587863A02DE3A1401EA4122 /* Settings.h */,
                                BC59DEF8169DEDC30016AC34 /* Settings.in */,
+                               7C017CCA1F7E9B8B00444E9B /* SettingsDefaultValues.h */,
                                5C688AA21D38126F000B54FA /* SocketProvider.cpp */,
                                5C7C88D71D0F1F2B009D2F6D /* SocketProvider.h */,
                                626CDE0C1140424C001E5A68 /* SpatialNavigation.cpp */,
                                626CDE0D1140424C001E5A68 /* SpatialNavigation.h */,
                                62C1217A11AB9E76003C462C /* SuspendableTimer.cpp */,
                                62C1217B11AB9E77003C462C /* SuspendableTimer.h */,
+                               7C017CC81F7E9B3000444E9B /* TextDirectionSubmenuInclusionBehavior.h */,
                                2D4F96F11A1ECC240098BF88 /* TextIndicator.cpp */,
                                2D4F96F21A1ECC240098BF88 /* TextIndicator.h */,
                                1AE79D40188DB61F002239C2 /* UserContentController.cpp */,
                                003F1FE911E6AB43008258D9 /* UserContentTypes.h */,
                                BCACF3BA1072921A00C0C8A3 /* UserContentURLPattern.cpp */,
                                BCACF3BB1072921A00C0C8A3 /* UserContentURLPattern.h */,
+                               7C017CC41F7E9A7400444E9B /* UserInterfaceDirectionPolicy.h */,
                                7C3B796F1908757B00B47A2D /* UserMessageHandler.cpp */,
                                7C3B79701908757B00B47A2D /* UserMessageHandler.h */,
                                7C73FB0E191EF60E007DE061 /* UserMessageHandler.idl */,
                        children = (
                                C5227DEF1C3C6DD700F5ED54 /* DataDetection.h */,
                                C5227DF01C3C6DD700F5ED54 /* DataDetection.mm */,
+                               7C017CCE1F7EB28F00444E9B /* DataDetectorTypes.h */,
                                9B55EEE81B3E8898005342BC /* EditorCocoa.mm */,
                                7C3E510818DF8F3500C112F7 /* HTMLConverter.h */,
                                7C3E510918DF8F3500C112F7 /* HTMLConverter.mm */,
                                CECADFC4153778FF00E37068 /* DictationCommand.cpp */,
                                CECADFC5153778FF00E37068 /* DictationCommand.h */,
                                2D5646AF1B8F8493003C4994 /* DictionaryPopupInfo.h */,
+                               7C017CBC1F7E983700444E9B /* EditableLinkBehavior.h */,
                                93309D93099E64910056E581 /* EditAction.h */,
                                93309D94099E64910056E581 /* EditCommand.cpp */,
                                93309D95099E64910056E581 /* EditCommand.h */,
                                93309D98099E64910056E581 /* Editing.cpp */,
                                93309D99099E64910056E581 /* Editing.h */,
                                4F1534DD11B532EC0021FD86 /* EditingBehavior.h */,
-                               4F1534DF11B533020021FD86 /* EditingBehaviorTypes.h */,
+                               4F1534DF11B533020021FD86 /* EditingBehaviorType.h */,
                                3AC648B1129E146500C3EB25 /* EditingBoundary.h */,
                                9BAB6C6B12550631001626D4 /* EditingStyle.cpp */,
                                9BAB6C6A12550631001626D4 /* EditingStyle.h */,
                                B2C3DA120D006C1D00EF6F26 /* TextCodecUTF16.h */,
                                9343CB7F12F25E510033C5EE /* TextCodecUTF8.cpp */,
                                9343CB8012F25E510033C5EE /* TextCodecUTF8.h */,
+                               7C017CC61F7E9ACB00444E9B /* TextDirection.h */,
                                B2C3DA160D006C1D00EF6F26 /* TextEncoding.cpp */,
                                B2C3DA170D006C1D00EF6F26 /* TextEncoding.h */,
                                C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */,
                                BE23480D18A9871400E4B6E8 /* DataCue.h in Headers */,
                                C5227DF11C3C6DF100F5ED54 /* DataDetection.h in Headers */,
                                7C7941E51C56C29300A4C58E /* DataDetectorsCoreSoftLink.h in Headers */,
+                               7C017CCF1F7EB28F00444E9B /* DataDetectorTypes.h in Headers */,
                                BC22746F0E83664500E7F975 /* DataRef.h in Headers */,
                                BC64641C11D7F416006455B0 /* DatasetDOMStringMap.h in Headers */,
                                85031B3E0A44EFC700F992E0 /* DataTransfer.h in Headers */,
                                453EB637159C570400001BB7 /* DateTimeFormat.h in Headers */,
                                F55B3DB81251F12D003EF269 /* DateTimeInputType.h in Headers */,
                                F55B3DBA1251F12D003EF269 /* DateTimeLocalInputType.h in Headers */,
+                               7C017CBB1F7E97CE00444E9B /* DebugOverlayRegions.h in Headers */,
                                0F6A12BE1A00923700C6DE72 /* DebugPageOverlays.h in Headers */,
                                45FEA5D0156DDE8C00654101 /* Decimal.h in Headers */,
                                A8C228A111D5722E00D5A7D3 /* DecodedDataDocumentParser.h in Headers */,
                                41FABD2D1F4DFE4A006A6C97 /* DOMCacheEngine.h in Headers */,
                                41380C291F3436AC00155FDA /* DOMCacheStorage.h in Headers */,
                                FC9A0F75164094CF003D6B8D /* DOMCSSNamespace.h in Headers */,
-                               9B3A8872145632F9003AE8F5 /* DOMDOMSettableTokenList.h in Headers */,
                                7AABA25A14BC613300AA9A11 /* DOMEditor.h in Headers */,
                                BC60D6E90D28D83400B9918F /* DOMException.h in Headers */,
                                8399470C1F50B63E00E9D86B /* DOMFileSystem.h in Headers */,
                                FD6ED2C8136B8E66003CF072 /* DynamicsCompressor.h in Headers */,
                                FD537357137B653B00008DCE /* DynamicsCompressorKernel.h in Headers */,
                                FD6ED2C4136B8E42003CF072 /* DynamicsCompressorNode.h in Headers */,
+                               7C017CBD1F7E983700444E9B /* EditableLinkBehavior.h in Headers */,
                                93309DE2099E64920056E581 /* EditAction.h in Headers */,
                                93309DE4099E64920056E581 /* EditCommand.h in Headers */,
                                93309DE8099E64920056E581 /* Editing.h in Headers */,
                                4F1534DE11B532EC0021FD86 /* EditingBehavior.h in Headers */,
-                               4F1534E011B533020021FD86 /* EditingBehaviorTypes.h in Headers */,
+                               4F1534E011B533020021FD86 /* EditingBehaviorType.h in Headers */,
                                3AC648B2129E146500C3EB25 /* EditingBoundary.h in Headers */,
                                9BAB6C6C12550631001626D4 /* EditingStyle.h in Headers */,
                                4B3043CD0AE0373B00A82647 /* Editor.h in Headers */,
                                E419041F1CC6486B00C35F5D /* FontSelectorClient.h in Headers */,
                                4A6E9FC813C17D570046A7F8 /* FontTaggedSettings.h in Headers */,
                                C2015C0A1BE6FEB200822389 /* FontVariantBuilder.h in Headers */,
+                               7C017CBF1F7E988800444E9B /* ForcedAccessibilityValue.h in Headers */,
                                4A0DA2FF129B241900AB61E1 /* FormAssociatedElement.h in Headers */,
                                D05CED2A0A40BB2C00C5AF38 /* FormatBlockCommand.h in Headers */,
                                7CE6CBFB187F370700D46BF5 /* FormatConverter.h in Headers */,
                                A853123D11D0471B00D4D077 /* FragmentScriptingPermission.h in Headers */,
                                65BF022F0974816300C43196 /* Frame.h in Headers */,
                                974A862314B7ADBB003FDC76 /* FrameDestructionObserver.h in Headers */,
+                               7C017CC11F7E99BB00444E9B /* FrameFlattening.h in Headers */,
                                656D373C0ADBA5DE00A4554D /* FrameLoader.h in Headers */,
                                656D373E0ADBA5DE00A4554D /* FrameLoaderClient.h in Headers */,
                                D000EBA311BDAFD400C47726 /* FrameLoaderStateMachine.h in Headers */,
                                A1F76B551F44D2C70014C318 /* PaymentShippingOption.h in Headers */,
                                A1F76B491F44D07A0014C318 /* PaymentShippingType.h in Headers */,
                                B27535650B053814002CE64F /* PDFDocumentImage.h in Headers */,
+                               7C017CC31F7E9A1E00444E9B /* PDFImageCachingPolicy.h in Headers */,
                                5E2C43511BCEE2F60001E2BC /* PeerConnectionBackend.h in Headers */,
                                5EBB89391C77C39900C65D41 /* PeerMediaDescription.h in Headers */,
                                8A7CC96B12076D73001D4588 /* PendingScript.h in Headers */,
                                93309E10099E64920056E581 /* SetNodeAttributeCommand.h in Headers */,
                                B8DBDB4C130B0F8A00F5CDB1 /* SetSelectionCommand.h in Headers */,
                                93F1994F08245E59001E9ABC /* Settings.h in Headers */,
-                               53EF766B16530A61004CBE49 /* SettingsMacros.h in Headers */,
+                               7C017CCB1F7E9B8B00444E9B /* SettingsDefaultValues.h in Headers */,
+                               7C017CB71F7E705000444E9B /* SettingsGenerated.h in Headers */,
                                0F3DD45012F5EA1B000D9190 /* ShadowBlur.h in Headers */,
                                BC5EB8C40E82031B00B25965 /* ShadowData.h in Headers */,
                                A6D169641346B4C1000EB770 /* ShadowRoot.h in Headers */,
                                9343CB8212F25E510033C5EE /* TextCodecUTF8.h in Headers */,
                                142B97CA13138943008BEF4B /* TextControlInnerElements.h in Headers */,
                                582DE3251C30C85400BE02A8 /* TextDecorationPainter.h in Headers */,
+                               7C017CC71F7E9ACB00444E9B /* TextDirection.h in Headers */,
+                               7C017CC91F7E9B3000444E9B /* TextDirectionSubmenuInclusionBehavior.h in Headers */,
                                97BC84B412371180000C6161 /* TextDocument.h in Headers */,
                                97BC84841236FD93000C6161 /* TextDocumentParser.h in Headers */,
                                B2C3DA470D006C1D00EF6F26 /* TextEncoding.h in Headers */,
                                BCACF3BD1072921A00C0C8A3 /* UserContentURLPattern.h in Headers */,
                                2542F4DB1166C25A00E89A86 /* UserGestureIndicator.h in Headers */,
                                9920398318B95BC600B39AF9 /* UserInputBridge.h in Headers */,
+                               7C017CC51F7E9A7400444E9B /* UserInterfaceDirectionPolicy.h in Headers */,
                                71C916081D1483A300ACA47D /* UserInterfaceLayoutDirection.h in Headers */,
                                078E092E17D14D1C00420AA1 /* UserMediaClient.h in Headers */,
                                078E092F17D14D1C00420AA1 /* UserMediaController.h in Headers */,
                                B8DBDB4B130B0F8A00F5CDB1 /* SetSelectionCommand.cpp in Sources */,
                                14C9A5EA0B3D105F005A0232 /* Settings.cpp in Sources */,
                                A182D5B71BE722670087A7CC /* SettingsCocoa.mm in Sources */,
+                               7C017CD31F7ECA6300444E9B /* SettingsDefaultValuesCocoa.mm in Sources */,
+                               7C017CB61F7E704B00444E9B /* SettingsGenerated.cpp in Sources */,
                                0F3DD44F12F5EA1B000D9190 /* ShadowBlur.cpp in Sources */,
                                BC5EB8C30E82031B00B25965 /* ShadowData.cpp in Sources */,
                                A6D169621346B49B000EB770 /* ShadowRoot.cpp in Sources */,
index 16bf389..7a0561e 100644 (file)
@@ -209,6 +209,7 @@ macro(GENERATE_SETTINGS_MACROS _infile _outfile)
     # build in parallel or the two instances of the rule may conflict.
     # <https://cmake.org/cmake/help/v3.0/command/add_custom_command.html>
     set(_extra_output
+        ${DERIVED_SOURCES_WEBCORE_DIR}/SettingsGenerated.cpp
         ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.h
         ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.cpp
         ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.idl
@@ -218,8 +219,9 @@ macro(GENERATE_SETTINGS_MACROS _infile _outfile)
         ${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/GenerateSettingsMacrosHeader.py
         ${WEBCORE_DIR}/Scripts/GenerateSettings/Settings.py
         ${WEBCORE_DIR}/Scripts/GenerateSettings/__init__.py
     )
diff --git a/Source/WebCore/accessibility/ForcedAccessibilityValue.h b/Source/WebCore/accessibility/ForcedAccessibilityValue.h
new file mode 100644 (file)
index 0000000..abd9127
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * 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
+
+namespace WebCore {
+
+enum class ForcedAccessibilityValue { System, On, Off };
+
+}
index e6fda18..37979fa 100644 (file)
@@ -299,9 +299,9 @@ static bool monochromeEvaluate(CSSValue* value, const CSSToLengthConversionData&
 {
     bool isMonochrome;
 
-    if (frame.settings().forcedDisplayIsMonochromeAccessibilityValue() == Settings::ForcedAccessibilityValue::On)
+    if (frame.settings().forcedDisplayIsMonochromeAccessibilityValue() == ForcedAccessibilityValue::On)
         isMonochrome = true;
-    else if (frame.settings().forcedDisplayIsMonochromeAccessibilityValue() == Settings::ForcedAccessibilityValue::Off)
+    else if (frame.settings().forcedDisplayIsMonochromeAccessibilityValue() == ForcedAccessibilityValue::Off)
         isMonochrome = false;
     else
         isMonochrome = screenIsMonochrome(frame.mainFrame().view());
@@ -315,9 +315,9 @@ static bool invertedColorsEvaluate(CSSValue* value, const CSSToLengthConversionD
 {
     bool isInverted;
 
-    if (frame.settings().forcedColorsAreInvertedAccessibilityValue() == Settings::ForcedAccessibilityValue::On)
+    if (frame.settings().forcedColorsAreInvertedAccessibilityValue() == ForcedAccessibilityValue::On)
         isInverted = true;
-    else if (frame.settings().forcedColorsAreInvertedAccessibilityValue() == Settings::ForcedAccessibilityValue::Off)
+    else if (frame.settings().forcedColorsAreInvertedAccessibilityValue() == ForcedAccessibilityValue::Off)
         isInverted = false;
     else
         isInverted = screenHasInvertedColors();
@@ -716,12 +716,12 @@ static bool prefersReducedMotionEvaluate(CSSValue* value, const CSSToLengthConve
     bool userPrefersReducedMotion = false;
 
     switch (frame.settings().forcedPrefersReducedMotionAccessibilityValue()) {
-    case Settings::ForcedAccessibilityValue::On:
+    case ForcedAccessibilityValue::On:
         userPrefersReducedMotion = true;
         break;
-    case Settings::ForcedAccessibilityValue::Off:
+    case ForcedAccessibilityValue::Off:
         break;
-    case Settings::ForcedAccessibilityValue::System:
+    case ForcedAccessibilityValue::System:
 #if USE(NEW_THEME)
         userPrefersReducedMotion = Theme::singleton().userPrefersReducedMotion();
 #endif
diff --git a/Source/WebCore/editing/EditableLinkBehavior.h b/Source/WebCore/editing/EditableLinkBehavior.h
new file mode 100644 (file)
index 0000000..1511298
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * 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
+
+namespace WebCore {
+
+enum EditableLinkBehavior {
+    EditableLinkDefaultBehavior,
+    EditableLinkAlwaysLive,
+    EditableLinkOnlyLiveWithShiftKey,
+    EditableLinkLiveWhenNotFocused,
+    EditableLinkNeverLive
+};
+
+}
index 27fb1f0..8e67e11 100644 (file)
@@ -20,7 +20,7 @@
 
 #pragma once
 
-#include "EditingBehaviorTypes.h"
+#include "EditingBehaviorType.h"
 
 namespace WebCore {
 
index 21de062..d6ebc07 100644 (file)
@@ -27,6 +27,7 @@
 
 #if ENABLE(DATA_DETECTION)
 
+#import "DataDetectorTypes.h"
 #import <wtf/RefPtr.h>
 #import <wtf/RetainPtr.h>
 #import <wtf/text/WTFString.h>
@@ -43,18 +44,6 @@ class HitTestResult;
 class Range;
 class URL;
 
-enum DataDetectorTypes {
-    DataDetectorTypeNone = 0,
-    DataDetectorTypePhoneNumber = 1 << 0,
-    DataDetectorTypeLink = 1 << 1,
-    DataDetectorTypeAddress = 1 << 2,
-    DataDetectorTypeCalendarEvent = 1 << 3,
-    DataDetectorTypeTrackingNumber = 1 << 4,
-    DataDetectorTypeFlightNumber = 1 << 5,
-    DataDetectorTypeLookupSuggestion = 1 << 6,
-    DataDetectorTypeAll = ULONG_MAX
-};
-
 class DataDetection {
 public:
 #if PLATFORM(MAC)
diff --git a/Source/WebCore/editing/cocoa/DataDetectorTypes.h b/Source/WebCore/editing/cocoa/DataDetectorTypes.h
new file mode 100644 (file)
index 0000000..ad165ba
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * 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
+
+namespace WebCore {
+
+enum DataDetectorTypes {
+    DataDetectorTypeNone = 0,
+    DataDetectorTypePhoneNumber = 1 << 0,
+    DataDetectorTypeLink = 1 << 1,
+    DataDetectorTypeAddress = 1 << 2,
+    DataDetectorTypeCalendarEvent = 1 << 3,
+    DataDetectorTypeTrackingNumber = 1 << 4,
+    DataDetectorTypeFlightNumber = 1 << 5,
+    DataDetectorTypeLookupSuggestion = 1 << 6,
+    DataDetectorTypeAll = ULONG_MAX
+};
+
+}
index 0d2d9fb..d7e38ed 100644 (file)
@@ -31,6 +31,7 @@
 #include "FrameLoader.h"
 #include "ScriptController.h"
 #include "Settings.h"
+#include "SettingsDefaultValues.h"
 #include "SubframeLoader.h"
 
 namespace WebCore {
@@ -39,7 +40,7 @@ HTMLParserOptions::HTMLParserOptions()
     : scriptEnabled(false)
     , pluginsEnabled(false)
     , usePreHTML5ParserQuirks(false)
-    , maximumDOMTreeDepth(Settings::defaultMaximumHTMLParserDOMTreeDepth)
+    , maximumDOMTreeDepth(defaultMaximumHTMLParserDOMTreeDepth)
 {
 }
 
diff --git a/Source/WebCore/page/DebugOverlayRegions.h b/Source/WebCore/page/DebugOverlayRegions.h
new file mode 100644 (file)
index 0000000..5f0a7cc
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * 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
+
+namespace WebCore {
+
+enum DebugOverlayRegionFlags {
+    NonFastScrollableRegion = 1 << 0,
+    WheelEventHandlerRegion = 1 << 1,
+};
+
+typedef unsigned DebugOverlayRegions;
+
+}
diff --git a/Source/WebCore/page/FrameFlattening.h b/Source/WebCore/page/FrameFlattening.h
new file mode 100644 (file)
index 0000000..bb1fdb6
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * 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
+
+namespace WebCore {
+
+enum FrameFlattening {
+    FrameFlatteningDisabled,
+    FrameFlatteningEnabledForNonFullScreenIFrames,
+    FrameFlatteningFullyEnabled
+};
+
+}
diff --git a/Source/WebCore/page/PDFImageCachingPolicy.h b/Source/WebCore/page/PDFImageCachingPolicy.h
new file mode 100644 (file)
index 0000000..a26737e
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * 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
+
+namespace WebCore {
+
+enum PDFImageCachingPolicy {
+    PDFImageCachingEnabled,
+    PDFImageCachingBelowMemoryLimit,
+    PDFImageCachingDisabled,
+    PDFImageCachingClipBoundsOnly,
+#if PLATFORM(IOS)
+    PDFImageCachingDefault = PDFImageCachingBelowMemoryLimit
+#else
+    PDFImageCachingDefault = PDFImageCachingEnabled
+#endif
+};
+
+}
index 691c1d9..0ff0bc1 100644 (file)
@@ -121,29 +121,6 @@ bool Settings::gShouldOptOutOfNetworkStateObservation = false;
 bool Settings::gManageAudioSession = false;
 bool Settings::gCustomPasteboardDataEnabled = false;
 
-// NOTEs
-//  1) EditingMacBehavior comprises Tiger, Leopard, SnowLeopard and iOS builds, as well as QtWebKit when built on Mac;
-//  2) EditingWindowsBehavior comprises Win32 build;
-//  3) EditingUnixBehavior comprises all unix-based systems, but Darwin/MacOS (and then abusing the terminology);
-// 99) MacEditingBehavior is used as a fallback.
-static EditingBehaviorType editingBehaviorTypeForPlatform()
-{
-    return
-#if PLATFORM(IOS)
-    EditingIOSBehavior
-#elif OS(DARWIN)
-    EditingMacBehavior
-#elif OS(WINDOWS)
-    EditingWindowsBehavior
-#elif OS(UNIX)
-    EditingUnixBehavior
-#else
-    // Fallback
-    EditingMacBehavior
-#endif
-    ;
-}
-
 bool Settings::customPasteboardDataEnabled()
 {
     static std::once_flag initializeCustomPasteboardDataToDefaultValue;
@@ -160,66 +137,17 @@ bool Settings::customPasteboardDataEnabled()
     return gCustomPasteboardDataEnabled;
 }
 
-#if PLATFORM(COCOA)
-static const bool defaultYouTubeFlashPluginReplacementEnabled = true;
-#else
-static const bool defaultYouTubeFlashPluginReplacementEnabled = false;
-#endif
-
-#if PLATFORM(IOS)
-static const bool defaultFixedBackgroundsPaintRelativeToDocument = true;
-static const bool defaultAcceleratedCompositingForFixedPositionEnabled = true;
-static const bool defaultAllowsInlineMediaPlayback = false;
-static const bool defaultInlineMediaPlaybackRequiresPlaysInlineAttribute = true;
-static const bool defaultVideoPlaybackRequiresUserGesture = true;
-static const bool defaultAudioPlaybackRequiresUserGesture = true;
-static const bool defaultMediaDataLoadsAutomatically = false;
-static const bool defaultShouldRespectImageOrientation = true;
-static const bool defaultImageSubsamplingEnabled = true;
-static const bool defaultScrollingTreeIncludesFrames = true;
-static const bool defaultMediaControlsScaleWithPageZoom = true;
-static const bool defaultQuickTimePluginReplacementEnabled = true;
-#else
-static const bool defaultFixedBackgroundsPaintRelativeToDocument = false;
-static const bool defaultAcceleratedCompositingForFixedPositionEnabled = false;
-static const bool defaultAllowsInlineMediaPlayback = true;
-static const bool defaultInlineMediaPlaybackRequiresPlaysInlineAttribute = false;
-static const bool defaultVideoPlaybackRequiresUserGesture = false;
-static const bool defaultAudioPlaybackRequiresUserGesture = false;
-static const bool defaultMediaDataLoadsAutomatically = true;
-static const bool defaultShouldRespectImageOrientation = false;
-static const bool defaultImageSubsamplingEnabled = false;
-static const bool defaultScrollingTreeIncludesFrames = false;
-static const bool defaultMediaControlsScaleWithPageZoom = true;
-static const bool defaultQuickTimePluginReplacementEnabled = false;
-#endif
-
-static const bool defaultRequiresUserGestureToLoadVideo = true;
-
-static const bool defaultAllowsPictureInPictureMediaPlayback = true;
-
-static const double defaultIncrementalRenderingSuppressionTimeoutInSeconds = 5;
-#if USE(UNIFIED_TEXT_CHECKING)
-static const bool defaultUnifiedTextCheckerEnabled = true;
-#else
-static const bool defaultUnifiedTextCheckerEnabled = false;
-#endif
-static const bool defaultSmartInsertDeleteEnabled = true;
-static const bool defaultSelectTrailingWhitespaceEnabled = false;
-
 // This amount of time must have elapsed before we will even consider scheduling a layout without a delay.
 // FIXME: For faster machines this value can really be lowered to 200. 250 is adequate, but a little high
 // for dual G5s. :)
 static const Seconds layoutScheduleThreshold = 250_ms;
 
 Settings::Settings(Page* page)
-    : m_page(nullptr)
-    , m_mediaTypeOverride("screen")
+    : m_mediaTypeOverride("screen")
     , m_fontGenericFamilies(std::make_unique<FontGenericFamilies>())
     , m_storageBlockingPolicy(SecurityOrigin::AllowAllStorage)
     , m_layoutInterval(layoutScheduleThreshold)
     , m_minimumDOMTimerInterval(DOMTimer::defaultMinimumInterval())
-    SETTINGS_INITIALIZER_LIST
     , m_isJavaEnabled(false)
     , m_isJavaEnabledForLocalFiles(true)
     , m_loadsImagesAutomatically(false)
@@ -248,8 +176,11 @@ Settings::Settings(Page* page)
     // A Frame may not have been created yet, so we initialize the AtomicString
     // hash before trying to use it.
     AtomicString::init();
+
     initializeDefaultFontFamilies();
-    m_page = page; // Page is not yet fully initialized when constructing Settings, so keeping m_page null over initializeDefaultFontFamilies() call.
+
+    // Page is not yet fully initialized when constructing Settings, so keeping m_page null over initializeDefaultFontFamilies() call.
+    m_page = page;
 }
 
 Settings::~Settings()
@@ -261,8 +192,6 @@ Ref<Settings> Settings::create(Page* page)
     return adoptRef(*new Settings(page));
 }
 
-SETTINGS_SETTER_BODIES
-
 #if !PLATFORM(COCOA)
 void Settings::initializeDefaultFontFamilies()
 {
@@ -354,17 +283,15 @@ void Settings::setPictographFontFamily(const AtomicString& family, UScriptCode s
         invalidateAfterGenericFamilyChange(m_page);
 }
 
-float Settings::defaultMinimumZoomFontSize()
+bool Settings::defaultTextAutosizingEnabled()
 {
-    return 15;
+    return WebCore::defaultTextAutosizingEnabled();
 }
 
-#if !PLATFORM(IOS)
-bool Settings::defaultTextAutosizingEnabled()
+float Settings::defaultMinimumZoomFontSize()
 {
-    return false;
+    return WebCore::defaultMinimumZoomFontSize;
 }
-#endif
 
 void Settings::setMediaTypeOverride(const String& mediaTypeOverride)
 {
index f60096d..57825a6 100644 (file)
 
 #pragma once
 
-#include "ClipboardAccessPolicy.h"
 #include "ContentType.h"
-#include "EditingBehaviorTypes.h"
-#include "IntSize.h"
 #include "SecurityOrigin.h"
-#include "SettingsMacros.h"
+#include "SettingsDefaultValues.h"
+#include "SettingsGenerated.h"
 #include "TextFlags.h"
 #include "Timer.h"
 #include "URL.h"
-#include "WritingMode.h"
-#include <runtime/RuntimeFlags.h>
 #include <unicode/uscript.h>
 #include <wtf/HashMap.h>
-#include <wtf/RefCounted.h>
 #include <wtf/text/AtomicString.h>
 #include <wtf/text/AtomicStringHash.h>
 
-#if ENABLE(DATA_DETECTION)
-#include "DataDetection.h"
-#endif
-
 namespace WebCore {
 
 class FontGenericFamilies;
-class Page;
-
-enum EditableLinkBehavior {
-    EditableLinkDefaultBehavior,
-    EditableLinkAlwaysLive,
-    EditableLinkOnlyLiveWithShiftKey,
-    EditableLinkLiveWhenNotFocused,
-    EditableLinkNeverLive
-};
-
-enum TextDirectionSubmenuInclusionBehavior {
-    TextDirectionSubmenuNeverIncluded,
-    TextDirectionSubmenuAutomaticallyIncluded,
-    TextDirectionSubmenuAlwaysIncluded
-};
-
-enum DebugOverlayRegionFlags {
-    NonFastScrollableRegion = 1 << 0,
-    WheelEventHandlerRegion = 1 << 1,
-};
-
-enum class UserInterfaceDirectionPolicy {
-    Content,
-    System
-};
-
-enum PDFImageCachingPolicy {
-    PDFImageCachingEnabled,
-    PDFImageCachingBelowMemoryLimit,
-    PDFImageCachingDisabled,
-    PDFImageCachingClipBoundsOnly,
-#if PLATFORM(IOS)
-    PDFImageCachingDefault = PDFImageCachingBelowMemoryLimit
-#else
-    PDFImageCachingDefault = PDFImageCachingEnabled
-#endif
-};
-
-enum FrameFlattening {
-    FrameFlatteningDisabled,
-    FrameFlatteningEnabledForNonFullScreenIFrames,
-    FrameFlatteningFullyEnabled
-};
-
-typedef unsigned DebugOverlayRegions;
 
-class Settings : public RefCounted<Settings> {
-    WTF_MAKE_NONCOPYABLE(Settings); WTF_MAKE_FAST_ALLOCATED;
+class Settings : public SettingsGenerated {
 public:
     static Ref<Settings> create(Page*);
     ~Settings();
 
     void pageDestroyed() { m_page = nullptr; }
 
-    enum class ForcedAccessibilityValue { System, On, Off };
-    static const Settings::ForcedAccessibilityValue defaultForcedColorsAreInvertedAccessibilityValue = ForcedAccessibilityValue::System;
-    static const Settings::ForcedAccessibilityValue defaultForcedDisplayIsMonochromeAccessibilityValue = ForcedAccessibilityValue::System;
-    static const Settings::ForcedAccessibilityValue defaultForcedPrefersReducedMotionAccessibilityValue = ForcedAccessibilityValue::System;
-
     WEBCORE_EXPORT void setStandardFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON);
     WEBCORE_EXPORT const AtomicString& standardFontFamily(UScriptCode = USCRIPT_COMMON) const;
 
@@ -148,8 +88,6 @@ public:
     bool isScriptEnabled() const { return m_isScriptEnabled; }
     WEBCORE_EXPORT void setScriptEnabled(bool);
 
-    SETTINGS_GETTERS_AND_SETTERS
-
     WEBCORE_EXPORT void setJavaEnabled(bool);
     bool isJavaEnabled() const { return m_isJavaEnabled; }
 
@@ -236,9 +174,6 @@ public:
     static bool isGStreamerEnabled() { return gGStreamerEnabled; }
 #endif
 
-    static const unsigned defaultMaximumHTMLParserDOMTreeDepth = 512;
-    static const unsigned defaultMaximumRenderTreeDepth = 512;
-
     WEBCORE_EXPORT static void setMockScrollbarsEnabled(bool flag);
     WEBCORE_EXPORT static bool mockScrollbarsEnabled();
 
@@ -347,8 +282,6 @@ private:
 
     void initializeDefaultFontFamilies();
 
-    Page* m_page;
-
     String m_mediaTypeOverride;
     URL m_userStyleSheetLocation;
     const std::unique_ptr<FontGenericFamilies> m_fontGenericFamilies;
@@ -356,8 +289,6 @@ private:
     Seconds m_layoutInterval;
     Seconds m_minimumDOMTimerInterval;
 
-    SETTINGS_MEMBER_VARIABLES
-
     bool m_isJavaEnabled : 1;
     bool m_isJavaEnabledForLocalFiles : 1;
     bool m_loadsImagesAutomatically : 1;
index 90bf197..31ed008 100644 (file)
@@ -93,7 +93,7 @@ acceleratedDrawingEnabled initial=false
 displayListDrawingEnabled initial=false
 acceleratedFiltersEnabled initial=false
 useLegacyTextAlignPositionedElementBehavior initial=false
-javaScriptRuntimeFlags type=JSC::RuntimeFlags
+javaScriptRuntimeFlags type=JSC::RuntimeFlags, include=<runtime/RuntimeFlags.h>
 
 # 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.
@@ -200,7 +200,7 @@ fixedBackgroundsPaintRelativeToDocument initial=defaultFixedBackgroundsPaintRela
 
 textAutosizingEnabled initial=defaultTextAutosizingEnabled(), setNeedsStyleRecalcInAllFrames=1, conditional=TEXT_AUTOSIZING
 textAutosizingWindowSizeOverride type=IntSize, setNeedsStyleRecalcInAllFrames=1, conditional=TEXT_AUTOSIZING
-minimumZoomFontSize type=float, initial=defaultMinimumZoomFontSize(), conditional=TEXT_AUTOSIZING
+minimumZoomFontSize type=float, initial=defaultMinimumZoomFontSize, conditional=TEXT_AUTOSIZING
 
 subpixelAntialiasedLayerTextEnabled initial=false, setNeedsStyleRecalcInAllFrames=1
 simpleLineLayoutEnabled initial=true, setNeedsStyleRecalcInAllFrames=1
diff --git a/Source/WebCore/page/SettingsDefaultValues.h b/Source/WebCore/page/SettingsDefaultValues.h
new file mode 100644 (file)
index 0000000..1c9ecf1
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * 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 "EditingBehaviorType.h"
+#include "ForcedAccessibilityValue.h"
+#include "StorageMap.h"
+
+namespace WebCore {
+
+#if USE(UNIFIED_TEXT_CHECKING)
+static const bool defaultUnifiedTextCheckerEnabled = true;
+#else
+static const bool defaultUnifiedTextCheckerEnabled = false;
+#endif
+
+#if PLATFORM(COCOA)
+static const bool defaultYouTubeFlashPluginReplacementEnabled = true;
+#else
+static const bool defaultYouTubeFlashPluginReplacementEnabled = false;
+#endif
+
+#if PLATFORM(IOS)
+static const bool defaultFixedBackgroundsPaintRelativeToDocument = true;
+static const bool defaultAcceleratedCompositingForFixedPositionEnabled = true;
+static const bool defaultAllowsInlineMediaPlayback = false;
+static const bool defaultInlineMediaPlaybackRequiresPlaysInlineAttribute = true;
+static const bool defaultVideoPlaybackRequiresUserGesture = true;
+static const bool defaultAudioPlaybackRequiresUserGesture = true;
+static const bool defaultMediaDataLoadsAutomatically = false;
+static const bool defaultShouldRespectImageOrientation = true;
+static const bool defaultImageSubsamplingEnabled = true;
+static const bool defaultScrollingTreeIncludesFrames = true;
+static const bool defaultQuickTimePluginReplacementEnabled = true;
+#else
+static const bool defaultFixedBackgroundsPaintRelativeToDocument = false;
+static const bool defaultAcceleratedCompositingForFixedPositionEnabled = false;
+static const bool defaultAllowsInlineMediaPlayback = true;
+static const bool defaultInlineMediaPlaybackRequiresPlaysInlineAttribute = false;
+static const bool defaultVideoPlaybackRequiresUserGesture = false;
+static const bool defaultAudioPlaybackRequiresUserGesture = false;
+static const bool defaultMediaDataLoadsAutomatically = true;
+static const bool defaultShouldRespectImageOrientation = false;
+static const bool defaultImageSubsamplingEnabled = false;
+static const bool defaultScrollingTreeIncludesFrames = false;
+static const bool defaultQuickTimePluginReplacementEnabled = false;
+#endif
+
+static const bool defaultMediaControlsScaleWithPageZoom = true;
+static const bool defaultAllowsPictureInPictureMediaPlayback = true;
+static const bool defaultRequiresUserGestureToLoadVideo = true;
+static const bool defaultSmartInsertDeleteEnabled = true;
+static const bool defaultSelectTrailingWhitespaceEnabled = false;
+static const unsigned defaultMaximumHTMLParserDOMTreeDepth = 512;
+static const double defaultIncrementalRenderingSuppressionTimeoutInSeconds = 5;
+static const float defaultMinimumZoomFontSize = 15;
+static const ForcedAccessibilityValue defaultForcedColorsAreInvertedAccessibilityValue = ForcedAccessibilityValue::System;
+static const ForcedAccessibilityValue defaultForcedDisplayIsMonochromeAccessibilityValue = ForcedAccessibilityValue::System;
+static const ForcedAccessibilityValue defaultForcedPrefersReducedMotionAccessibilityValue = ForcedAccessibilityValue::System;
+
+inline EditingBehaviorType editingBehaviorTypeForPlatform()
+{
+    return
+#if PLATFORM(IOS)
+    EditingIOSBehavior;
+#elif OS(DARWIN)
+    EditingMacBehavior;
+#elif OS(WINDOWS)
+    EditingWindowsBehavior;
+#elif OS(UNIX)
+    EditingUnixBehavior;
+#else
+    // Fallback
+    EditingMacBehavior;
+#endif
+}
+
+#if PLATFORM(IOS)
+WEBCORE_EXPORT bool defaultTextAutosizingEnabled();
+#else
+inline bool defaultTextAutosizingEnabled()
+{
+    return false;
+}
+#endif
+
+}
diff --git a/Source/WebCore/page/TextDirectionSubmenuInclusionBehavior.h b/Source/WebCore/page/TextDirectionSubmenuInclusionBehavior.h
new file mode 100644 (file)
index 0000000..7c47e5b
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * 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
+
+namespace WebCore {
+
+enum TextDirectionSubmenuInclusionBehavior {
+    TextDirectionSubmenuNeverIncluded,
+    TextDirectionSubmenuAutomaticallyIncluded,
+    TextDirectionSubmenuAlwaysIncluded
+};
+
+}
diff --git a/Source/WebCore/page/UserInterfaceDirectionPolicy.h b/Source/WebCore/page/UserInterfaceDirectionPolicy.h
new file mode 100644 (file)
index 0000000..f6b1d86
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * 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
+
+namespace WebCore {
+
+enum class UserInterfaceDirectionPolicy {
+    Content,
+    System
+};
+
+}
index 9186bf8..b44073d 100644 (file)
 
 #include <wtf/NeverDestroyed.h>
 
-#if PLATFORM(IOS)
-#include "Device.h"
-#include <pal/spi/ios/UIKitSPI.h>
-#include <wtf/SoftLinking.h>
-#endif
-
-#if PLATFORM(IOS)
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIApplication)
-#endif
-
 namespace WebCore {
 
 static inline const char* sansSerifTraditionalHanFontFamily()
@@ -128,11 +117,6 @@ void Settings::initializeDefaultFontFamilies()
     setSansSerifFontFamily("Helvetica", USCRIPT_COMMON);
 }
 
-bool Settings::defaultTextAutosizingEnabled()
-{
-    return !deviceHasIPadCapability() || [[getUIApplicationClass() sharedApplication] _isClassic];
-}
-
 #endif
 
 const String& Settings::defaultMediaContentTypesRequiringHardwareSupport()
diff --git a/Source/WebCore/page/cocoa/SettingsDefaultValuesCocoa.mm b/Source/WebCore/page/cocoa/SettingsDefaultValuesCocoa.mm
new file mode 100644 (file)
index 0000000..0bf44a1
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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 "SettingsDefaultValues.h"
+
+#if PLATFORM(COCOA)
+
+#if PLATFORM(IOS)
+#include "Device.h"
+#include <pal/spi/ios/UIKitSPI.h>
+#include <wtf/SoftLinking.h>
+
+SOFT_LINK_FRAMEWORK(UIKit)
+SOFT_LINK_CLASS(UIKit, UIApplication)
+#endif
+
+namespace WebCore {
+
+#if PLATFORM(IOS)
+bool defaultTextAutosizingEnabled()
+{
+    return !deviceHasIPadCapability() || [[getUIApplicationClass() sharedApplication] _isClassic];
+}
+#endif
+
+}
+
+#endif // PLATFORM(COCOA)
diff --git a/Source/WebCore/platform/text/TextDirection.h b/Source/WebCore/platform/text/TextDirection.h
new file mode 100644 (file)
index 0000000..46755e2
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * 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
+
+namespace WebCore {
+
+enum TextDirection { LTR, RTL };
+
+inline bool isLeftToRightDirection(TextDirection direction)
+{
+    return direction == LTR;
+}
+
+}
index 87da8c3..8bf60e1 100644 (file)
 
 #pragma once
 
-namespace WebCore {
-
-enum TextDirection { LTR, RTL };
+#include "TextDirection.h"
 
-inline bool isLeftToRightDirection(TextDirection direction)
-{
-    return direction == LTR;
-}
+namespace WebCore {
 
 enum WritingMode {
     TopToBottomWritingMode = 0, // horizontal-tb
index 58ab2f9..7307af4 100644 (file)
@@ -350,6 +350,8 @@ static bool hasLoadingStylesheet(const Style::Scope& styleScope, const Element&
     return false;
 }
 
+static const unsigned defaultMaximumRenderTreeDepth = 512;
+
 void TreeResolver::resolveComposedTree()
 {
     ASSERT(m_parentStack.size() == 1);
@@ -384,7 +386,7 @@ void TreeResolver::resolveComposedTree()
 
         auto& element = downcast<Element>(node);
 
-        if (it.depth() > Settings::defaultMaximumRenderTreeDepth) {
+        if (it.depth() > defaultMaximumRenderTreeDepth) {
             resetStyleForNonRenderedDescendants(element);
             element.clearChildNeedsStyleRecalc();
             it.traverseNextSkippingChildren();
index 5321fe7..e58205b 100644 (file)
@@ -860,64 +860,34 @@ ExceptionOr<void> InternalSettings::setCustomPasteboardDataEnabled(bool enabled)
     return { };
 }
 
-static InternalSettings::ForcedAccessibilityValue settingsToInternalSettingsValue(Settings::ForcedAccessibilityValue value)
+ForcedAccessibilityValue InternalSettings::forcedColorsAreInvertedAccessibilityValue() const
 {
-    switch (value) {
-    case Settings::ForcedAccessibilityValue::System:
-        return InternalSettings::ForcedAccessibilityValue::System;
-    case Settings::ForcedAccessibilityValue::On:
-        return InternalSettings::ForcedAccessibilityValue::On;
-    case Settings::ForcedAccessibilityValue::Off:
-        return InternalSettings::ForcedAccessibilityValue::Off;
-    }
-
-    ASSERT_NOT_REACHED();
-    return InternalSettings::ForcedAccessibilityValue::Off;
-}
-
-static Settings::ForcedAccessibilityValue internalSettingsToSettingsValue(InternalSettings::ForcedAccessibilityValue value)
-{
-    switch (value) {
-    case InternalSettings::ForcedAccessibilityValue::System:
-        return Settings::ForcedAccessibilityValue::System;
-    case InternalSettings::ForcedAccessibilityValue::On:
-        return Settings::ForcedAccessibilityValue::On;
-    case InternalSettings::ForcedAccessibilityValue::Off:
-        return Settings::ForcedAccessibilityValue::Off;
-    }
-
-    ASSERT_NOT_REACHED();
-    return Settings::ForcedAccessibilityValue::Off;
-}
-
-InternalSettings::ForcedAccessibilityValue InternalSettings::forcedColorsAreInvertedAccessibilityValue() const
-{
-    return settingsToInternalSettingsValue(settings().forcedColorsAreInvertedAccessibilityValue());
+    return settings().forcedColorsAreInvertedAccessibilityValue();
 }
 
-void InternalSettings::setForcedColorsAreInvertedAccessibilityValue(InternalSettings::ForcedAccessibilityValue value)
+void InternalSettings::setForcedColorsAreInvertedAccessibilityValue(ForcedAccessibilityValue value)
 {
-    settings().setForcedColorsAreInvertedAccessibilityValue(internalSettingsToSettingsValue(value));
+    settings().setForcedColorsAreInvertedAccessibilityValue(value);
 }
 
-InternalSettings::ForcedAccessibilityValue InternalSettings::forcedDisplayIsMonochromeAccessibilityValue() const
+ForcedAccessibilityValue InternalSettings::forcedDisplayIsMonochromeAccessibilityValue() const
 {
-    return settingsToInternalSettingsValue(settings().forcedDisplayIsMonochromeAccessibilityValue());
+    return settings().forcedDisplayIsMonochromeAccessibilityValue();
 }
 
-void InternalSettings::setForcedDisplayIsMonochromeAccessibilityValue(InternalSettings::ForcedAccessibilityValue value)
+void InternalSettings::setForcedDisplayIsMonochromeAccessibilityValue(ForcedAccessibilityValue value)
 {
-    settings().setForcedDisplayIsMonochromeAccessibilityValue(internalSettingsToSettingsValue(value));
+    settings().setForcedDisplayIsMonochromeAccessibilityValue(value);
 }
 
-InternalSettings::ForcedAccessibilityValue InternalSettings::forcedPrefersReducedMotionAccessibilityValue() const
+ForcedAccessibilityValue InternalSettings::forcedPrefersReducedMotionAccessibilityValue() const
 {
-    return settingsToInternalSettingsValue(settings().forcedPrefersReducedMotionAccessibilityValue());
+    return settings().forcedPrefersReducedMotionAccessibilityValue();
 }
 
-void InternalSettings::setForcedPrefersReducedMotionAccessibilityValue(InternalSettings::ForcedAccessibilityValue value)
+void InternalSettings::setForcedPrefersReducedMotionAccessibilityValue(ForcedAccessibilityValue value)
 {
-    settings().setForcedPrefersReducedMotionAccessibilityValue(internalSettingsToSettingsValue(value));
+    settings().setForcedPrefersReducedMotionAccessibilityValue(value);
 }
 
 // If you add to this class, make sure that you update the Backup class for test reproducability!
index 201023d..9e3c726 100644 (file)
 // FIXME (121927): This include should not be needed.
 #include <wtf/text/AtomicStringHash.h>
 
-#include "EditingBehaviorTypes.h"
+#include "EditingBehaviorType.h"
 #include "ExceptionOr.h"
 #include "FontGenericFamilies.h"
+#include "ForcedAccessibilityValue.h"
 #include "IntSize.h"
 #include "InternalSettingsGenerated.h"
 #include "SecurityOrigin.h"
@@ -107,7 +108,7 @@ public:
     ExceptionOr<bool> deferredCSSParserEnabled();
     ExceptionOr<void> setDeferredCSSParserEnabled(bool);
 
-    enum class ForcedAccessibilityValue { System, On, Off };
+    using ForcedAccessibilityValue = WebCore::ForcedAccessibilityValue;
     ForcedAccessibilityValue forcedColorsAreInvertedAccessibilityValue() const;
     void setForcedColorsAreInvertedAccessibilityValue(ForcedAccessibilityValue);
     ForcedAccessibilityValue forcedDisplayIsMonochromeAccessibilityValue() const;
@@ -189,9 +190,9 @@ private:
         UserInterfaceDirectionPolicy m_userInterfaceDirectionPolicy;
         TextDirection m_systemLayoutDirection;
         PDFImageCachingPolicy m_pdfImageCachingPolicy;
-        Settings::ForcedAccessibilityValue m_forcedColorsAreInvertedAccessibilityValue;
-        Settings::ForcedAccessibilityValue m_forcedDisplayIsMonochromeAccessibilityValue;
-        Settings::ForcedAccessibilityValue m_forcedPrefersReducedMotionAccessibilityValue;
+        ForcedAccessibilityValue m_forcedColorsAreInvertedAccessibilityValue;
+        ForcedAccessibilityValue m_forcedDisplayIsMonochromeAccessibilityValue;
+        ForcedAccessibilityValue m_forcedPrefersReducedMotionAccessibilityValue;
         FrameFlattening m_frameFlattening;
 
         // Runtime enabled settings.