Changeset 222698 in webkit


Ignore:
Timestamp:
Oct 1, 2017 11:02:52 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

[Settings] Move remaining simple settings to Settings.in
https://bugs.webkit.org/show_bug.cgi?id=177730

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

  • Adds new option type for Settings.in, 'getter', which allows you to specify a custom name for the setting's getter. For instance, the setting javaEnabled has a custom getter name, 'isJavaEnabled'.
  • Adds support for WTF::Seconds as a type of setting. Used by only timeWithoutMouseMovementBeforeHidingControls at the moment.
  • Moves non-generated settings from Settings.h/cpp that don't require custom action when set, to Settings.in
  • Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py:
  • Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:
  • Scripts/GenerateSettings/Settings.py:

Add support for 'getter' and the Seconds type.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/text/FontRenderingMode.h: Copied from Source/WebCore/platform/text/TextFlags.h.
  • platform/text/TextFlags.h:

Add FontRenderingMode.h. Moved out of TextFlags.h to be accessible by
the settings generator.

  • page/Settings.cpp:

(WebCore::Settings::Settings):
(WebCore::Settings::setJavaEnabled): Deleted.
(WebCore::Settings::setJavaEnabledForLocalFiles): Deleted.
(WebCore::Settings::setPreferMIMETypeForImages): Deleted.
(WebCore::Settings::setForcePendingWebGLPolicy): Deleted.
(WebCore::Settings::setNeedsAdobeFrameReloadingQuirk): Deleted.
(WebCore::Settings::setFontRenderingMode): Deleted.
(WebCore::Settings::fontRenderingMode const): Deleted.
(WebCore::Settings::setShowTiledScrollingIndicator): Deleted.
(WebCore::Settings::setFontFallbackPrefersPictographs): Deleted.
(WebCore::Settings::setWebFontsAlwaysFallBack): Deleted.

  • page/Settings.h:

(WebCore::Settings::isJavaEnabled const): Deleted.
(WebCore::Settings::isJavaEnabledForLocalFiles const): Deleted.
(WebCore::Settings::preferMIMETypeForImages const): Deleted.
(WebCore::Settings::needsAcrobatFrameReloadingQuirk const): Deleted.
(WebCore::Settings::showTiledScrollingIndicator const): Deleted.
(WebCore::Settings::setTouchEventEmulationEnabled): Deleted.
(WebCore::Settings::isTouchEventEmulationEnabled const): Deleted.
(WebCore::Settings::setTimeWithoutMouseMovementBeforeHidingControls): Deleted.
(WebCore::Settings::timeWithoutMouseMovementBeforeHidingControls const): Deleted.
(WebCore::Settings::fontFallbackPrefersPictographs const): Deleted.
(WebCore::Settings::webFontsAlwaysFallBack const): Deleted.
(WebCore::Settings::setMediaKeysStorageDirectory): Deleted.
(WebCore::Settings::mediaKeysStorageDirectory const): Deleted.
(WebCore::Settings::setMediaDeviceIdentifierStorageDirectory): Deleted.
(WebCore::Settings::mediaDeviceIdentifierStorageDirectory const): Deleted.
(WebCore::Settings::applePayEnabled const): Deleted.
(WebCore::Settings::setApplePayEnabled): Deleted.
(WebCore::Settings::applePayCapabilityDisclosureAllowed const): Deleted.
(WebCore::Settings::setApplePayCapabilityDisclosureAllowed): Deleted.
(WebCore::Settings::isForcePendingWebGLPolicy const): Deleted.

  • page/Settings.in:

Moved hand-written settings to be Settings.in based.

