[Cocoa] Add SPI to disallow user-installed fonts
[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 needsStorageAccessFromFileURLsQuirk:
103   initial: true
104 javaScriptCanOpenWindowsAutomatically:
105   initial: false
106 javaScriptCanAccessClipboard:
107   initial: false
108 shouldPrintBackgrounds:
109   initial: false
110 usesDashboardBackwardCompatibilityMode:
111   initial: false
112   conditional: DASHBOARD_SUPPORT
113 clipboardAccessPolicy:
114   type: ClipboardAccessPolicy
115   initial: ClipboardAccessPolicy::RequiresUserGesture
116
117 textAreasAreResizable:
118   initial: false
119   onChange: setNeedsRecalcStyleInAllFrames
120 authorAndUserStylesEnabled:
121   initial: true
122   onChange: setNeedsRecalcStyleInAllFrames
123 userStyleSheetLocation:
124   type: URL
125   onChange: userStyleSheetLocationChanged
126 acceleratedCompositingEnabled:
127   initial: true
128   onChange: setNeedsRecalcStyleInAllFrames
129 acceleratedCompositedAnimationsEnabled:
130   initial: true
131   onChange: setNeedsRecalcStyleInAllFrames
132 showDebugBorders:
133   initial: false
134   onChange: setNeedsRecalcStyleInAllFrames
135 showRepaintCounter:
136   initial: false
137   onChange: setNeedsRecalcStyleInAllFrames
138 visibleDebugOverlayRegions:
139   type: DebugOverlayRegions
140   initial: 0
141 showTiledScrollingIndicator:
142   initial: false
143 resourceUsageOverlayVisible:
144   initial: false
145   onChange: resourceUsageOverlayVisibleChanged
146   condition: RESOURCE_USAGE
147
148 # This is a quirk we are pro-actively applying to old applications. It changes keyboard event dispatching,
149 # making keyIdentifier available on keypress events, making charCode available on keydown/keyup events,
150 # and getting keypress dispatched in more cases.
151 needsKeyboardEventDisambiguationQuirks:
152   initial: false
153
154 treatsAnyTextCSSLinkAsStylesheet:
155   initial: false
156 shrinksStandaloneImagesToFit:
157   initial: true
158 pageCacheSupportsPlugins:
159   initial: false
160 showsURLsInToolTips:
161   initial: false
162 showsToolTipOverTruncatedText:
163   initial: false
164 forceFTPDirectoryListings:
165   initial: false
166 developerExtrasEnabled:
167   initial: false
168 scriptMarkupEnabled:
169   initial: true
170 needsSiteSpecificQuirks:
171   initial: false
172 domTimersThrottlingEnabled:
173   initial: true
174 webArchiveDebugModeEnabled:
175   initial: false
176   conditional: WEB_ARCHIVE
177 localFileContentSniffingEnabled:
178   initial: false
179 offlineWebApplicationCacheEnabled:
180   initial: false
181 enforceCSSMIMETypeInNoQuirksMode:
182   initial: true
183 usesEncodingDetector:
184   initial: false
185 allowScriptsToCloseWindows:
186   initial: false
187 canvasUsesAcceleratedDrawing:
188   initial: false
189 acceleratedDrawingEnabled:
190   initial: false
191 displayListDrawingEnabled:
192   initial: false
193 acceleratedFiltersEnabled:
194   initial: false
195 useLegacyTextAlignPositionedElementBehavior:
196   initial: false
197 javaScriptRuntimeFlags:
198   type: JSC::RuntimeFlags
199
200 # FIXME: This should really be disabled by default as it makes platforms that don't support the feature download files
201 # they can't use by. Leaving enabled for now to not change existing behavior.
202 downloadableBinaryFontsEnabled:
203   initial: true
204
205 xssAuditorEnabled:
206   initial: false
207 acceleratedCompositingForFixedPositionEnabled:
208   initial: defaultAcceleratedCompositingForFixedPositionEnabled
209 acceleratedCompositingForOverflowScrollEnabled:
210   initial: false
211 rubberBandingForSubScrollableRegionsEnabled:
212   initial: true
213   conditional: RUBBER_BANDING
214
215 experimentalNotificationsEnabled:
216   initial: false
217 webGLEnabled:
218   initial: false
219 webGLErrorsToConsoleEnabled:
220   initial: true
221 forceSoftwareWebGLRendering:
222   initial: false
223 forceWebGLUsesLowPower:
224   initial: false
225 accelerated2dCanvasEnabled:
226   initial: false
227 loadDeferringEnabled:
228   initial: true
229 webAudioEnabled:
230   initial: false
231 paginateDuringLayoutEnabled:
232   initial: false
233 fullScreenEnabled:
234   initial: false
235   conditional: FULLSCREEN_API
236 asynchronousSpellCheckingEnabled:
237   initial: false
238
239 # This feature requires an implementation of ValidationMessageClient.
240 interactiveFormValidationEnabled:
241   initial: false
242
243 usePreHTML5ParserQuirks:
244   initial: false
245 hyperlinkAuditingEnabled:
246   initial: false
247 crossOriginCheckInGetMatchedCSSRulesDisabled:
248   initial: false
249 forceCompositingMode:
250   initial: false
251 shouldInjectUserScriptsInInitialEmptyDocument:
252   initial: false
253 fixedElementsLayoutRelativeToFrame:
254   initial: false
255 allowDisplayOfInsecureContent:
256   initial: false
257 allowRunningOfInsecureContent:
258   initial: false
259 requiresUserGestureToLoadVideo:
260   initial: defaultRequiresUserGestureToLoadVideo
261 videoPlaybackRequiresUserGesture:
262   initial: defaultVideoPlaybackRequiresUserGesture
263 audioPlaybackRequiresUserGesture:
264   initial: defaultAudioPlaybackRequiresUserGesture
265 mainContentUserGestureOverrideEnabled:
266   initial: false
267 mediaUserGestureInheritsFromDocument:
268   initial: false
269 allowsInlineMediaPlayback:
270   initial: defaultAllowsInlineMediaPlayback
271 allowsInlineMediaPlaybackAfterFullscreen:
272   initial: true
273 inlineMediaPlaybackRequiresPlaysInlineAttribute:
274   initial: defaultInlineMediaPlaybackRequiresPlaysInlineAttribute
275 allowsPictureInPictureMediaPlayback:
276   initial: defaultAllowsPictureInPictureMediaPlayback
277 mediaControlsScaleWithPageZoom:
278   initial: defaultMediaControlsScaleWithPageZoom
279 invisibleAutoplayNotPermitted:
280   initial: false
281 passwordEchoEnabled:
282   initial: false
283 suppressesIncrementalRendering:
284   initial: false
285 incrementalRenderingSuppressionTimeoutInSeconds:
286   type: double
287   initial: defaultIncrementalRenderingSuppressionTimeoutInSeconds
288 backspaceKeyNavigationEnabled:
289   initial: true
290 shouldDisplaySubtitles:
291   initial: false
292   conditional: VIDEO_TRACK
293 shouldDisplayCaptions:
294   initial: false
295   conditional: VIDEO_TRACK
296 shouldDisplayTextDescriptions:
297   initial: false
298   conditional: VIDEO_TRACK
299 scrollingCoordinatorEnabled:
300   initial: false
301 scrollingTreeIncludesFrames:
302   initial: defaultScrollingTreeIncludesFrames
303 scrollAnimatorEnabled:
304   initial: true
305   conditional: SMOOTH_SCROLLING
306 forceUpdateScrollbarsOnMainThreadForPerformanceTesting:
307   initial: false
308 notificationsEnabled:
309   initial: true
310
311 # Some apps needs isLoadingInAPISense to account for active subresource loaders.
312 needsIsLoadingInAPISenseQuirk:
313   initial: false
314
315 shouldRespectImageOrientation:
316   initial: defaultShouldRespectImageOrientation
317 imageSubsamplingEnabled:
318   initial: defaultImageSubsamplingEnabled
319 wantsBalancedSetDefersLoadingBehavior:
320   initial: false
321 requestAnimationFrameEnabled:
322   initial: true
323
324 cookieEnabled:
325   initial: true
326 mediaEnabled:
327   initial: true
328 DOMPasteAllowed:
329   initial: false
330
331 # When enabled, window.blur() does not change focus, and
332 # window.focus() only changes focus when invoked from the context that
333 # created the window.
334 windowFocusRestricted:
335   initial: true
336
337 diagnosticLoggingEnabled:
338   initial: false
339 delegatesPageScaling:
340   initial: false
341 plugInSnapshottingEnabled:
342   initial: false
343 snapshotAllPlugIns:
344   initial: false
345 autostartOriginPlugInSnapshottingEnabled:
346   initial: true
347 primaryPlugInSnapshotDetectionEnabled:
348   initial: true
349 maximumPlugInSnapshotAttempts:
350   type: unsigned
351   initial: 20
352 frameFlattening:
353   type: FrameFlattening
354   initial: FrameFlattening::Disabled
355 asyncFrameScrollingEnabled:
356   initial: false
357
358 webSecurityEnabled:
359   initial: true
360 spatialNavigationEnabled:
361   initial: false
362
363 autoscrollForDragAndDropEnabled:
364   initial: false
365
366 unifiedTextCheckerEnabled:
367   initial: defaultUnifiedTextCheckerEnabled
368
369 logsPageMessagesToSystemConsoleEnabled:
370   initial: false
371
372 backForwardCacheExpirationInterval:
373   type: double
374   initial: 1800
375
376 # Some apps could have a default video poster if it is not set.
377 defaultVideoPosterURL:
378   type: String
379
380 smartInsertDeleteEnabled:
381   initial: defaultSmartInsertDeleteEnabled
382 selectTrailingWhitespaceEnabled:
383   initial: defaultSelectTrailingWhitespaceEnabled
384
385 useLegacyBackgroundSizeShorthandBehavior:
386   initial: false
387 fixedBackgroundsPaintRelativeToDocument:
388   initial: defaultFixedBackgroundsPaintRelativeToDocument
389
390 textAutosizingEnabled:
391   initial: defaultTextAutosizingEnabled()
392   onChange: setNeedsRecalcStyleInAllFrames
393   conditional: TEXT_AUTOSIZING
394 textAutosizingWindowSizeOverride:
395   type: IntSize
396   onChange: setNeedsRecalcStyleInAllFrames
397   conditional: TEXT_AUTOSIZING
398 minimumZoomFontSize:
399   type: float
400   initial: defaultMinimumZoomFontSize()
401   conditional: TEXT_AUTOSIZING
402
403 subpixelAntialiasedLayerTextEnabled:
404   initial: false
405   onChange: setNeedsRecalcStyleInAllFrames
406 simpleLineLayoutEnabled:
407   initial: true
408   onChange: setNeedsRecalcStyleInAllFrames
409 simpleLineLayoutDebugBordersEnabled:
410   initial: false
411   onChange: setNeedsRecalcStyleInAllFrames
412
413 subpixelCSSOMElementMetricsEnabled:
414   initial: false
415
416 useGiantTiles:
417   initial: false
418
419 mediaSourceEnabled:
420   initial: true
421   conditional: MEDIA_SOURCE
422
423 # FIXME: Rename to allowMultiElementImplicitFormSubmission once we upstream the iOS changes to WebView.mm.
424 allowMultiElementImplicitSubmission:
425   initial: false
426
427 allowsAirPlayForMediaPlayback:
428   initial: true
429   conditional: WIRELESS_PLAYBACK_TARGET
430
431 shouldConvertPositionStyleOnCopy:
432   initial: false
433
434 maxParseDuration:
435   type: double
436   initial: -1
437 standalone:
438   initial: false
439 telephoneNumberParsingEnabled:
440   initial: false
441 mediaDataLoadsAutomatically:
442   initial: defaultMediaDataLoadsAutomatically
443 alwaysUseAcceleratedOverflowScroll:
444   initial: false
445 imageControlsEnabled:
446   initial: false
447   conditional: SERVICE_CONTROLS
448
449 enableInheritURIQueryComponent:
450   initial: false
451
452 aggressiveTileRetentionEnabled:
453   initial: false
454 temporaryTileCohortRetentionEnabled:
455   initial: true
456
457 useImageDocumentForSubframePDF:
458   initial: false
459 dataDetectorTypes:
460   type: DataDetectorTypes
461   initial: DataDetectorTypeNone
462   conditional: DATA_DETECTION
463
464 # Allow SourceBuffers to store up to 304MB each, enough for approximately five minutes
465 # of 1080p video and stereo audio.
466 maximumSourceBufferSize:
467   type: int
468   initial: 318767104
469   conditional: MEDIA_SOURCE
470
471 serviceControlsEnabled:
472   initial: false
473   conditional: SERVICE_CONTROLS
474
475 appleMailPaginationQuirkEnabled:
476   initial: false
477
478 deferredCSSParserEnabled:
479   initial: false
480
481 repaintOutsideLayoutEnabled:
482   initial: false
483
484 httpEquivEnabled:
485   initial: true
486
487 # Some ports (e.g. iOS) might choose to display attachments inline, regardless of whether the response includes the
488 # HTTP header "Content-Disposition: attachment". This setting enables a sandbox around these attachments. The sandbox
489 # enforces all frame sandbox flags (see enum SandboxFlag in SecurityContext.h), and also disables <meta http-equiv>
490 # processing and subframe loading.
491 contentDispositionAttachmentSandboxEnabled:
492   initial: false
493
494 userInterfaceDirectionPolicy:
495   type: UserInterfaceDirectionPolicy
496   initial: UserInterfaceDirectionPolicy::Content
497 systemLayoutDirection:
498   type: TextDirection
499   initial: LTR
500
501 allowContentSecurityPolicySourceStarToMatchAnyProtocol:
502   initial: false
503
504 selectionPaintingWithoutSelectionGapsEnabled:
505   initial: false
506
507 shouldConvertInvalidURLsToBlank:
508   initial: true
509
510 springTimingFunctionEnabled:
511   initial: false
512 conicGradientsEnabled:
513   initial: false
514
515 treatIPAddressAsDomain:
516   initial: false
517
518 mediaPreloadingEnabled:
519   initial: false
520
521 # Runtime-enabled features
522 visualViewportEnabled:
523   initial: false
524   onChange: setNeedsRecalcStyleInAllFrames
525
526 visualViewportAPIEnabled:
527   initial: false
528
529 inputEventsEnabled:
530   initial: true
531
532 quickTimePluginReplacementEnabled:
533   initial: defaultQuickTimePluginReplacementEnabled
534 youTubeFlashPluginReplacementEnabled:
535   initial: defaultYouTubeFlashPluginReplacementEnabled
536
537 forcedColorsAreInvertedAccessibilityValue:
538   type: ForcedAccessibilityValue
539   initial: defaultForcedColorsAreInvertedAccessibilityValue
540 forcedDisplayIsMonochromeAccessibilityValue:
541   type: ForcedAccessibilityValue
542   initial: defaultForcedDisplayIsMonochromeAccessibilityValue
543 forcedPrefersReducedMotionAccessibilityValue:
544   type: ForcedAccessibilityValue
545   initial: defaultForcedPrefersReducedMotionAccessibilityValue
546
547 largeImageAsyncDecodingEnabled:
548   initial: true
549 animatedImageAsyncDecodingEnabled:
550   initial: true
551 webkitImageReadyEventEnabled:
552   initial: false
553
554 shouldSuppressTextInputFromEditingDuringProvisionalNavigation:
555   initial: false
556
557 langAttributeAwareFormControlUIEnabled:
558   initial: false
559
560 subresourceIntegrityEnabled:
561   initial: true
562
563 linkPreconnectEnabled:
564   initial: false
565
566 beaconAPIEnabled:
567   initial: false
568
569 geolocationFloorLevelEnabled:
570   initial: true
571
572 constantPropertiesEnabled:
573   initial: false
574
575 viewportFitEnabled:
576   initial: false
577
578 allowMediaContentTypesRequiringHardwareSupportAsFallback:
579   initial: false
580
581 storageAccessAPIEnabled:
582   initial: false
583
584 timeWithoutMouseMovementBeforeHidingControls:
585   type: Seconds
586   initial: 3_s
587
588 fontFallbackPrefersPictographs:
589   initial: false
590   onChange: setNeedsRecalcStyleInAllFrames
591
592 fontLoadTimingOverride:
593   type: FontLoadTimingOverride
594   initial: FontLoadTimingOverride::None
595 shouldIgnoreFontLoadCompletions:
596   initial: false
597
598 paymentRequestEnabled:
599   initial: false
600   conditional: PAYMENT_REQUEST
601 applePayEnabled:
602   initial: false
603   conditional: APPLE_PAY
604 applePayCapabilityDisclosureAllowed:
605   initial: true
606   conditional: APPLE_PAY
607
608 javaEnabled:
609   initial: false
610   getter: isJavaEnabled
611 javaEnabledForLocalFiles:
612   initial: true
613   getter: isJavaEnabledForLocalFiles
614
615 # Unlike the imagesEnabled setting, this only suppresses the network load of
616 # the image URL. A cached image will still be rendered if requested.
617 loadsImagesAutomatically:
618   initial: false
619   onChange: imagesEnabledChanged
620 imagesEnabled:
621   initial: true
622   getter: areImagesEnabled
623   onChange: imagesEnabledChanged
624 scriptEnabled:
625   initial: false
626   getter: isScriptEnabled
627   onChange: scriptEnabledChanged
628 pluginsEnabled:
629   initial: false
630   getter: arePluginsEnabled
631   onChange: pluginsEnabledChanged
632
633 usesPageCache:
634   initial: false
635   onChange: usesPageCacheChanged
636
637 dnsPrefetchingEnabled:
638   initial: false
639   onChange: dnsPrefetchingEnabledChanged
640
641 backgroundShouldExtendBeyondPage:
642   initial: false
643   onChange: backgroundShouldExtendBeyondPageChanged
644
645 scrollingPerformanceLoggingEnabled:
646   initial: false
647   onChange: scrollingPerformanceLoggingEnabledChanged
648
649 hiddenPageDOMTimerThrottlingEnabled:
650   initial: false
651   onChange: hiddenPageDOMTimerThrottlingStateChanged
652 hiddenPageDOMTimerThrottlingAutoIncreases:
653   initial: false
654   onChange: hiddenPageDOMTimerThrottlingStateChanged
655 hiddenPageCSSAnimationSuspensionEnabled:
656   initial: false
657   onChange: hiddenPageCSSAnimationSuspensionEnabledChanged
658
659 storageBlockingPolicy:
660   type: SecurityOrigin::StorageBlockingPolicy
661   initial: SecurityOrigin::AllowAllStorage
662   onChange: storageBlockingPolicyChanged
663
664 shouldDisallowUserInstalledFonts:
665   initial: false
666   onChange: setNeedsRecalcStyleInAllFrames
667
668 # Only set by Layout Tests.
669 mediaTypeOverride:
670   type: String
671   initial: '"screen"'
672   onChange: mediaTypeOverrideChanged
673
674
675 fontRenderingMode:
676   type: FontRenderingMode
677   initial: FontRenderingMode::Normal
678
679 preferMIMETypeForImages:
680   initial: false
681
682 forcePendingWebGLPolicy:
683   initial: false
684   getter: isForcePendingWebGLPolicy
685
686 mediaKeysStorageDirectory:
687   type: String
688
689 mediaDeviceIdentifierStorageDirectory:
690   type: String
691   conditional: MEDIA_STREAM
692
693 # FIXME: This quirk is needed because of Radar 4674537 and 5211271. We need to phase it out once Adobe
694 # can fix the bug from their end.
695 needsAdobeFrameReloadingQuirk:
696   initial: false
697   getter: needsAcrobatFrameReloadingQuirk
698
699 touchEventEmulationEnabled:
700   initial: false
701   getter: isTouchEventEmulationEnabled
702   conditional: TOUCH_EVENTS