Changeset 222698 in webkit
- Timestamp:
- Oct 1, 2017 11:02:52 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r222697 r222698 1 2017-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 1 66 2017-10-01 Zalan Bujtas <zalan@apple.com> 2 67 -
trunk/Source/WebCore/Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py
r222647 r222698 26 26 import os.path 27 27 28 from Settings import license, makeSetterFunctionName, make ConditionalString, mapToIDLType, makeConditionalString28 from Settings import license, makeSetterFunctionName, makeGetterFunctionName, makeConditionalString, mapToIDLType 29 29 30 30 … … 54 54 outputFile.write("#if " + makeConditionalString(setting.conditional) + "\n") 55 55 56 outputFile.write(" , m_" + setting.name + "(page->settings()." + setting.name+ "())\n")56 outputFile.write(" , m_" + setting.name + "(page->settings()." + makeGetterFunctionName(setting) + "())\n") 57 57 58 58 if setting.conditional: -
trunk/Source/WebCore/Scripts/GenerateSettings/GenerateSettingsHeaderFile.py
r222695 r222698 26 26 import os.path 27 27 28 from Settings import license, makeConditionalString, makeSetterFunctionName, includeForSetting, typeIsAggregate28 from Settings import license, makeConditionalString, makeSetterFunctionName, makeGetterFunctionName, includeForSetting, typeIsValueType 29 29 30 30 … … 113 113 def printGetterAndSetter(outputFile, setting): 114 114 setterFunctionName = makeSetterFunctionName(setting) 115 getterFunctionName = makeGetterFunctionName(setting) 115 116 116 117 # Export is only needed if the definition is not in the header. 117 118 webcoreExport = "WEBCORE_EXPORT " if setting.setNeedsStyleRecalcInAllFrames else "" 118 119 119 if not typeIs Aggregate(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") 121 122 outputFile.write(" " + webcoreExport + "void " + setterFunctionName + "(" + setting.type + " " + setting.name + ")") 122 123 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") 124 125 outputFile.write(" " + webcoreExport + "void " + setterFunctionName + "(const " + setting.type + "& " + setting.name + ")") 125 126 126 127 if setting.setNeedsStyleRecalcInAllFrames: 127 outputFile.write("; 128 outputFile.write(";\n\n") 128 129 else: 129 outputFile.write(" { m_" + setting.name + " = " + setting.name + "; } 130 outputFile.write(" { m_" + setting.name + " = " + setting.name + "; }\n\n") 130 131 131 132 -
trunk/Source/WebCore/Scripts/GenerateSettings/GenerateSettingsImplementationFile.py
r222695 r222698 26 26 import os.path 27 27 28 from Settings import license, makeConditionalString, makeSetterFunctionName, typeIs Aggregate28 from Settings import license, makeConditionalString, makeSetterFunctionName, typeIsValueType 29 29 30 30 … … 156 156 setterFunctionName = makeSetterFunctionName(setting) 157 157 158 if not typeIs Aggregate(setting):158 if not typeIsValueType(setting): 159 159 outputFile.write("void SettingsGenerated::" + setterFunctionName + "(" + setting.type + " " + setting.name + ")\n") 160 160 else: -
trunk/Source/WebCore/Scripts/GenerateSettings/Settings.py
r222695 r222698 67 67 self.setNeedsStyleRecalcInAllFrames = None 68 68 self.include = None 69 self.getter = None 69 70 70 71 def __str__(self): … … 78 79 if (self.include): 79 80 result += " INCLUDE:" + self.include 81 if (self.getter): 82 result += " GETTER:" + self.getter 80 83 return result 81 84 … … 90 93 return "set" + uppercaseFirstN(setting.name, len(prefix)) 91 94 return "set" + uppercaseFirstN(setting.name, 1) 95 96 97 def makeGetterFunctionName(setting): 98 if setting.getter: 99 return setting.getter 100 return setting.name 92 101 93 102 … … 132 141 133 142 134 def typeIsAggregate(setting): 135 # Special case supported aggregates (e.g. classes/structs) 143 def typeIsValueType(setting): 136 144 if setting.type == 'String': 137 145 return True 138 if setting.type == 'IntSize':139 return True140 146 141 # Everything else is an enum142 # FIXME: Should we make it a requirement to annotate enums or classes/structs in someway?143 147 return False 144 148 … … 153 157 return None 154 158 155 # Special case String , as itdoesn't follow the pattern of being in a file with the159 # Special case String and Seconds, as they doesn't follow the pattern of being in a file with the 156 160 # same name as the class. 157 161 if setting.type == 'String': 158 162 return "<wtf/text/WTFString.h>" 163 if setting.type == 'Seconds': 164 return "<wtf/Seconds.h>" 159 165 160 166 # Default to using the type name for the include. … … 183 189 if (name == 'include'): 184 190 setting.include = value 191 if (name == 'getter'): 192 setting.getter = value 185 193 186 194 # FIXME: ASSERT something about setting.initial -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r222697 r222698 3198 3198 7C2BDD3D17C7F98C0038FF15 /* JSDOMGlobalObjectTask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C2BDD3B17C7F98B0038FF15 /* JSDOMGlobalObjectTask.cpp */; }; 3199 3199 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, ); }; }; 3200 3201 7C2FA6111EA95A3900A03108 /* ResourceCryptographicDigest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C2FA60F1EA95A3200A03108 /* ResourceCryptographicDigest.cpp */; }; 3201 3202 7C2FA6121EA95A3C00A03108 /* ResourceCryptographicDigest.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C2FA6101EA95A3200A03108 /* ResourceCryptographicDigest.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 11641 11642 7CC6993F191EC5F500AF2270 /* JSWebKitNamespace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitNamespace.h; sourceTree = "<group>"; }; 11642 11643 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>"; }; 11643 11645 7CD0BA021B8F79C9005CEBBE /* ActiveDOMCallbackMicrotask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActiveDOMCallbackMicrotask.cpp; sourceTree = "<group>"; }; 11644 11646 7CD0BA031B8F79C9005CEBBE /* ActiveDOMCallbackMicrotask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActiveDOMCallbackMicrotask.h; sourceTree = "<group>"; }; … … 23979 23981 453EB635159C570400001BB7 /* DateTimeFormat.h */, 23980 23982 CECCFC3A141973D5002A0AC1 /* DecodeEscapeSequences.h */, 23983 7CCB11D81F81B22000849AFD /* FontRenderingMode.h */, 23981 23984 375CD231119D43C800A2A859 /* Hyphenation.h */, 23982 23985 89B5EA9F11E8003D00F2367E /* LineEnding.cpp */, … … 26167 26170 CE2616A4187E65C1007955F3 /* ios */, 26168 26171 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 */, 26169 26178 7C5222971E1DAE16002CB8F7 /* ActiveDOMCallback.cpp */, 26170 26179 7C5222981E1DAE16002CB8F7 /* ActiveDOMCallback.h */, … … 26174 26183 E1C4DE680EA75C1E0023CCD6 /* ActiveDOMObject.h */, 26175 26184 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 */,26182 26185 319847FE1A1D816700A13318 /* AnimationEvent.cpp */, 26183 26186 319847FF1A1D816700A13318 /* AnimationEvent.h */, … … 27074 27077 buildActionMask = 2147483647; 27075 27078 files = ( 27079 7CD0E2B81F80A4820016A4CE /* AbortController.h in Headers */, 27080 7CD0E2BF1F80A56E0016A4CE /* AbortSignal.h in Headers */, 27076 27081 F48223131E386E240066FC79 /* AbstractPasteboard.h in Headers */, 27077 27082 41E1B1D10FF5986900576B3B /* AbstractWorker.h in Headers */, … … 27960 27965 B5320D6B122A24E9002D1440 /* FontPlatformData.h in Headers */, 27961 27966 371F4FFC0D25E7F300ECE0D5 /* FontRanges.h in Headers */, 27967 7C2F8BC21F81BF5B00305C32 /* FontRenderingMode.h in Headers */, 27962 27968 C2AB0AF71E6B3C6C001348C5 /* FontSelectionAlgorithm.h in Headers */, 27963 27969 B2C3DA6B0D006CD600EF6F26 /* FontSelector.h in Headers */, … … 28375 28381 1C21E57D183ED1FF001C289D /* IOSurfacePool.h in Headers */, 28376 28382 07AC47021952102100EE9723 /* ISOVTTCue.h in Headers */, 28383 7C30D9841F815AEC00268356 /* JSAbortController.h in Headers */, 28384 7C30D9861F815AEC00268356 /* JSAbortSignal.h in Headers */, 28377 28385 418F88050FF957AF0080F045 /* JSAbstractWorker.h in Headers */, 28378 28386 5704405A1E53936200356601 /* JSAesCbcCfbParams.h in Headers */, … … 29388 29396 CDF2B0111820540600F2B424 /* MockBox.h in Headers */, 29389 29397 CDF4B7241E03BF8100E235A2 /* MockCDMFactory.h in Headers */, 29390 7C30D9841F815AEC00268356 /* JSAbortController.h in Headers */,29391 29398 CDF4B7201E03BF6F00E235A2 /* MockCDMFactory.idl in Headers */, 29392 29399 51058AE01D67C229009A538C /* MockGamepad.h in Headers */, … … 30282 30289 B22279980D00BF220071B782 /* SVGAnimationElement.h in Headers */, 30283 30290 439D334513A6911C00C20F4F /* SVGAnimatorFactory.h in Headers */, 30284 7C30D9861F815AEC00268356 /* JSAbortSignal.h in Headers */,30285 30291 08FB3F8413BC754C0099FC18 /* SVGAttributeToPropertyMap.h in Headers */, 30286 30292 B222799C0D00BF220071B782 /* SVGCircleElement.h in Headers */, … … 30326 30332 B2227A090D00BF220071B782 /* SVGFETurbulenceElement.h in Headers */, 30327 30333 845E72FC0FD2623900A87D79 /* SVGFilter.h in Headers */, 30328 7CD0E2BF1F80A56E0016A4CE /* AbortSignal.h in Headers */,30329 30334 081EBF3B0FD34F4100DA7559 /* SVGFilterBuilder.h in Headers */, 30330 30335 B2227A0C0D00BF220071B782 /* SVGFilterElement.h in Headers */, … … 30784 30789 316BDB8C1E6E153000DE0D5A /* WebGPULayer.h in Headers */, 30785 30790 A5E2123C1E4924A400CE1044 /* WebHeapAgent.h in Headers */, 30786 7CD0E2B81F80A4820016A4CE /* AbortController.h in Headers */,30787 30791 A5840E25187B8AC200843B10 /* WebInjectedScriptHost.h in Headers */, 30788 30792 A584FE301864CB8400843B10 /* WebInjectedScriptManager.h in Headers */, … … 31274 31278 buildActionMask = 2147483647; 31275 31279 files = ( 31280 7CD0E2B91F80A4820016A4CE /* AbortController.cpp in Sources */, 31281 7CD0E2C01F80A56E0016A4CE /* AbortSignal.cpp in Sources */, 31276 31282 41E1B1D00FF5986900576B3B /* AbstractWorker.cpp in Sources */, 31277 31283 37F57AB91A50726900876F98 /* AccessibilityARIAGrid.cpp in Sources */, … … 31551 31557 CE799FA71C6A50570097B518 /* ContentSecurityPolicyMediaListDirective.cpp in Sources */, 31552 31558 CE6DADF91C591E6A003F6A88 /* ContentSecurityPolicyResponseHeaders.cpp in Sources */, 31553 7C30D9851F815AEC00268356 /* JSAbortSignal.cpp in Sources */,31554 31559 CE799F9F1C6A4C160097B518 /* ContentSecurityPolicySource.cpp in Sources */, 31555 31560 CE799F971C6A46BC0097B518 /* ContentSecurityPolicySourceList.cpp in Sources */, … … 31623 31628 E1BD3319182D8DDD00C05D9F /* CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp in Sources */, 31624 31629 E1C266D818317AB4003F8B33 /* CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp in Sources */, 31625 7C30D9831F815AEC00268356 /* JSAbortController.cpp in Sources */,31626 31630 E125F82B1822CFEC00D84CD9 /* CryptoAlgorithmSHA1.cpp in Sources */, 31627 31631 E19AC3EE1824DC7900349426 /* CryptoAlgorithmSHA224.cpp in Sources */, … … 32404 32408 AD9FF6E11908391D003B61E0 /* IOSurfacePoolCocoa.mm in Sources */, 32405 32409 07AC47011952102100EE9723 /* ISOVTTCue.cpp in Sources */, 32410 7C30D9831F815AEC00268356 /* JSAbortController.cpp in Sources */, 32411 7C30D9851F815AEC00268356 /* JSAbortSignal.cpp in Sources */, 32406 32412 418F88040FF957AE0080F045 /* JSAbstractWorker.cpp in Sources */, 32407 32413 5704405C1E53937900356601 /* JSAesCbcCfbParams.cpp in Sources */, … … 32482 32488 93F9B6E00BA0FB7200854064 /* JSComment.cpp in Sources */, 32483 32489 79AC9218109945C80021266E /* JSCompositionEvent.cpp in Sources */, 32484 7CD0E2C01F80A56E0016A4CE /* AbortSignal.cpp in Sources */,32485 32490 FDA15EBD12B03F0B003A583A /* JSConvolverNode.cpp in Sources */, 32486 32491 FE6FD48D0F676E9300092873 /* JSCoordinates.cpp in Sources */, … … 32575 32580 7CBBBCCB1F56180D005EFAAC /* JSDOMMatrix2DInit.cpp in Sources */, 32576 32581 835657C71ECAB10700CDE72D /* JSDOMMatrixInit.cpp in Sources */, 32577 7CD0E2B91F80A4820016A4CE /* AbortController.cpp in Sources */,32578 32582 836ACED51ECAAB19004BD012 /* JSDOMMatrixReadOnly.cpp in Sources */, 32579 32583 A9D248060D757E7D00FDF959 /* JSDOMMimeType.cpp in Sources */, -
trunk/Source/WebCore/page/Settings.cpp
r222686 r222698 44 44 #include "PageCache.h" 45 45 #include "RuntimeApplicationChecks.h" 46 #include "StorageMap.h"47 46 #include <limits> 48 47 #include <wtf/NeverDestroyed.h> … … 149 148 , m_layoutInterval(layoutScheduleThreshold) 150 149 , m_minimumDOMTimerInterval(DOMTimer::defaultMinimumInterval()) 151 , m_isJavaEnabled(false)152 , m_isJavaEnabledForLocalFiles(true)153 150 , m_loadsImagesAutomatically(false) 154 151 , m_areImagesEnabled(true) 155 , m_preferMIMETypeForImages(false)156 152 , m_arePluginsEnabled(false) 157 153 , m_isScriptEnabled(false) 158 , m_needsAdobeFrameReloadingQuirk(false)159 154 , m_usesPageCache(false) 160 , m_fontRenderingMode(0)161 , m_showTiledScrollingIndicator(false)162 155 , m_backgroundShouldExtendBeyondPage(false) 163 156 , m_dnsPrefetchingEnabled(false) 164 #if ENABLE(TOUCH_EVENTS)165 , m_touchEventEmulationEnabled(false)166 #endif167 157 , m_scrollingPerformanceLoggingEnabled(false) 168 , m_timeWithoutMouseMovementBeforeHidingControls(3_s)169 158 , m_setImageLoadingSettingsTimer(*this, &Settings::imageLoadingSettingsTimerFired) 170 159 , m_hiddenPageDOMTimerThrottlingEnabled(false) 171 160 , m_hiddenPageCSSAnimationSuspensionEnabled(false) 172 , m_fontFallbackPrefersPictographs(false)173 , m_webFontsAlwaysFallBack(false)174 , m_forcePendingWebGLPolicy(false)175 161 { 176 162 // A Frame may not have been created yet, so we initialize the AtomicString … … 345 331 } 346 332 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 357 333 void Settings::setImagesEnabled(bool areImagesEnabled) 358 334 { … … 363 339 } 364 340 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 375 341 void Settings::setPluginsEnabled(bool arePluginsEnabled) 376 342 { … … 391 357 if (m_page) 392 358 m_page->userStyleSheetLocationChanged(); 393 }394 395 // FIXME: This quirk is needed because of Radar 4674537 and 5211271. We need to phase it out once Adobe396 // can fix the bug from their end.397 void Settings::setNeedsAdobeFrameReloadingQuirk(bool shouldNotReloadIFramesForUnchangedSRC)398 {399 m_needsAdobeFrameReloadingQuirk = shouldNotReloadIFramesForUnchangedSRC;400 359 } 401 360 … … 434 393 } 435 394 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() const446 {447 return static_cast<FontRenderingMode>(m_fontRenderingMode);448 }449 450 395 void Settings::setDNSPrefetchingEnabled(bool dnsPrefetchingEnabled) 451 396 { … … 456 401 if (m_page) 457 402 m_page->dnsPrefetchingStateChanged(); 458 }459 460 void Settings::setShowTiledScrollingIndicator(bool enabled)461 {462 if (m_showTiledScrollingIndicator == enabled)463 return;464 465 m_showTiledScrollingIndicator = enabled;466 403 } 467 404 … … 649 586 if (m_page) 650 587 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;669 588 } 670 589 -
trunk/Source/WebCore/page/Settings.h
r222686 r222698 31 31 #include "SettingsDefaultValues.h" 32 32 #include "SettingsGenerated.h" 33 #include "TextFlags.h"34 33 #include "Timer.h" 35 34 #include "URL.h" … … 89 88 WEBCORE_EXPORT void setScriptEnabled(bool); 90 89 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 98 90 WEBCORE_EXPORT void setImagesEnabled(bool); 99 91 bool areImagesEnabled() const { return m_areImagesEnabled; } 100 92 101 WEBCORE_EXPORT void setPreferMIMETypeForImages(bool);102 bool preferMIMETypeForImages() const { return m_preferMIMETypeForImages; }103 104 93 WEBCORE_EXPORT void setPluginsEnabled(bool); 105 94 bool arePluginsEnabled() const { return m_arePluginsEnabled; } … … 110 99 WEBCORE_EXPORT void setUserStyleSheetLocation(const URL&); 111 100 const URL& userStyleSheetLocation() const { return m_userStyleSheetLocation; } 112 113 WEBCORE_EXPORT void setNeedsAdobeFrameReloadingQuirk(bool);114 bool needsAcrobatFrameReloadingQuirk() const { return m_needsAdobeFrameReloadingQuirk; }115 101 116 102 WEBCORE_EXPORT void setMinimumDOMTimerInterval(Seconds); // Initialized to DOMTimer::defaultMinimumInterval(). … … 127 113 WEBCORE_EXPORT void setUsesPageCache(bool); 128 114 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; }135 115 136 116 #if ENABLE(RESOURCE_USAGE) … … 184 164 static bool usesMockScrollAnimator(); 185 165 186 #if ENABLE(TOUCH_EVENTS)187 void setTouchEventEmulationEnabled(bool enabled) { m_touchEventEmulationEnabled = enabled; }188 bool isTouchEventEmulationEnabled() const { return m_touchEventEmulationEnabled; }189 #endif190 191 166 WEBCORE_EXPORT void setStorageBlockingPolicy(SecurityOrigin::StorageBlockingPolicy); 192 167 SecurityOrigin::StorageBlockingPolicy storageBlockingPolicy() const { return m_storageBlockingPolicy; } … … 198 173 static bool shouldRespectPriorityInCSSAttributeSetters(); 199 174 200 void setTimeWithoutMouseMovementBeforeHidingControls(Seconds time) { m_timeWithoutMouseMovementBeforeHidingControls = time; }201 Seconds timeWithoutMouseMovementBeforeHidingControls() const { return m_timeWithoutMouseMovementBeforeHidingControls; }202 203 175 bool hiddenPageCSSAnimationSuspensionEnabled() const { return m_hiddenPageCSSAnimationSuspensionEnabled; } 204 176 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; }211 177 212 178 static bool lowPowerVideoAudioBufferSizeEnabled() { return gLowPowerVideoAudioBufferSizeEnabled; } … … 242 208 static void setCustomPasteboardDataEnabled(bool enabled) { gCustomPasteboardDataEnabled = enabled; } 243 209 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 #endif249 210 250 211 #if ENABLE(MEDIA_STREAM) 251 void setMediaDeviceIdentifierStorageDirectory(const String& directory) { m_mediaDeviceIdentifierStorageDirectory = directory; }252 const String& mediaDeviceIdentifierStorageDirectory() const { return m_mediaDeviceIdentifierStorageDirectory; }253 254 212 static bool mockCaptureDevicesEnabled(); 255 213 WEBCORE_EXPORT static void setMockCaptureDevicesEnabled(bool); … … 258 216 WEBCORE_EXPORT static void setMediaCaptureRequiresSecureConnection(bool); 259 217 #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 #endif268 269 WEBCORE_EXPORT void setForcePendingWebGLPolicy(bool);270 bool isForcePendingWebGLPolicy() const { return m_forcePendingWebGLPolicy; }271 218 272 219 WEBCORE_EXPORT static void setAllowsAnySSLCertificate(bool); … … 290 237 Seconds m_minimumDOMTimerInterval; 291 238 292 bool m_isJavaEnabled : 1;293 bool m_isJavaEnabledForLocalFiles : 1;294 239 bool m_loadsImagesAutomatically : 1; 295 240 bool m_areImagesEnabled : 1; 296 bool m_preferMIMETypeForImages : 1;297 241 bool m_arePluginsEnabled : 1; 298 242 bool m_isScriptEnabled : 1; 299 bool m_needsAdobeFrameReloadingQuirk : 1;300 243 bool m_usesPageCache : 1; 301 unsigned m_fontRenderingMode : 1;302 bool m_showTiledScrollingIndicator : 1;303 244 bool m_backgroundShouldExtendBeyondPage : 1; 304 245 bool m_dnsPrefetchingEnabled : 1; 305 246 306 #if ENABLE(TOUCH_EVENTS)307 bool m_touchEventEmulationEnabled : 1;308 #endif309 247 bool m_scrollingPerformanceLoggingEnabled : 1; 310 311 Seconds m_timeWithoutMouseMovementBeforeHidingControls;312 248 313 249 Timer m_setImageLoadingSettingsTimer; … … 316 252 bool m_hiddenPageDOMTimerThrottlingEnabled : 1; 317 253 bool m_hiddenPageCSSAnimationSuspensionEnabled : 1; 318 bool m_fontFallbackPrefersPictographs : 1;319 bool m_webFontsAlwaysFallBack : 1;320 321 bool m_forcePendingWebGLPolicy : 1;322 254 323 255 #if ENABLE(RESOURCE_USAGE) … … 356 288 WEBCORE_EXPORT static bool gCustomPasteboardDataEnabled; 357 289 358 #if ENABLE(LEGACY_ENCRYPTED_MEDIA)359 String m_mediaKeysStorageDirectory;360 #endif361 362 290 #if ENABLE(MEDIA_STREAM) 363 String m_mediaDeviceIdentifierStorageDirectory;364 291 static bool gMockCaptureDevicesEnabled; 365 292 static bool gMediaCaptureRequiresSecureConnection; 366 #endif367 368 #if ENABLE(APPLE_PAY)369 bool m_applePayEnabled { false };370 bool m_applePayCapabilityDisclosureAllowed { true };371 293 #endif 372 294 -
trunk/Source/WebCore/page/Settings.in
r222686 r222698 67 67 showRepaintCounter initial=false, setNeedsStyleRecalcInAllFrames=1 68 68 visibleDebugOverlayRegions type=DebugOverlayRegions, initial=0 69 showTiledScrollingIndicator initial=false 69 70 70 71 # This is a quirk we are pro-actively applying to old applications. It changes keyboard event dispatching, … … 302 303 allowMediaContentTypesRequiringHardwareSupportAsFallback initial=false 303 304 305 storageAccessAPIEnabled initial=false 306 307 timeWithoutMouseMovementBeforeHidingControls type=Seconds, initial=3_s 308 309 fontFallbackPrefersPictographs initial=false, setNeedsStyleRecalcInAllFrames=1 310 webFontsAlwaysFallBack initial=false 311 304 312 paymentRequestEnabled initial=false, conditional=PAYMENT_REQUEST 305 313 306 storageAccessAPIEnabled initial=false 307 314 applePayEnabled initial=false, conditional=APPLE_PAY 315 applePayCapabilityDisclosureAllowed initial=true, conditional=APPLE_PAY 316 317 javaEnabled initial=false, getter=isJavaEnabled 318 javaEnabledForLocalFiles initial=true, getter=isJavaEnabledForLocalFiles 319 320 fontRenderingMode type=FontRenderingMode, initial=FontRenderingMode::Normal 321 322 preferMIMETypeForImages initial=false 323 324 forcePendingWebGLPolicy initial=false, getter=isForcePendingWebGLPolicy 325 326 mediaKeysStorageDirectory type=String, conditional=LEGACY_ENCRYPTED_MEDIA 327 mediaDeviceIdentifierStorageDirectory 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. 331 needsAdobeFrameReloadingQuirk initial=false, getter=needsAcrobatFrameReloadingQuirk 332 333 touchEventEmulationEnabled initial=false, getter=isTouchEventEmulationEnabled, conditional=TOUCH_EVENTS -
trunk/Source/WebCore/platform/text/TextFlags.h
r217272 r222698 26 26 #pragma once 27 27 28 #include "FontRenderingMode.h" 29 28 30 namespace WebCore { 29 31 … … 31 33 32 34 enum FontSmoothingMode { AutoSmoothing, NoSmoothing, Antialiased, SubpixelAntialiased }; 33 34 // This setting is used to provide ways of switching between multiple rendering modes that may have different35 // metrics. It is used to switch between CG and GDI text on Windows.36 enum class FontRenderingMode { Normal, Alternate };37 35 38 36 enum FontOrientation { Horizontal, Vertical };
Note: See TracChangeset
for help on using the changeset viewer.