Location:
trunk/Source/WebCore
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r222697 r222698  
     12017-10-01  Sam Weinig  <sam@webkit.org>
     2
     3        [Settings] Move remaining simple settings to Settings.in
     4        https://bugs.webkit.org/show_bug.cgi?id=177730
     5
     6        Reviewed by Darin Adler.
     7
     8        - Adds new option type for Settings.in, 'getter', which allows you to specify
     9          a custom name for the setting's getter. For instance, the setting javaEnabled
     10          has a custom getter name, 'isJavaEnabled'.
     11        - Adds support for WTF::Seconds as a type of setting. Used by only
     12          timeWithoutMouseMovementBeforeHidingControls at the moment.
     13        - Moves non-generated settings from Settings.h/cpp that don't require custom
     14          action when set, to Settings.in
     15
     16        * Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py:
     17        * Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:
     18        * Scripts/GenerateSettings/Settings.py:
     19
     20            Add support for 'getter' and the Seconds type.
     21
     22        * WebCore.xcodeproj/project.pbxproj:
     23        * platform/text/FontRenderingMode.h: Copied from Source/WebCore/platform/text/TextFlags.h.
     24        * platform/text/TextFlags.h:
     25       
     26            Add FontRenderingMode.h. Moved out of TextFlags.h to be accessible by
     27            the settings generator.
     28       
     29        * page/Settings.cpp:
     30        (WebCore::Settings::Settings):
     31        (WebCore::Settings::setJavaEnabled): Deleted.
     32        (WebCore::Settings::setJavaEnabledForLocalFiles): Deleted.
     33        (WebCore::Settings::setPreferMIMETypeForImages): Deleted.
     34        (WebCore::Settings::setForcePendingWebGLPolicy): Deleted.
     35        (WebCore::Settings::setNeedsAdobeFrameReloadingQuirk): Deleted.
     36        (WebCore::Settings::setFontRenderingMode): Deleted.
     37        (WebCore::Settings::fontRenderingMode const): Deleted.
     38        (WebCore::Settings::setShowTiledScrollingIndicator): Deleted.
     39        (WebCore::Settings::setFontFallbackPrefersPictographs): Deleted.
     40        (WebCore::Settings::setWebFontsAlwaysFallBack): Deleted.
     41        * page/Settings.h:
     42        (WebCore::Settings::isJavaEnabled const): Deleted.
     43        (WebCore::Settings::isJavaEnabledForLocalFiles const): Deleted.
     44        (WebCore::Settings::preferMIMETypeForImages const): Deleted.
     45        (WebCore::Settings::needsAcrobatFrameReloadingQuirk const): Deleted.
     46        (WebCore::Settings::showTiledScrollingIndicator const): Deleted.
     47        (WebCore::Settings::setTouchEventEmulationEnabled): Deleted.
     48        (WebCore::Settings::isTouchEventEmulationEnabled const): Deleted.
     49        (WebCore::Settings::setTimeWithoutMouseMovementBeforeHidingControls): Deleted.
     50        (WebCore::Settings::timeWithoutMouseMovementBeforeHidingControls const): Deleted.
     51        (WebCore::Settings::fontFallbackPrefersPictographs const): Deleted.
     52        (WebCore::Settings::webFontsAlwaysFallBack const): Deleted.
     53        (WebCore::Settings::setMediaKeysStorageDirectory): Deleted.
     54        (WebCore::Settings::mediaKeysStorageDirectory const): Deleted.
     55        (WebCore::Settings::setMediaDeviceIdentifierStorageDirectory): Deleted.
     56        (WebCore::Settings::mediaDeviceIdentifierStorageDirectory const): Deleted.
     57        (WebCore::Settings::applePayEnabled const): Deleted.
     58        (WebCore::Settings::setApplePayEnabled): Deleted.
     59        (WebCore::Settings::applePayCapabilityDisclosureAllowed const): Deleted.
     60        (WebCore::Settings::setApplePayCapabilityDisclosureAllowed): Deleted.
     61        (WebCore::Settings::isForcePendingWebGLPolicy const): Deleted.
     62        * page/Settings.in:
     63
     64            Moved hand-written settings to be Settings.in based.
     65
    1662017-10-01  Zalan Bujtas  <zalan@apple.com>
    267
  • trunk/Source/WebCore/Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py

    r222647 r222698  
    2626import os.path
    2727
    28 from Settings import license, makeSetterFunctionName, makeConditionalString, mapToIDLType, makeConditionalString
     28from Settings import license, makeSetterFunctionName, makeGetterFunctionName, makeConditionalString, mapToIDLType
    2929
    3030
     
    5454            outputFile.write("#if " + makeConditionalString(setting.conditional) + "\n")
    5555
    56         outputFile.write("    , m_" + setting.name + "(page->settings()." + setting.name + "())\n")
     56        outputFile.write("    , m_" + setting.name + "(page->settings()." + makeGetterFunctionName(setting) + "())\n")
    5757
    5858        if setting.conditional:
  • trunk/Source/WebCore/Scripts/GenerateSettings/GenerateSettingsHeaderFile.py

    r222695 r222698  
    2626import os.path
    2727
    28 from Settings import license, makeConditionalString, makeSetterFunctionName, includeForSetting, typeIsAggregate
     28from Settings import license, makeConditionalString, makeSetterFunctionName, makeGetterFunctionName, includeForSetting, typeIsValueType
    2929
    3030
     
    113113def printGetterAndSetter(outputFile, setting):
    114114    setterFunctionName = makeSetterFunctionName(setting)
     115    getterFunctionName = makeGetterFunctionName(setting)
    115116
    116117    # Export is only needed if the definition is not in the header.
    117118    webcoreExport = "WEBCORE_EXPORT " if setting.setNeedsStyleRecalcInAllFrames else ""
    118119
    119     if not typeIsAggregate(setting):
    120         outputFile.write("    " + setting.type + " " + setting.name + "() const { return m_" + setting.name + "; } \n")
     120    if not typeIsValueType(setting):
     121        outputFile.write("    " + setting.type + " " + getterFunctionName + "() const { return m_" + setting.name + "; } \n")
    121122        outputFile.write("    " + webcoreExport + "void " + setterFunctionName + "(" + setting.type + " " + setting.name + ")")
    122123    else:
    123         outputFile.write("    const " + setting.type + "& " + setting.name + "() const { return m_" + setting.name + "; } \n")
     124        outputFile.write("    const " + setting.type + "& " + getterFunctionName + "() const { return m_" + setting.name + "; } \n")
    124125        outputFile.write("    " + webcoreExport + "void " + setterFunctionName + "(const " + setting.type + "& " + setting.name + ")")
    125126
    126127    if setting.setNeedsStyleRecalcInAllFrames:
    127         outputFile.write("; \n")
     128        outputFile.write(";\n\n")
    128129    else:
    129         outputFile.write(" { m_" + setting.name + " = " + setting.name + "; } \n")
     130        outputFile.write(" { m_" + setting.name + " = " + setting.name + "; }\n\n")
    130131
    131132
  • trunk/Source/WebCore/Scripts/GenerateSettings/GenerateSettingsImplementationFile.py

    r222695 r222698  
    2626import os.path
    2727
    28 from Settings import license, makeConditionalString, makeSetterFunctionName, typeIsAggregate
     28from Settings import license, makeConditionalString, makeSetterFunctionName, typeIsValueType
    2929
    3030
     
    156156    setterFunctionName = makeSetterFunctionName(setting)
    157157
    158     if not typeIsAggregate(setting):
     158    if not typeIsValueType(setting):
    159159        outputFile.write("void SettingsGenerated::" + setterFunctionName + "(" + setting.type + " " + setting.name + ")\n")
    160160    else:
  • trunk/Source/WebCore/Scripts/GenerateSettings/Settings.py

    r222695 r222698  
    6767        self.setNeedsStyleRecalcInAllFrames = None
    6868        self.include = None
     69        self.getter = None
    6970
    7071    def __str__(self):
     
    7879        if (self.include):
    7980            result += " INCLUDE:" + self.include
     81        if (self.getter):
     82            result += " GETTER:" + self.getter
    8083        return result
    8184
     
    9093            return "set" + uppercaseFirstN(setting.name, len(prefix))
    9194    return "set" + uppercaseFirstN(setting.name, 1)
     95
     96
     97def makeGetterFunctionName(setting):
     98    if setting.getter:
     99        return setting.getter
     100    return setting.name
    92101
    93102
     
    132141
    133142
    134 def typeIsAggregate(setting):
    135     # Special case supported aggregates (e.g. classes/structs)
     143def typeIsValueType(setting):
    136144    if setting.type == 'String':
    137145        return True
    138     if setting.type == 'IntSize':
    139         return True
    140146
    141     # Everything else is an enum
    142     # FIXME: Should we make it a requirement to annotate enums or classes/structs in someway?
    143147    return False
    144148
     
    153157        return None
    154158
    155     # Special case String, as it doesn't follow the pattern of being in a file with the
     159    # Special case String and Seconds, as they doesn't follow the pattern of being in a file with the
    156160    # same name as the class.
    157161    if setting.type == 'String':
    158162        return "<wtf/text/WTFString.h>"
     163    if setting.type == 'Seconds':
     164        return "<wtf/Seconds.h>"
    159165
    160166    # Default to using the type name for the include.
     
    183189                if (name == 'include'):
    184190                    setting.include = value
     191                if (name == 'getter'):
     192                    setting.getter = value
    185193
    186194            # FIXME: ASSERT something about setting.initial
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r222697 r222698  
    31983198                7C2BDD3D17C7F98C0038FF15 /* JSDOMGlobalObjectTask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C2BDD3B17C7F98B0038FF15 /* JSDOMGlobalObjectTask.cpp */; };
    31993199                7C2BDD3E17C7F98C0038FF15 /* JSDOMGlobalObjectTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C2BDD3C17C7F98B0038FF15 /* JSDOMGlobalObjectTask.h */; };
     3200                7C2F8BC21F81BF5B00305C32 /* FontRenderingMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CCB11D81F81B22000849AFD /* FontRenderingMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
    32003201                7C2FA6111EA95A3900A03108 /* ResourceCryptographicDigest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C2FA60F1EA95A3200A03108 /* ResourceCryptographicDigest.cpp */; };
    32013202                7C2FA6121EA95A3C00A03108 /* ResourceCryptographicDigest.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C2FA6101EA95A3200A03108 /* ResourceCryptographicDigest.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    1164111642                7CC6993F191EC5F500AF2270 /* JSWebKitNamespace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitNamespace.h; sourceTree = "<group>"; };
    1164211643                7CC7E3D617208C0F003C5277 /* IDNScriptWhiteList.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDNScriptWhiteList.txt; sourceTree = "<group>"; };
     11644                7CCB11D81F81B22000849AFD /* FontRenderingMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontRenderingMode.h; sourceTree = "<group>"; };
    1164311645                7CD0BA021B8F79C9005CEBBE /* ActiveDOMCallbackMicrotask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActiveDOMCallbackMicrotask.cpp; sourceTree = "<group>"; };
    1164411646                7CD0BA031B8F79C9005CEBBE /* ActiveDOMCallbackMicrotask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActiveDOMCallbackMicrotask.h; sourceTree = "<group>"; };
     
    2397923981                                453EB635159C570400001BB7 /* DateTimeFormat.h */,
    2398023982                                CECCFC3A141973D5002A0AC1 /* DecodeEscapeSequences.h */,
     23983                                7CCB11D81F81B22000849AFD /* FontRenderingMode.h */,
    2398123984                                375CD231119D43C800A2A859 /* Hyphenation.h */,
    2398223985                                89B5EA9F11E8003D00F2367E /* LineEnding.cpp */,
     
    2616726170                                CE2616A4187E65C1007955F3 /* ios */,
    2616826171                                2D5036661BCDDDC400E20BB3 /* mac */,
     26172                                7CD0E2B61F80A4820016A4CE /* AbortController.cpp */,
     26173                                7CD0E2B51F80A4820016A4CE /* AbortController.h */,
     26174                                7CD0E2B71F80A4820016A4CE /* AbortController.idl */,
     26175                                7CD0E2BD1F80A56E0016A4CE /* AbortSignal.cpp */,
     26176                                7CD0E2BC1F80A56E0016A4CE /* AbortSignal.h */,
     26177                                7CD0E2BE1F80A56E0016A4CE /* AbortSignal.idl */,
    2616926178                                7C5222971E1DAE16002CB8F7 /* ActiveDOMCallback.cpp */,
    2617026179                                7C5222981E1DAE16002CB8F7 /* ActiveDOMCallback.h */,
     
    2617426183                                E1C4DE680EA75C1E0023CCD6 /* ActiveDOMObject.h */,
    2617526184                                83BB5C871D5D6F3A005A71F4 /* AllDescendantsCollection.h */,
    26176                                 7CD0E2B51F80A4820016A4CE /* AbortController.h */,
    26177                                 7CD0E2B61F80A4820016A4CE /* AbortController.cpp */,
    26178                                 7CD0E2B71F80A4820016A4CE /* AbortController.idl */,
    26179                                 7CD0E2BC1F80A56E0016A4CE /* AbortSignal.h */,
    26180                                 7CD0E2BD1F80A56E0016A4CE /* AbortSignal.cpp */,
    26181                                 7CD0E2BE1F80A56E0016A4CE /* AbortSignal.idl */,
    2618226185                                319847FE1A1D816700A13318 /* AnimationEvent.cpp */,
    2618326186                                319847FF1A1D816700A13318 /* AnimationEvent.h */,
     
    2707427077                        buildActionMask = 2147483647;
    2707527078                        files = (
     27079                                7CD0E2B81F80A4820016A4CE /* AbortController.h in Headers */,
     27080                                7CD0E2BF1F80A56E0016A4CE /* AbortSignal.h in Headers */,
    2707627081                                F48223131E386E240066FC79 /* AbstractPasteboard.h in Headers */,
    2707727082                                41E1B1D10FF5986900576B3B /* AbstractWorker.h in Headers */,
     
    2796027965                                B5320D6B122A24E9002D1440 /* FontPlatformData.h in Headers */,
    2796127966                                371F4FFC0D25E7F300ECE0D5 /* FontRanges.h in Headers */,
     27967                                7C2F8BC21F81BF5B00305C32 /* FontRenderingMode.h in Headers */,
    2796227968                                C2AB0AF71E6B3C6C001348C5 /* FontSelectionAlgorithm.h in Headers */,
    2796327969                                B2C3DA6B0D006CD600EF6F26 /* FontSelector.h in Headers */,
     
    2837528381                                1C21E57D183ED1FF001C289D /* IOSurfacePool.h in Headers */,
    2837628382                                07AC47021952102100EE9723 /* ISOVTTCue.h in Headers */,
     28383                                7C30D9841F815AEC00268356 /* JSAbortController.h in Headers */,
     28384                                7C30D9861F815AEC00268356 /* JSAbortSignal.h in Headers */,
    2837728385                                418F88050FF957AF0080F045 /* JSAbstractWorker.h in Headers */,
    2837828386                                5704405A1E53936200356601 /* JSAesCbcCfbParams.h in Headers */,
     
    2938829396                                CDF2B0111820540600F2B424 /* MockBox.h in Headers */,
    2938929397                                CDF4B7241E03BF8100E235A2 /* MockCDMFactory.h in Headers */,
    29390                                 7C30D9841F815AEC00268356 /* JSAbortController.h in Headers */,
    2939129398                                CDF4B7201E03BF6F00E235A2 /* MockCDMFactory.idl in Headers */,
    2939229399                                51058AE01D67C229009A538C /* MockGamepad.h in Headers */,
     
    3028230289                                B22279980D00BF220071B782 /* SVGAnimationElement.h in Headers */,
    3028330290                                439D334513A6911C00C20F4F /* SVGAnimatorFactory.h in Headers */,
    30284                                 7C30D9861F815AEC00268356 /* JSAbortSignal.h in Headers */,
    3028530291                                08FB3F8413BC754C0099FC18 /* SVGAttributeToPropertyMap.h in Headers */,
    3028630292                                B222799C0D00BF220071B782 /* SVGCircleElement.h in Headers */,
     
    3032630332                                B2227A090D00BF220071B782 /* SVGFETurbulenceElement.h in Headers */,
    3032730333                                845E72FC0FD2623900A87D79 /* SVGFilter.h in Headers */,
    30328                                 7CD0E2BF1F80A56E0016A4CE /* AbortSignal.h in Headers */,
    3032930334                                081EBF3B0FD34F4100DA7559 /* SVGFilterBuilder.h in Headers */,
    3033030335                                B2227A0C0D00BF220071B782 /* SVGFilterElement.h in Headers */,
     
    3078430789                                316BDB8C1E6E153000DE0D5A /* WebGPULayer.h in Headers */,
    3078530790                                A5E2123C1E4924A400CE1044 /* WebHeapAgent.h in Headers */,
    30786                                 7CD0E2B81F80A4820016A4CE /* AbortController.h in Headers */,
    3078730791                                A5840E25187B8AC200843B10 /* WebInjectedScriptHost.h in Headers */,
    3078830792                                A584FE301864CB8400843B10 /* WebInjectedScriptManager.h in Headers */,
     
    3127431278                        buildActionMask = 2147483647;
    3127531279                        files = (
     31280                                7CD0E2B91F80A4820016A4CE /* AbortController.cpp in Sources */,
     31281                                7CD0E2C01F80A56E0016A4CE /* AbortSignal.cpp in Sources */,
    3127631282                                41E1B1D00FF5986900576B3B /* AbstractWorker.cpp in Sources */,
    3127731283                                37F57AB91A50726900876F98 /* AccessibilityARIAGrid.cpp in Sources */,
     
    3155131557                                CE799FA71C6A50570097B518 /* ContentSecurityPolicyMediaListDirective.cpp in Sources */,
    3155231558                                CE6DADF91C591E6A003F6A88 /* ContentSecurityPolicyResponseHeaders.cpp in Sources */,
    31553                                 7C30D9851F815AEC00268356 /* JSAbortSignal.cpp in Sources */,
    3155431559                                CE799F9F1C6A4C160097B518 /* ContentSecurityPolicySource.cpp in Sources */,
    3155531560                                CE799F971C6A46BC0097B518 /* ContentSecurityPolicySourceList.cpp in Sources */,
     
    3162331628                                E1BD3319182D8DDD00C05D9F /* CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp in Sources */,
    3162431629                                E1C266D818317AB4003F8B33 /* CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp in Sources */,
    31625                                 7C30D9831F815AEC00268356 /* JSAbortController.cpp in Sources */,
    3162631630                                E125F82B1822CFEC00D84CD9 /* CryptoAlgorithmSHA1.cpp in Sources */,
    3162731631                                E19AC3EE1824DC7900349426 /* CryptoAlgorithmSHA224.cpp in Sources */,
     
    3240432408                                AD9FF6E11908391D003B61E0 /* IOSurfacePoolCocoa.mm in Sources */,
    3240532409                                07AC47011952102100EE9723 /* ISOVTTCue.cpp in Sources */,
     32410                                7C30D9831F815AEC00268356 /* JSAbortController.cpp in Sources */,
     32411                                7C30D9851F815AEC00268356 /* JSAbortSignal.cpp in Sources */,
    3240632412                                418F88040FF957AE0080F045 /* JSAbstractWorker.cpp in Sources */,
    3240732413                                5704405C1E53937900356601 /* JSAesCbcCfbParams.cpp in Sources */,
     
    3248232488                                93F9B6E00BA0FB7200854064 /* JSComment.cpp in Sources */,
    3248332489                                79AC9218109945C80021266E /* JSCompositionEvent.cpp in Sources */,
    32484                                 7CD0E2C01F80A56E0016A4CE /* AbortSignal.cpp in Sources */,
    3248532490                                FDA15EBD12B03F0B003A583A /* JSConvolverNode.cpp in Sources */,
    3248632491                                FE6FD48D0F676E9300092873 /* JSCoordinates.cpp in Sources */,
     
    3257532580                                7CBBBCCB1F56180D005EFAAC /* JSDOMMatrix2DInit.cpp in Sources */,
    3257632581                                835657C71ECAB10700CDE72D /* JSDOMMatrixInit.cpp in Sources */,
    32577                                 7CD0E2B91F80A4820016A4CE /* AbortController.cpp in Sources */,
    3257832582                                836ACED51ECAAB19004BD012 /* JSDOMMatrixReadOnly.cpp in Sources */,
    3257932583                                A9D248060D757E7D00FDF959 /* JSDOMMimeType.cpp in Sources */,
  • trunk/Source/WebCore/page/Settings.cpp

    r222686 r222698  
    4444#include "PageCache.h"
    4545#include "RuntimeApplicationChecks.h"
    46 #include "StorageMap.h"
    4746#include <limits>
    4847#include <wtf/NeverDestroyed.h>
     
    149148    , m_layoutInterval(layoutScheduleThreshold)
    150149    , m_minimumDOMTimerInterval(DOMTimer::defaultMinimumInterval())
    151     , m_isJavaEnabled(false)
    152     , m_isJavaEnabledForLocalFiles(true)
    153150    , m_loadsImagesAutomatically(false)
    154151    , m_areImagesEnabled(true)
    155     , m_preferMIMETypeForImages(false)
    156152    , m_arePluginsEnabled(false)
    157153    , m_isScriptEnabled(false)
    158     , m_needsAdobeFrameReloadingQuirk(false)
    159154    , m_usesPageCache(false)
    160     , m_fontRenderingMode(0)
    161     , m_showTiledScrollingIndicator(false)
    162155    , m_backgroundShouldExtendBeyondPage(false)
    163156    , m_dnsPrefetchingEnabled(false)
    164 #if ENABLE(TOUCH_EVENTS)
    165     , m_touchEventEmulationEnabled(false)
    166 #endif
    167157    , m_scrollingPerformanceLoggingEnabled(false)
    168     , m_timeWithoutMouseMovementBeforeHidingControls(3_s)
    169158    , m_setImageLoadingSettingsTimer(*this, &Settings::imageLoadingSettingsTimerFired)
    170159    , m_hiddenPageDOMTimerThrottlingEnabled(false)
    171160    , m_hiddenPageCSSAnimationSuspensionEnabled(false)
    172     , m_fontFallbackPrefersPictographs(false)
    173     , m_webFontsAlwaysFallBack(false)
    174     , m_forcePendingWebGLPolicy(false)
    175161{
    176162    // A Frame may not have been created yet, so we initialize the AtomicString
     
    345331}
    346332
    347 void Settings::setJavaEnabled(bool isJavaEnabled)
    348 {
    349     m_isJavaEnabled = isJavaEnabled;
    350 }
    351 
    352 void Settings::setJavaEnabledForLocalFiles(bool isJavaEnabledForLocalFiles)
    353 {
    354     m_isJavaEnabledForLocalFiles = isJavaEnabledForLocalFiles;
    355 }
    356 
    357333void Settings::setImagesEnabled(bool areImagesEnabled)
    358334{
     
    363339}
    364340
    365 void Settings::setPreferMIMETypeForImages(bool preferMIMETypeForImages)
    366 {
    367     m_preferMIMETypeForImages = preferMIMETypeForImages;
    368 }
    369 
    370 void Settings::setForcePendingWebGLPolicy(bool forced)
    371 {
    372     m_forcePendingWebGLPolicy = forced;
    373 }
    374 
    375341void Settings::setPluginsEnabled(bool arePluginsEnabled)
    376342{
     
    391357    if (m_page)
    392358        m_page->userStyleSheetLocationChanged();
    393 }
    394 
    395 // FIXME: This quirk is needed because of Radar 4674537 and 5211271. We need to phase it out once Adobe
    396 // can fix the bug from their end.
    397 void Settings::setNeedsAdobeFrameReloadingQuirk(bool shouldNotReloadIFramesForUnchangedSRC)
    398 {
    399     m_needsAdobeFrameReloadingQuirk = shouldNotReloadIFramesForUnchangedSRC;
    400359}
    401360
     
    434393}
    435394
    436 void Settings::setFontRenderingMode(FontRenderingMode mode)
    437 {
    438     if (fontRenderingMode() == mode)
    439         return;
    440     m_fontRenderingMode = static_cast<int>(mode);
    441     if (m_page)
    442         m_page->setNeedsRecalcStyleInAllFrames();
    443 }
    444 
    445 FontRenderingMode Settings::fontRenderingMode() const
    446 {
    447     return static_cast<FontRenderingMode>(m_fontRenderingMode);
    448 }
    449 
    450395void Settings::setDNSPrefetchingEnabled(bool dnsPrefetchingEnabled)
    451396{
     
    456401    if (m_page)
    457402        m_page->dnsPrefetchingStateChanged();
    458 }
    459 
    460 void Settings::setShowTiledScrollingIndicator(bool enabled)
    461 {
    462     if (m_showTiledScrollingIndicator == enabled)
    463         return;
    464        
    465     m_showTiledScrollingIndicator = enabled;
    466403}
    467404
     
    649586    if (m_page)
    650587        m_page->hiddenPageCSSAnimationSuspensionStateChanged();
    651 }
    652 
    653 void Settings::setFontFallbackPrefersPictographs(bool preferPictographs)
    654 {
    655     if (m_fontFallbackPrefersPictographs == preferPictographs)
    656         return;
    657 
    658     m_fontFallbackPrefersPictographs = preferPictographs;
    659     if (m_page)
    660         m_page->setNeedsRecalcStyleInAllFrames();
    661 }
    662 
    663 void Settings::setWebFontsAlwaysFallBack(bool enable)
    664 {
    665     if (m_webFontsAlwaysFallBack == enable)
    666         return;
    667 
    668     m_webFontsAlwaysFallBack = enable;
    669588}
    670589
  • trunk/Source/WebCore/page/Settings.h

    r222686 r222698  
    3131#include "SettingsDefaultValues.h"
    3232#include "SettingsGenerated.h"
    33 #include "TextFlags.h"
    3433#include "Timer.h"
    3534#include "URL.h"
     
    8988    WEBCORE_EXPORT void setScriptEnabled(bool);
    9089
    91     WEBCORE_EXPORT void setJavaEnabled(bool);
    92     bool isJavaEnabled() const { return m_isJavaEnabled; }
    93 
    94     // This settings is only consulted if isJavaEnabled() returns true;
    95     WEBCORE_EXPORT void setJavaEnabledForLocalFiles(bool);
    96     bool isJavaEnabledForLocalFiles() const { return m_isJavaEnabledForLocalFiles; }
    97 
    9890    WEBCORE_EXPORT void setImagesEnabled(bool);
    9991    bool areImagesEnabled() const { return m_areImagesEnabled; }
    10092
    101     WEBCORE_EXPORT void setPreferMIMETypeForImages(bool);
    102     bool preferMIMETypeForImages() const { return m_preferMIMETypeForImages; }
    103 
    10493    WEBCORE_EXPORT void setPluginsEnabled(bool);
    10594    bool arePluginsEnabled() const { return m_arePluginsEnabled; }
     
    11099    WEBCORE_EXPORT void setUserStyleSheetLocation(const URL&);
    111100    const URL& userStyleSheetLocation() const { return m_userStyleSheetLocation; }
    112 
    113     WEBCORE_EXPORT void setNeedsAdobeFrameReloadingQuirk(bool);
    114     bool needsAcrobatFrameReloadingQuirk() const { return m_needsAdobeFrameReloadingQuirk; }
    115101
    116102    WEBCORE_EXPORT void setMinimumDOMTimerInterval(Seconds); // Initialized to DOMTimer::defaultMinimumInterval().
     
    127113    WEBCORE_EXPORT void setUsesPageCache(bool);
    128114    bool usesPageCache() const { return m_usesPageCache; }
    129        
    130     void setFontRenderingMode(FontRenderingMode mode);
    131     FontRenderingMode fontRenderingMode() const;
    132 
    133     WEBCORE_EXPORT void setShowTiledScrollingIndicator(bool);
    134     bool showTiledScrollingIndicator() const { return m_showTiledScrollingIndicator; }
    135115
    136116#if ENABLE(RESOURCE_USAGE)
     
    184164    static bool usesMockScrollAnimator();
    185165
    186 #if ENABLE(TOUCH_EVENTS)
    187     void setTouchEventEmulationEnabled(bool enabled) { m_touchEventEmulationEnabled = enabled; }
    188     bool isTouchEventEmulationEnabled() const { return m_touchEventEmulationEnabled; }
    189 #endif
    190 
    191166    WEBCORE_EXPORT void setStorageBlockingPolicy(SecurityOrigin::StorageBlockingPolicy);
    192167    SecurityOrigin::StorageBlockingPolicy storageBlockingPolicy() const { return m_storageBlockingPolicy; }
     
    198173    static bool shouldRespectPriorityInCSSAttributeSetters();
    199174
    200     void setTimeWithoutMouseMovementBeforeHidingControls(Seconds time) { m_timeWithoutMouseMovementBeforeHidingControls = time; }
    201     Seconds timeWithoutMouseMovementBeforeHidingControls() const { return m_timeWithoutMouseMovementBeforeHidingControls; }
    202 
    203175    bool hiddenPageCSSAnimationSuspensionEnabled() const { return m_hiddenPageCSSAnimationSuspensionEnabled; }
    204176    WEBCORE_EXPORT void setHiddenPageCSSAnimationSuspensionEnabled(bool);
    205 
    206     WEBCORE_EXPORT void setFontFallbackPrefersPictographs(bool);
    207     bool fontFallbackPrefersPictographs() const { return m_fontFallbackPrefersPictographs; }
    208 
    209     WEBCORE_EXPORT void setWebFontsAlwaysFallBack(bool);
    210     bool webFontsAlwaysFallBack() const { return m_webFontsAlwaysFallBack; }
    211177
    212178    static bool lowPowerVideoAudioBufferSizeEnabled() { return gLowPowerVideoAudioBufferSizeEnabled; }
     
    242208    static void setCustomPasteboardDataEnabled(bool enabled) { gCustomPasteboardDataEnabled = enabled; }
    243209    WEBCORE_EXPORT static bool customPasteboardDataEnabled();
    244 
    245 #if ENABLE(LEGACY_ENCRYPTED_MEDIA)
    246     void setMediaKeysStorageDirectory(const String& directory) { m_mediaKeysStorageDirectory = directory; }
    247     const String& mediaKeysStorageDirectory() const { return m_mediaKeysStorageDirectory; }
    248 #endif
    249210   
    250211#if ENABLE(MEDIA_STREAM)
    251     void setMediaDeviceIdentifierStorageDirectory(const String& directory) { m_mediaDeviceIdentifierStorageDirectory = directory; }
    252     const String& mediaDeviceIdentifierStorageDirectory() const { return m_mediaDeviceIdentifierStorageDirectory; }
    253 
    254212    static bool mockCaptureDevicesEnabled();
    255213    WEBCORE_EXPORT static void setMockCaptureDevicesEnabled(bool);
     
    258216    WEBCORE_EXPORT static void setMediaCaptureRequiresSecureConnection(bool);
    259217#endif
    260 
    261 #if ENABLE(APPLE_PAY)
    262     bool applePayEnabled() const { return m_applePayEnabled; }
    263     void setApplePayEnabled(bool applePayEnabled) { m_applePayEnabled = applePayEnabled; }
    264 
    265     bool applePayCapabilityDisclosureAllowed() const { return m_applePayCapabilityDisclosureAllowed; }
    266     void setApplePayCapabilityDisclosureAllowed(bool applePayCapabilityDisclosureAllowed) { m_applePayCapabilityDisclosureAllowed = applePayCapabilityDisclosureAllowed; }
    267 #endif
    268 
    269     WEBCORE_EXPORT void setForcePendingWebGLPolicy(bool);
    270     bool isForcePendingWebGLPolicy() const { return m_forcePendingWebGLPolicy; }
    271218
    272219    WEBCORE_EXPORT static void setAllowsAnySSLCertificate(bool);
     
    290237    Seconds m_minimumDOMTimerInterval;
    291238
    292     bool m_isJavaEnabled : 1;
    293     bool m_isJavaEnabledForLocalFiles : 1;
    294239    bool m_loadsImagesAutomatically : 1;
    295240    bool m_areImagesEnabled : 1;
    296     bool m_preferMIMETypeForImages : 1;
    297241    bool m_arePluginsEnabled : 1;
    298242    bool m_isScriptEnabled : 1;
    299     bool m_needsAdobeFrameReloadingQuirk : 1;
    300243    bool m_usesPageCache : 1;
    301     unsigned m_fontRenderingMode : 1;
    302     bool m_showTiledScrollingIndicator : 1;
    303244    bool m_backgroundShouldExtendBeyondPage : 1;
    304245    bool m_dnsPrefetchingEnabled : 1;
    305246
    306 #if ENABLE(TOUCH_EVENTS)
    307     bool m_touchEventEmulationEnabled : 1;
    308 #endif
    309247    bool m_scrollingPerformanceLoggingEnabled : 1;
    310 
    311     Seconds m_timeWithoutMouseMovementBeforeHidingControls;
    312248
    313249    Timer m_setImageLoadingSettingsTimer;
     
    316252    bool m_hiddenPageDOMTimerThrottlingEnabled : 1;
    317253    bool m_hiddenPageCSSAnimationSuspensionEnabled : 1;
    318     bool m_fontFallbackPrefersPictographs : 1;
    319     bool m_webFontsAlwaysFallBack : 1;
    320 
    321     bool m_forcePendingWebGLPolicy : 1;
    322254
    323255#if ENABLE(RESOURCE_USAGE)
     
    356288    WEBCORE_EXPORT static bool gCustomPasteboardDataEnabled;
    357289
    358 #if ENABLE(LEGACY_ENCRYPTED_MEDIA)
    359     String m_mediaKeysStorageDirectory;
    360 #endif
    361    
    362290#if ENABLE(MEDIA_STREAM)
    363     String m_mediaDeviceIdentifierStorageDirectory;
    364291    static bool gMockCaptureDevicesEnabled;
    365292    static bool gMediaCaptureRequiresSecureConnection;
    366 #endif
    367 
    368 #if ENABLE(APPLE_PAY)
    369     bool m_applePayEnabled { false };
    370     bool m_applePayCapabilityDisclosureAllowed { true };
    371293#endif
    372294
  • trunk/Source/WebCore/page/Settings.in

    r222686 r222698  
    6767showRepaintCounter initial=false, setNeedsStyleRecalcInAllFrames=1
    6868visibleDebugOverlayRegions type=DebugOverlayRegions, initial=0
     69showTiledScrollingIndicator initial=false
    6970
    7071# This is a quirk we are pro-actively applying to old applications. It changes keyboard event dispatching,
     
    302303allowMediaContentTypesRequiringHardwareSupportAsFallback initial=false
    303304
     305storageAccessAPIEnabled initial=false
     306
     307timeWithoutMouseMovementBeforeHidingControls type=Seconds, initial=3_s
     308
     309fontFallbackPrefersPictographs initial=false, setNeedsStyleRecalcInAllFrames=1
     310webFontsAlwaysFallBack initial=false
     311
    304312paymentRequestEnabled initial=false, conditional=PAYMENT_REQUEST
    305313
    306 storageAccessAPIEnabled initial=false
    307 
     314applePayEnabled initial=false, conditional=APPLE_PAY
     315applePayCapabilityDisclosureAllowed initial=true, conditional=APPLE_PAY
     316
     317javaEnabled initial=false, getter=isJavaEnabled
     318javaEnabledForLocalFiles initial=true, getter=isJavaEnabledForLocalFiles
     319
     320fontRenderingMode type=FontRenderingMode, initial=FontRenderingMode::Normal
     321
     322preferMIMETypeForImages initial=false
     323
     324forcePendingWebGLPolicy initial=false, getter=isForcePendingWebGLPolicy
     325
     326mediaKeysStorageDirectory type=String, conditional=LEGACY_ENCRYPTED_MEDIA
     327mediaDeviceIdentifierStorageDirectory type=String, conditional=MEDIA_STREAM
     328
     329# FIXME: This quirk is needed because of Radar 4674537 and 5211271. We need to phase it out once Adobe
     330# can fix the bug from their end.
     331needsAdobeFrameReloadingQuirk initial=false, getter=needsAcrobatFrameReloadingQuirk
     332
     333touchEventEmulationEnabled initial=false, getter=isTouchEventEmulationEnabled, conditional=TOUCH_EVENTS
  • trunk/Source/WebCore/platform/text/TextFlags.h

    r217272 r222698  
    2626#pragma once
    2727
     28#include "FontRenderingMode.h"
     29
    2830namespace WebCore {
    2931
     
    3133
    3234enum FontSmoothingMode { AutoSmoothing, NoSmoothing, Antialiased, SubpixelAntialiased };
    33 
    34 // This setting is used to provide ways of switching between multiple rendering modes that may have different
    35 // metrics. It is used to switch between CG and GDI text on Windows.
    36 enum class FontRenderingMode { Normal, Alternate };
    3735
    3836enum FontOrientation { Horizontal, Vertical };
Note: See TracChangeset for help on using the changeset viewer.