3fa1034715bfd1202a3a7a01991d1df3e5ec3c66
[WebKit-https.git] / Source / WebCore / page / Settings.yaml
1 # FIXME: Add support for global settings.
2 # FIXME: Add support for custom getters/setters.
3
4 defaultTextEncodingName:
5   type: String
6 ftpDirectoryTemplatePath:
7   type: String
8 localStorageDatabasePath:
9   type: String
10 editableLinkBehavior:
11   type: EditableLinkBehavior
12   initial: EditableLinkDefaultBehavior
13 textDirectionSubmenuInclusionBehavior:
14   type: TextDirectionSubmenuInclusionBehavior
15   initial: TextDirectionSubmenuAutomaticallyIncluded
16 pdfImageCachingPolicy:
17   type: PDFImageCachingPolicy
18   initial: PDFImageCachingDefault
19 passwordEchoDurationInSeconds:
20   type: double
21   initial: 1
22
23 # Sets the magnification value for validation message timer.  If the
24 # magnification value is N, a validation message disappears automatically after
25 # <message length> * N / 1000 seconds.  If N is equal to or less than 0, a
26 # validation message doesn't disappears automaticaly.
27 validationMessageTimerMagnification:
28   type: int
29   initial: 50
30
31 # Number of pixels below which 2D canvas is rendered in software
32 # even if hardware acceleration is enabled.
33 # Hardware acceleration is useful for large canvases where it can avoid the
34 # pixel bandwidth between the CPU and GPU. But GPU acceleration comes at
35 # a price - extra back-buffer and texture copy. Small canvases are also
36 # widely used for stylized fonts. Anti-aliasing text in hardware at that
37 # scale is generally slower. So below a certain size it is better to
38 # draw canvas in software.
39 minimumAccelerated2dCanvasSize:
40   type: int
41   initial: 257*256
42
43 maximumAccelerated2dCanvasSize:
44   type: unsigned
45   initial: 5120*2880
46
47 layoutFallbackWidth:
48   type: int
49   initial: 980
50 deviceWidth:
51   type: int
52   initial: 0
53 deviceHeight:
54   type: int
55   initial: 0
56
57 # Allow clients concerned with memory consumption to set a quota on session storage
58 # since the memory used won't be released until the Page is destroyed.
59 sessionStorageQuota:
60   type: unsigned
61   initial: StorageMap::noQuota
62
63 minimumFontSize:
64   type: int
65   initial: 0
66   onChange: setNeedsRecalcStyleInAllFrames
67 minimumLogicalFontSize:
68   type: int
69   initial: 0
70   onChange: setNeedsRecalcStyleInAllFrames
71 defaultFontSize:
72   type: int
73   initial: 16
74   onChange: setNeedsRecalcStyleInAllFrames
75 defaultFixedFontSize:
76   type: int
77   initial: 0
78   onChange: setNeedsRecalcStyleInAllFrames
79
80 editingBehaviorType:
81   type: EditingBehaviorType
82   initial: editingBehaviorTypeForPlatform()
83 maximumHTMLParserDOMTreeDepth:
84   type: unsigned
85   initial: defaultMaximumHTMLParserDOMTreeDepth
86
87 # This setting only affects site icon image loading if loadsImagesAutomatically setting is false and this setting is true.
88 # All other permutations still heed loadsImagesAutomatically setting.
89 loadsSiteIconsIgnoringImageLoadingSetting:
90   initial: false
91
92 caretBrowsingEnabled:
93   initial: false
94 preventKeyboardDOMEventDispatch:
95   initial: false
96 localStorageEnabled:
97   initial: false
98 allowUniversalAccessFromFileURLs:
99   initial: true
100 allowFileAccessFromFileURLs:
101   initial: true
102 allowSettingAnyXHRHeaderFromFileURLs:
103   initial: false
104 allowCrossOriginSubresourcesToAskForCredentials:
105   initial: false
106 needsStorageAccessFromFileURLsQuirk:
107   initial: true
108 javaScriptCanOpenWindowsAutomatically:
109   initial: false
110 javaScriptCanAccessClipboard:
111   initial: false
112 shouldPrintBackgrounds:
113   initial: false
114 usesDashboardBackwardCompatibilityMode:
115   initial: false
116   conditional: DASHBOARD_SUPPORT
117 clipboardAccessPolicy:
118   type: ClipboardAccessPolicy
119   initial: ClipboardAccessPolicy::RequiresUserGesture
120
121 textAreasAreResizable:
122   initial: false
123   onChange: setNeedsRecalcStyleInAllFrames
124 authorAndUserStylesEnabled:
125   initial: true
126   onChange: setNeedsRecalcStyleInAllFrames
127 userStyleSheetLocation:
128   type: URL
129   onChange: userStyleSheetLocationChanged
130 acceleratedCompositingEnabled:
131   initial: true
132   onChange: setNeedsRecalcStyleInAllFrames
133 acceleratedCompositedAnimationsEnabled:
134   initial: true
135   onChange: setNeedsRecalcStyleInAllFrames
136 showDebugBorders:
137   initial: false
138   onChange: setNeedsRecalcStyleInAllFrames
139 showRepaintCounter:
140   initial: false
141   onChange: setNeedsRecalcStyleInAllFrames
142 visibleDebugOverlayRegions:
143   type: DebugOverlayRegions
144   initial: 0
145 showTiledScrollingIndicator:
146   initial: false
147 resourceUsageOverlayVisible:
148   initial: false
149   onChange: resourceUsageOverlayVisibleChanged
150   condition: RESOURCE_USAGE
151
152 # This is a quirk we are pro-actively applying to old applications. It changes keyboard event dispatching,
153 # making keyIdentifier available on keypress events, making charCode available on keydown/keyup events,
154 # and getting keypress dispatched in more cases.
155 needsKeyboardEventDisambiguationQuirks:
156   initial: false
157
158 treatsAnyTextCSSLinkAsStylesheet:
159   initial: false
160 shrinksStandaloneImagesToFit:
161   initial: true
162 pageCacheSupportsPlugins:
163   initial: false
164 showsURLsInToolTips:
165   initial: false
166 showsToolTipOverTruncatedText:
167   initial: false
168 forceFTPDirectoryListings:
169   initial: false
170 developerExtrasEnabled:
171   initial: false
172 scriptMarkupEnabled:
173   initial: true
174 needsSiteSpecificQuirks:
175   initial: false
176 domTimersThrottlingEnabled:
177   initial: true
178 webArchiveDebugModeEnabled:
179   initial: false
180   conditional: WEB_ARCHIVE
181 localFileContentSniffingEnabled:
182   initial: false
183 offlineWebApplicationCacheEnabled:
184   initial: false
185 enforceCSSMIMETypeInNoQuirksMode:
186   initial: true
187 usesEncodingDetector:
188   initial: false
189 allowScriptsToCloseWindows:
190   initial: false
191 canvasUsesAcceleratedDrawing:
192   initial: false
193 acceleratedDrawingEnabled:
194   initial: false
195 displayListDrawingEnabled:
196   initial: false
197 acceleratedFiltersEnabled:
198   initial: false
199 useLegacyTextAlignPositionedElementBehavior:
200   initial: false
201 javaScriptRuntimeFlags:
202   type: JSC::RuntimeFlags
203
204 # FIXME: This should really be disabled by default as it makes platforms that don't support the feature download files
205 # they can't use by. Leaving enabled for now to not change existing behavior.
206 downloadableBinaryFontsEnabled:
207   initial: defaultDownloadableBinaryFontsEnabled()
208
209 xssAuditorEnabled:
210   initial: false
211 acceleratedCompositingForFixedPositionEnabled:
212   initial: defaultAcceleratedCompositingForFixedPositionEnabled
213 acceleratedCompositingForOverflowScrollEnabled:
214   initial: false
215 rubberBandingForSubScrollableRegionsEnabled:
216   initial: true
217   conditional: RUBBER_BANDING
218
219 experimentalNotificationsEnabled:
220   initial: false
221 webGLEnabled:
222   initial: false
223 webGLErrorsToConsoleEnabled:
224   initial: true
225 forceSoftwareWebGLRendering:
226   initial: false
227 forceWebGLUsesLowPower:
228   initial: false
229 accelerated2dCanvasEnabled:
230   initial: false
231 loadDeferringEnabled:
232   initial: true
233 webAudioEnabled:
234   initial: false
235 paginateDuringLayoutEnabled:
236   initial: false
237 fullScreenEnabled:
238   initial: false
239   conditional: FULLSCREEN_API
240 asynchronousSpellCheckingEnabled:
241   initial: false
242
243 # This feature requires an implementation of ValidationMessageClient.
244 interactiveFormValidationEnabled:
245   initial: false
246
247 usePreHTML5ParserQuirks:
248   initial: false
249 hyperlinkAuditingEnabled:
250   initial: false
251 crossOriginCheckInGetMatchedCSSRulesDisabled:
252   initial: false
253 forceCompositingMode:
254   initial: false
255 shouldInjectUserScriptsInInitialEmptyDocument:
256   initial: false
257 fixedElementsLayoutRelativeToFrame:
258   initial: false
259 allowDisplayOfInsecureContent:
260   initial: false
261 allowRunningOfInsecureContent:
262   initial: false
263 requiresUserGestureToLoadVideo:
264   initial: defaultRequiresUserGestureToLoadVideo
265 videoPlaybackRequiresUserGesture:
266   initial: defaultVideoPlaybackRequiresUserGesture
267 audioPlaybackRequiresUserGesture:
268   initial: defaultAudioPlaybackRequiresUserGesture
269 mainContentUserGestureOverrideEnabled:
270   initial: false
271 mediaUserGestureInheritsFromDocument:
272   initial: false
273 allowsInlineMediaPlayback:
274   initial: defaultAllowsInlineMediaPlayback
275 allowsInlineMediaPlaybackAfterFullscreen:
276   initial: true
277 inlineMediaPlaybackRequiresPlaysInlineAttribute:
278   initial: defaultInlineMediaPlaybackRequiresPlaysInlineAttribute
279 allowsPictureInPictureMediaPlayback:
280   initial: defaultAllowsPictureInPictureMediaPlayback
281 mediaControlsScaleWithPageZoom:
282   initial: defaultMediaControlsScaleWithPageZoom
283 invisibleAutoplayNotPermitted:
284   initial: false
285 passwordEchoEnabled:
286   initial: false
287 suppressesIncrementalRendering:
288   initial: false
289 incrementalRenderingSuppressionTimeoutInSeconds:
290   type: double
291   initial: defaultIncrementalRenderingSuppressionTimeoutInSeconds
292 backspaceKeyNavigationEnabled:
293   initial: true
294 shouldDisplaySubtitles:
295   initial: false
296   conditional: VIDEO_TRACK
297 shouldDisplayCaptions:
298   initial: false
299   conditional: VIDEO_TRACK
300 shouldDisplayTextDescriptions:
301   initial: false
302   conditional: VIDEO_TRACK
303 scrollingCoordinatorEnabled:
304   initial: false
305 scrollingTreeIncludesFrames:
306   initial: defaultScrollingTreeIncludesFrames
307 scrollAnimatorEnabled:
308   initial: true
309   conditional: SMOOTH_SCROLLING
310 forceUpdateScrollbarsOnMainThreadForPerformanceTesting:
311   initial: false
312 notificationsEnabled:
313   initial: true
314
315 # Some apps needs isLoadingInAPISense to account for active subresource loaders.
316 needsIsLoadingInAPISenseQuirk:
317   initial: false
318
319 shouldRespectImageOrientation:
320   initial: defaultShouldRespectImageOrientation
321 imageSubsamplingEnabled:
322   initial: defaultImageSubsamplingEnabled
323 wantsBalancedSetDefersLoadingBehavior:
324   initial: false
325 requestAnimationFrameEnabled:
326   initial: true
327
328 cookieEnabled:
329   initial: true
330 mediaEnabled:
331   initial: defaultMediaEnabled
332 DOMPasteAllowed:
333   initial: false
334
335 # When enabled, window.blur() does not change focus, and
336 # window.focus() only changes focus when invoked from the context that
337 # created the window.
338 windowFocusRestricted:
339   initial: true
340
341 diagnosticLoggingEnabled:
342   initial: false
343 delegatesPageScaling:
344   initial: false
345 plugInSnapshottingEnabled:
346   initial: false
347 snapshotAllPlugIns:
348   initial: false
349 autostartOriginPlugInSnapshottingEnabled:
350   initial: true
351 primaryPlugInSnapshotDetectionEnabled:
352   initial: true
353 maximumPlugInSnapshotAttempts:
354   type: unsigned
355   initial: 20
356 frameFlattening:
357   type: FrameFlattening
358   initial: FrameFlattening::Disabled
359   onChange: setNeedsRelayoutAllFrames
360 asyncFrameScrollingEnabled:
361   initial: false
362   onChange: setNeedsRelayoutAllFrames
363
364 webSecurityEnabled:
365   initial: true
366 spatialNavigationEnabled:
367   initial: false
368
369 autoscrollForDragAndDropEnabled:
370   initial: false
371
372 unifiedTextCheckerEnabled:
373   initial: defaultUnifiedTextCheckerEnabled
374
375 logsPageMessagesToSystemConsoleEnabled:
376   initial: false
377
378 backForwardCacheExpirationInterval:
379   type: double
380   initial: 1800
381
382 # Some apps could have a default video poster if it is not set.
383 defaultVideoPosterURL:
384   type: String
385
386 smartInsertDeleteEnabled:
387   initial: defaultSmartInsertDeleteEnabled
388 selectTrailingWhitespaceEnabled:
389   initial: defaultSelectTrailingWhitespaceEnabled
390
391 useLegacyBackgroundSizeShorthandBehavior:
392   initial: false
393 fixedBackgroundsPaintRelativeToDocument:
394   initial: defaultFixedBackgroundsPaintRelativeToDocument
395
396 textAutosizingEnabled:
397   initial: defaultTextAutosizingEnabled()
398   onChange: setNeedsRecalcStyleInAllFrames
399   conditional: TEXT_AUTOSIZING
400 textAutosizingWindowSizeOverride:
401   type: IntSize
402   onChange: setNeedsRecalcStyleInAllFrames
403   conditional: TEXT_AUTOSIZING
404 minimumZoomFontSize:
405   type: float
406   initial: defaultMinimumZoomFontSize()
407   conditional: TEXT_AUTOSIZING
408
409 subpixelAntialiasedLayerTextEnabled:
410   initial: false
411   onChange: setNeedsRecalcStyleInAllFrames
412 simpleLineLayoutEnabled:
413   initial: true
414   onChange: setNeedsRecalcStyleInAllFrames
415 simpleLineLayoutDebugBordersEnabled:
416   initial: false
417   onChange: setNeedsRecalcStyleInAllFrames
418
419 subpixelCSSOMElementMetricsEnabled:
420   initial: false
421
422 useGiantTiles:
423   initial: false
424
425 mediaSourceEnabled:
426   initial: true
427   conditional: MEDIA_SOURCE
428
429 # FIXME: Rename to allowMultiElementImplicitFormSubmission once we upstream the iOS changes to WebView.mm.
430 allowMultiElementImplicitSubmission:
431   initial: false
432
433 allowsAirPlayForMediaPlayback:
434   initial: true
435   conditional: WIRELESS_PLAYBACK_TARGET
436
437 shouldConvertPositionStyleOnCopy:
438   initial: false
439
440 maxParseDuration:
441   type: double
442   initial: -1
443 standalone:
444   initial: false
445 telephoneNumberParsingEnabled:
446   initial: false
447 mediaDataLoadsAutomatically:
448   initial: defaultMediaDataLoadsAutomatically
449 alwaysUseAcceleratedOverflowScroll:
450   initial: false
451 imageControlsEnabled:
452   initial: false
453   conditional: SERVICE_CONTROLS
454
455 enableInheritURIQueryComponent:
456   initial: false
457
458 aggressiveTileRetentionEnabled:
459   initial: false
460 temporaryTileCohortRetentionEnabled:
461   initial: true
462
463 useImageDocumentForSubframePDF:
464   initial: false
465 dataDetectorTypes:
466   type: DataDetectorTypes
467   initial: DataDetectorTypeNone
468   conditional: DATA_DETECTION
469
470 # Allow SourceBuffers to store up to 304MB each, enough for approximately five minutes
471 # of 1080p video and stereo audio.
472 maximumSourceBufferSize:
473   type: int
474   initial: 318767104
475   conditional: MEDIA_SOURCE
476
477 serviceControlsEnabled:
478   initial: false
479   conditional: SERVICE_CONTROLS
480
481 appleMailPaginationQuirkEnabled:
482   initial: false
483
484 appleMailLinesClampEnabled:
485   initial: false
486
487 deferredCSSParserEnabled:
488   initial: false
489
490 repaintOutsideLayoutEnabled:
491   initial: false
492
493 httpEquivEnabled:
494   initial: true
495
496 # Some ports (e.g. iOS) might choose to display attachments inline, regardless of whether the response includes the
497 # HTTP header "Content-Disposition: attachment". This setting enables a sandbox around these attachments. The sandbox
498 # enforces all frame sandbox flags (see enum SandboxFlag in SecurityContext.h), and also disables <meta http-equiv>
499 # processing and subframe loading.
500 contentDispositionAttachmentSandboxEnabled:
501   initial: false
502
503 userInterfaceDirectionPolicy:
504   type: UserInterfaceDirectionPolicy
505   initial: UserInterfaceDirectionPolicy::Content
506 systemLayoutDirection:
507   type: TextDirection
508   initial: LTR
509
510 allowContentSecurityPolicySourceStarToMatchAnyProtocol:
511   initial: false
512
513 selectionPaintingWithoutSelectionGapsEnabled:
514   initial: false
515
516 shouldConvertInvalidURLsToBlank:
517   initial: true
518
519 springTimingFunctionEnabled:
520   initial: false
521 conicGradientsEnabled:
522   initial: false
523
524 treatIPAddressAsDomain:
525   initial: false
526
527 mediaPreloadingEnabled:
528   initial: false
529
530 # Runtime-enabled features
531 visualViewportEnabled:
532   initial: false
533   onChange: setNeedsRecalcStyleInAllFrames
534
535 visualViewportAPIEnabled:
536   initial: false
537
538 inputEventsEnabled:
539   initial: true
540
541 quickTimePluginReplacementEnabled:
542   initial: defaultQuickTimePluginReplacementEnabled
543 youTubeFlashPluginReplacementEnabled:
544   initial: defaultYouTubeFlashPluginReplacementEnabled
545
546 forcedColorsAreInvertedAccessibilityValue:
547   type: ForcedAccessibilityValue
548   initial: defaultForcedColorsAreInvertedAccessibilityValue
549 forcedDisplayIsMonochromeAccessibilityValue:
550   type: ForcedAccessibilityValue
551   initial: defaultForcedDisplayIsMonochromeAccessibilityValue
552 forcedPrefersReducedMotionAccessibilityValue:
553   type: ForcedAccessibilityValue
554   initial: defaultForcedPrefersReducedMotionAccessibilityValue
555
556 largeImageAsyncDecodingEnabled:
557   initial: true
558 animatedImageAsyncDecodingEnabled:
559   initial: true
560 webkitImageReadyEventEnabled:
561   initial: false
562
563 shouldSuppressTextInputFromEditingDuringProvisionalNavigation:
564   initial: false
565
566 langAttributeAwareFormControlUIEnabled:
567   initial: false
568
569 subresourceIntegrityEnabled:
570   initial: true
571
572 linkPreconnectEnabled:
573   initial: false
574
575 beaconAPIEnabled:
576   initial: false
577
578 geolocationFloorLevelEnabled:
579   initial: true
580
581 constantPropertiesEnabled:
582   initial: false
583
584 viewportFitEnabled:
585   initial: false
586
587 allowMediaContentTypesRequiringHardwareSupportAsFallback:
588   initial: false
589
590 storageAccessAPIEnabled:
591   initial: true
592
593 timeWithoutMouseMovementBeforeHidingControls:
594   type: Seconds
595   initial: 3_s
596
597 fontFallbackPrefersPictographs:
598   initial: false
599   onChange: setNeedsRecalcStyleInAllFrames
600
601 fontLoadTimingOverride:
602   type: FontLoadTimingOverride
603   initial: FontLoadTimingOverride::None
604 shouldIgnoreFontLoadCompletions:
605   initial: false
606
607 paymentRequestEnabled:
608   initial: false
609   conditional: PAYMENT_REQUEST
610 applePayEnabled:
611   initial: false
612   conditional: APPLE_PAY
613 applePayCapabilityDisclosureAllowed:
614   initial: true
615   conditional: APPLE_PAY
616
617 javaEnabled:
618   initial: false
619   getter: isJavaEnabled
620 javaEnabledForLocalFiles:
621   initial: true
622   getter: isJavaEnabledForLocalFiles
623
624 # Unlike the imagesEnabled setting, this only suppresses the network load of
625 # the image URL. A cached image will still be rendered if requested.
626 loadsImagesAutomatically:
627   initial: false
628   onChange: imagesEnabledChanged
629 imagesEnabled:
630   initial: true
631   getter: areImagesEnabled
632   onChange: imagesEnabledChanged
633 scriptEnabled:
634   initial: false
635   getter: isScriptEnabled
636   onChange: scriptEnabledChanged
637 pluginsEnabled:
638   initial: false
639   getter: arePluginsEnabled
640   onChange: pluginsEnabledChanged
641
642 usesPageCache:
643   initial: false
644   onChange: usesPageCacheChanged
645
646 dnsPrefetchingEnabled:
647   initial: false
648   onChange: dnsPrefetchingEnabledChanged
649
650 backgroundShouldExtendBeyondPage:
651   initial: false
652   onChange: backgroundShouldExtendBeyondPageChanged
653
654 scrollingPerformanceLoggingEnabled:
655   initial: false
656   onChange: scrollingPerformanceLoggingEnabledChanged
657
658 hiddenPageDOMTimerThrottlingEnabled:
659   initial: false
660   onChange: hiddenPageDOMTimerThrottlingStateChanged
661 hiddenPageDOMTimerThrottlingAutoIncreases:
662   initial: false
663   onChange: hiddenPageDOMTimerThrottlingStateChanged
664 hiddenPageCSSAnimationSuspensionEnabled:
665   initial: false
666   onChange: hiddenPageCSSAnimationSuspensionEnabledChanged
667
668 storageBlockingPolicy:
669   type: SecurityOrigin::StorageBlockingPolicy
670   initial: SecurityOrigin::AllowAllStorage
671   onChange: storageBlockingPolicyChanged
672
673 shouldAllowUserInstalledFonts:
674   initial: true
675   onChange: setNeedsRecalcStyleInAllFrames
676
677 # Only set by Layout Tests.
678 mediaTypeOverride:
679   type: String
680   initial: '"screen"'
681   onChange: mediaTypeOverrideChanged
682
683
684 fontRenderingMode:
685   type: FontRenderingMode
686   initial: FontRenderingMode::Normal
687
688 preferMIMETypeForImages:
689   initial: false
690
691 forcePendingWebGLPolicy:
692   initial: false
693   getter: isForcePendingWebGLPolicy
694
695 mediaKeysStorageDirectory:
696   type: String
697
698 mediaDeviceIdentifierStorageDirectory:
699   type: String
700   conditional: MEDIA_STREAM
701
702 # FIXME: This quirk is needed because of Radar 4674537 and 5211271. We need to phase it out once Adobe
703 # can fix the bug from their end.
704 needsAdobeFrameReloadingQuirk:
705   initial: false
706   getter: needsAcrobatFrameReloadingQuirk
707
708 passiveTouchListenersAsDefaultOnDocument:
709   initial: true
710
711 touchEventEmulationEnabled:
712   initial: false
713   getter: isTouchEventEmulationEnabled
714   conditional: TOUCH_EVENTS
715
716 oneLineTextMultiplierCoefficient:
717   type: float
718   initial: defaultOneLineTextMultiplierCoefficient()
719   conditional: TEXT_AUTOSIZING
720
721 multiLineTextMultiplierCoefficient:
722   type: float
723   initial: defaultMultiLineTextMultiplierCoefficient()
724   conditional: TEXT_AUTOSIZING
725
726 maxTextAutosizingScaleIncrease:
727   type: float
728   initial: defaultMaxTextAutosizingScaleIncrease()
729   conditional: TEXT_AUTOSIZING
730
731 mediaCapabilitiesEnabled:
732   initial: false
733
734 resourceLoadStatisticsDebugMode:
735   initial: false
736
737 clientCoordinatesRelativeToLayoutViewport:
738   initial: false
739   onChange: setNeedsRecalcStyleInAllFrames