1/*
2 * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT.
3 *
4 * Copyright (C) 2017 Apple Inc. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
17 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
19 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
25 * THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include "config.h"
29#include "Settings.h"
30
31#include "Page.h"
32#include "SettingsDefaultValues.h"
33
34namespace WebCore {
35
36Ref<Settings> Settings::create(Page* page)
37{
38 return adoptRef(*new Settings(page));
39}
40
41Settings::Settings(Page* page)
42 : SettingsBase(page)
43 , m_backForwardCacheExpirationInterval(1800)
44 , m_clipboardAccessPolicy(ClipboardAccessPolicy::RequiresUserGesture)
45 , m_defaultFixedFontSize(13)
46 , m_defaultFontSize(16)
47 , m_defaultTextEncodingName()
48 , m_defaultVideoPosterURL()
49 , m_deviceHeight(0)
50 , m_deviceWidth(0)
51 , m_editableLinkBehavior(EditableLinkDefaultBehavior)
52 , m_editingBehaviorType(editingBehaviorTypeForPlatform())
53 , m_fontLoadTimingOverride(FontLoadTimingOverride::None)
54 , m_fontRenderingMode(FontRenderingMode::Normal)
55 , m_forcedColorsAreInvertedAccessibilityValue(defaultForcedColorsAreInvertedAccessibilityValue)
56 , m_forcedDisplayIsMonochromeAccessibilityValue(defaultForcedDisplayIsMonochromeAccessibilityValue)
57 , m_forcedPrefersReducedMotionAccessibilityValue(defaultForcedPrefersReducedMotionAccessibilityValue)
58 , m_frameFlattening(FrameFlattening::Disabled)
59 , m_ftpDirectoryTemplatePath()
60 , m_incrementalRenderingSuppressionTimeoutInSeconds(defaultIncrementalRenderingSuppressionTimeoutInSeconds)
61 , m_javaScriptRuntimeFlags()
62 , m_layoutFallbackWidth(980)
63 , m_layoutViewportHeightExpansionFactor(0)
64 , m_localStorageDatabasePath()
65 , m_maxParseDuration(-1)
66 , m_maximumAccelerated2dCanvasSize(5120*2880)
67 , m_maximumHTMLParserDOMTreeDepth(defaultMaximumHTMLParserDOMTreeDepth)
68 , m_maximumPlugInSnapshotAttempts(20)
69 , m_mediaKeysStorageDirectory()
70 , m_mediaTypeOverride("screen")
71 , m_minimumAccelerated2dCanvasSize(257*256)
72 , m_minimumFontSize(0)
73 , m_minimumLogicalFontSize(0)
74 , m_passwordEchoDurationInSeconds(1)
75 , m_pdfImageCachingPolicy(PDFImageCachingDefault)
76 , m_sessionStorageQuota(StorageMap::noQuota)
77 , m_storageBlockingPolicy(SecurityOrigin::AllowAllStorage)
78 , m_systemLayoutDirection(TextDirection::LTR)
79 , m_textDirectionSubmenuInclusionBehavior(TextDirectionSubmenuAutomaticallyIncluded)
80 , m_timeWithoutMouseMovementBeforeHidingControls(3_s)
81 , m_userInterfaceDirectionPolicy(UserInterfaceDirectionPolicy::Content)
82 , m_userStyleSheetLocation()
83 , m_validationMessageTimerMagnification(50)
84 , m_visibleDebugOverlayRegions(0)
85#if ENABLE(DATA_DETECTION)
86 , m_dataDetectorTypes(DataDetectorTypeNone)
87#endif
88#if ENABLE(MEDIA_SOURCE)
89 , m_maximumSourceBufferSize(318767104)
90#endif
91#if ENABLE(MEDIA_STREAM)
92 , m_mediaDeviceIdentifierStorageDirectory()
93#endif
94#if ENABLE(TEXT_AUTOSIZING)
95 , m_minimumZoomFontSize(defaultMinimumZoomFontSize())
96 , m_textAutosizingWindowSizeOverride()
97#endif
98 , m_CSSOMViewScrollingAPIEnabled(false)
99 , m_DOMPasteAllowed(false)
100 , m_HTTPSUpgradeEnabled(false)
101 , m_accelerated2dCanvasEnabled(false)
102 , m_acceleratedCompositedAnimationsEnabled(true)
103 , m_acceleratedCompositingEnabled(true)
104 , m_acceleratedCompositingForFixedPositionEnabled(defaultAcceleratedCompositingForFixedPositionEnabled)
105 , m_acceleratedDrawingEnabled(false)
106 , m_acceleratedFiltersEnabled(false)
107 , m_adClickAttributionEnabled(false)
108 , m_aggressiveTileRetentionEnabled(false)
109 , m_allowContentSecurityPolicySourceStarToMatchAnyProtocol(false)
110 , m_allowCrossOriginSubresourcesToAskForCredentials(false)
111 , m_allowDisplayOfInsecureContent(false)
112 , m_allowFileAccessFromFileURLs(true)
113 , m_allowMediaContentTypesRequiringHardwareSupportAsFallback(false)
114 , m_allowMultiElementImplicitSubmission(false)
115 , m_allowRunningOfInsecureContent(false)
116 , m_allowSettingAnyXHRHeaderFromFileURLs(false)
117 , m_allowUniversalAccessFromFileURLs(true)
118 , m_allowViewportShrinkToFitContent(true)
119 , m_allowsInlineMediaPlayback(defaultAllowsInlineMediaPlayback)
120 , m_allowsInlineMediaPlaybackAfterFullscreen(true)
121 , m_allowsPictureInPictureMediaPlayback(defaultAllowsPictureInPictureMediaPlayback)
122 , m_alwaysUseAcceleratedOverflowScroll(false)
123 , m_animatedImageAsyncDecodingEnabled(true)
124 , m_appleMailPaginationQuirkEnabled(false)
125 , m_asyncFrameScrollingEnabled(false)
126 , m_asyncOverflowScrollingEnabled(false)
127 , m_asynchronousSpellCheckingEnabled(false)
128 , m_audioPlaybackRequiresUserGesture(defaultAudioPlaybackRequiresUserGesture)
129 , m_authorAndUserStylesEnabled(true)
130 , m_autoscrollForDragAndDropEnabled(false)
131 , m_autostartOriginPlugInSnapshottingEnabled(true)
132 , m_backgroundShouldExtendBeyondPage(false)
133 , m_backspaceKeyNavigationEnabled(true)
134 , m_beaconAPIEnabled(false)
135 , m_blockingOfSmallPluginsEnabled(true)
136 , m_canvasUsesAcceleratedDrawing(false)
137 , m_caretBrowsingEnabled(false)
138 , m_clientCoordinatesRelativeToLayoutViewport(false)
139 , m_colorFilterEnabled(false)
140 , m_constantPropertiesEnabled(false)
141 , m_contentChangeObserverEnabled(defaultContentChangeObserverEnabled())
142 , m_contentDispositionAttachmentSandboxEnabled(false)
143 , m_cookieEnabled(true)
144 , m_coreMathMLEnabled(false)
145 , m_crossOriginCheckInGetMatchedCSSRulesDisabled(false)
146 , m_deferredCSSParserEnabled(false)
147 , m_delegatesPageScaling(false)
148 , m_developerExtrasEnabled(false)
149 , m_diagnosticLoggingEnabled(false)
150 , m_disableScreenSizeOverride(false)
151 , m_displayListDrawingEnabled(false)
152 , m_dnsPrefetchingEnabled(false)
153 , m_domPasteAccessRequestsEnabled(false)
154 , m_domTimersThrottlingEnabled(true)
155 , m_downloadableBinaryFontsEnabled(defaultDownloadableBinaryFontsEnabled())
156 , m_editableImagesEnabled(false)
157 , m_enableInheritURIQueryComponent(false)
158 , m_enforceCSSMIMETypeInNoQuirksMode(true)
159 , m_experimentalNotificationsEnabled(false)
160 , m_fixedBackgroundsPaintRelativeToDocument(defaultFixedBackgroundsPaintRelativeToDocument)
161 , m_fixedElementsLayoutRelativeToFrame(false)
162 , m_fontFallbackPrefersPictographs(false)
163 , m_forceCompositingMode(false)
164 , m_forceFTPDirectoryListings(false)
165 , m_forcePendingWebGLPolicy(false)
166 , m_forceSoftwareWebGLRendering(false)
167 , m_forceUpdateScrollbarsOnMainThreadForPerformanceTesting(false)
168 , m_forceWebGLUsesLowPower(false)
169 , m_geolocationFloorLevelEnabled(true)
170 , m_hiddenPageCSSAnimationSuspensionEnabled(false)
171 , m_hiddenPageDOMTimerThrottlingAutoIncreases(false)
172 , m_hiddenPageDOMTimerThrottlingEnabled(false)
173 , m_httpEquivEnabled(true)
174 , m_hyperlinkAuditingEnabled(false)
175 , m_iceCandidateFilteringEnabled(true)
176 , m_imageSubsamplingEnabled(defaultImageSubsamplingEnabled)
177 , m_imagesEnabled(true)
178 , m_incompleteImageBorderEnabled(false)
179 , m_inlineMediaPlaybackRequiresPlaysInlineAttribute(defaultInlineMediaPlaybackRequiresPlaysInlineAttribute)
180 , m_inputEventsEnabled(true)
181 , m_interactiveFormValidationEnabled(false)
182 , m_invisibleAutoplayNotPermitted(false)
183 , m_javaEnabled(false)
184 , m_javaEnabledForLocalFiles(true)
185 , m_javaScriptCanAccessClipboard(false)
186 , m_javaScriptCanOpenWindowsAutomatically(false)
187 , m_langAttributeAwareFormControlUIEnabled(false)
188 , m_largeImageAsyncDecodingEnabled(true)
189 , m_linkPreconnectEnabled(false)
190 , m_loadDeferringEnabled(true)
191 , m_loadsImagesAutomatically(false)
192 , m_loadsSiteIconsIgnoringImageLoadingSetting(false)
193 , m_localFileContentSniffingEnabled(false)
194 , m_localStorageEnabled(false)
195 , m_logsPageMessagesToSystemConsoleEnabled(false)
196 , m_mainContentUserGestureOverrideEnabled(false)
197 , m_mediaCapabilitiesEnabled(false)
198 , m_mediaCapabilitiesExtensionsEnabled(false)
199 , m_mediaControlsScaleWithPageZoom(defaultMediaControlsScaleWithPageZoom)
200 , m_mediaDataLoadsAutomatically(defaultMediaDataLoadsAutomatically)
201 , m_mediaEnabled(defaultMediaEnabled)
202 , m_mediaPreloadingEnabled(false)
203 , m_mediaUserGestureInheritsFromDocument(false)
204 , m_needsAdobeFrameReloadingQuirk(false)
205 , m_needsFrameNameFallbackToIdQuirk(false)
206 , m_needsIsLoadingInAPISenseQuirk(false)
207 , m_needsKeyboardEventDisambiguationQuirks(false)
208 , m_needsSiteSpecificQuirks(false)
209 , m_needsStorageAccessFromFileURLsQuirk(true)
210 , m_notificationsEnabled(true)
211 , m_offlineWebApplicationCacheEnabled(false)
212 , m_pageCacheSupportsPlugins(false)
213 , m_paginateDuringLayoutEnabled(false)
214 , m_passiveTouchListenersAsDefaultOnDocument(true)
215 , m_passwordEchoEnabled(false)
216 , m_plugInSnapshottingEnabled(false)
217 , m_pluginsEnabled(false)
218 , m_preferMIMETypeForImages(false)
219 , m_preventKeyboardDOMEventDispatch(false)
220 , m_primaryPlugInSnapshotDetectionEnabled(true)
221 , m_punchOutWhiteBackgroundsInDarkMode(false)
222 , m_quickTimePluginReplacementEnabled(defaultQuickTimePluginReplacementEnabled)
223 , m_repaintOutsideLayoutEnabled(false)
224 , m_requestAnimationFrameEnabled(true)
225 , m_requiresUserGestureToLoadVideo(defaultRequiresUserGestureToLoadVideo)
226 , m_resourceUsageOverlayVisible(false)
227 , m_scriptEnabled(false)
228 , m_scriptMarkupEnabled(true)
229 , m_scrollingCoordinatorEnabled(false)
230 , m_scrollingPerformanceLoggingEnabled(false)
231 , m_scrollingTreeIncludesFrames(defaultScrollingTreeIncludesFrames)
232 , m_selectTrailingWhitespaceEnabled(defaultSelectTrailingWhitespaceEnabled)
233 , m_selectionAcrossShadowBoundariesEnabled(true)
234 , m_selectionPaintingWithoutSelectionGapsEnabled(false)
235 , m_shouldAllowUserInstalledFonts(true)
236 , m_shouldConvertInvalidURLsToBlank(true)
237 , m_shouldConvertPositionStyleOnCopy(false)
238 , m_shouldDecidePolicyBeforeLoadingQuickLookPreview(false)
239 , m_shouldDeferAsynchronousScriptsUntilAfterDocumentLoad(false)
240 , m_shouldDispatchSyntheticMouseEventsWhenModifyingSelection(false)
241 , m_shouldIgnoreFontLoadCompletions(false)
242 , m_shouldIgnoreMetaViewport(false)
243 , m_shouldInjectUserScriptsInInitialEmptyDocument(false)
244 , m_shouldPrintBackgrounds(false)
245 , m_shouldRespectImageOrientation(defaultShouldRespectImageOrientation)
246 , m_shouldSuppressTextInputFromEditingDuringProvisionalNavigation(false)
247 , m_showDebugBorders(false)
248 , m_showRepaintCounter(false)
249 , m_showTiledScrollingIndicator(false)
250 , m_showsToolTipOverTruncatedText(false)
251 , m_showsURLsInToolTips(false)
252 , m_shrinksStandaloneImagesToFit(true)
253 , m_simpleLineLayoutDebugBordersEnabled(false)
254 , m_simpleLineLayoutEnabled(true)
255 , m_smartInsertDeleteEnabled(defaultSmartInsertDeleteEnabled)
256 , m_snapshotAllPlugIns(false)
257 , m_spatialNavigationEnabled(false)
258 , m_springTimingFunctionEnabled(false)
259 , m_standalone(false)
260 , m_storageAccessAPIEnabled(true)
261 , m_subpixelAntialiasedLayerTextEnabled(false)
262 , m_subpixelCSSOMElementMetricsEnabled(false)
263 , m_subresourceIntegrityEnabled(true)
264 , m_suppressesIncrementalRendering(false)
265 , m_syntheticEditingCommandsEnabled(true)
266 , m_telephoneNumberParsingEnabled(false)
267 , m_temporaryTileCohortRetentionEnabled(true)
268 , m_textAreasAreResizable(false)
269 , m_thirdPartyIframeRedirectBlockingEnabled(true)
270 , m_treatIPAddressAsDomain(false)
271 , m_treatsAnyTextCSSLinkAsStylesheet(false)
272 , m_unhandledPromiseRejectionToConsoleEnabled(true)
273 , m_unifiedTextCheckerEnabled(defaultUnifiedTextCheckerEnabled)
274 , m_useAnonymousModeWhenFetchingMaskImages(true)
275 , m_useGiantTiles(false)
276 , m_useImageDocumentForSubframePDF(false)
277 , m_useLegacyBackgroundSizeShorthandBehavior(false)
278 , m_useLegacyTextAlignPositionedElementBehavior(false)
279 , m_usePreHTML5ParserQuirks(false)
280 , m_usesEncodingDetector(false)
281 , m_usesPageCache(false)
282 , m_videoPlaybackRequiresUserGesture(defaultVideoPlaybackRequiresUserGesture)
283 , m_viewportFitEnabled(false)
284 , m_visualViewportAPIEnabled(false)
285 , m_visualViewportEnabled(true)
286 , m_wantsBalancedSetDefersLoadingBehavior(false)
287 , m_webAudioEnabled(false)
288 , m_webGLEnabled(false)
289 , m_webGLErrorsToConsoleEnabled(true)
290 , m_webSecurityEnabled(true)
291 , m_webkitImageReadyEventEnabled(false)
292 , m_windowFocusRestricted(true)
293 , m_xssAuditorEnabled(false)
294 , m_youTubeFlashPluginReplacementEnabled(defaultYouTubeFlashPluginReplacementEnabled)
295#if ENABLE(APPLE_PAY)
296 , m_applePayCapabilityDisclosureAllowed(true)
297 , m_applePayEnabled(defaultApplePayEnabled)
298#endif
299#if ENABLE(APPLE_PAY_REMOTE_UI)
300 , m_applePayRemoteUIEnabled(true)
301#endif
302#if ENABLE(DEVICE_ORIENTATION)
303 , m_deviceOrientationEventEnabled(true)
304 , m_deviceOrientationPermissionAPIEnabled(false)
305#endif
306#if ENABLE(FULLSCREEN_API)
307 , m_fullScreenEnabled(false)
308#endif
309#if ENABLE(MEDIA_SOURCE)
310 , m_mediaSourceEnabled(platformDefaultMediaSourceEnabled())
311 , m_sourceBufferChangeTypeEnabled(true)
312#endif
313#if ENABLE(MEDIA_STREAM)
314 , m_mediaCaptureRequiresSecureConnection(true)
315 , m_mockCaptureDevicesEnabled(false)
316#endif
317#if ENABLE(OVERFLOW_SCROLLING_TOUCH)
318 , m_legacyOverflowScrollingTouchEnabled(true)
319#endif
320#if ENABLE(PAYMENT_REQUEST)
321 , m_paymentRequestEnabled(false)
322#endif
323#if ENABLE(RESIZE_OBSERVER)
324 , m_resizeObserverEnabled(false)
325#endif
326#if ENABLE(RUBBER_BANDING)
327 , m_rubberBandingForSubScrollableRegionsEnabled(true)
328#endif
329#if ENABLE(SERVICE_CONTROLS)
330 , m_imageControlsEnabled(false)
331 , m_serviceControlsEnabled(false)
332#endif
333#if ENABLE(SMOOTH_SCROLLING)
334 , m_scrollAnimatorEnabled(true)
335#endif
336#if ENABLE(TEXT_AUTOSIZING)
337 , m_shouldEnableTextAutosizingBoost(false)
338 , m_textAutosizingEnabled(defaultTextAutosizingEnabled())
339 , m_textAutosizingUsesIdempotentMode(false)
340#endif
341#if ENABLE(TOUCH_EVENTS)
342 , m_touchEventEmulationEnabled(false)
343#endif
344#if ENABLE(VIDEO)
345 , m_videoQualityIncludesDisplayCompositingEnabled(false)
346#endif
347#if ENABLE(VIDEO_TRACK)
348 , m_shouldDisplayCaptions(false)
349 , m_shouldDisplaySubtitles(false)
350 , m_shouldDisplayTextDescriptions(false)
351#endif
352#if ENABLE(WEB_ARCHIVE)
353 , m_webArchiveDebugModeEnabled(false)
354#endif
355#if ENABLE(WIRELESS_PLAYBACK_TARGET)
356 , m_allowsAirPlayForMediaPlayback(true)
357#endif
358{
359}
360
361Settings::~Settings()
362{
363}
364
365bool Settings::authorAndUserStylesEnabled() const
366{
367 if (m_authorAndUserStylesEnabledInspectorOverride)
368 return m_authorAndUserStylesEnabledInspectorOverride.value();
369 return m_authorAndUserStylesEnabled;
370}
371
372bool Settings::iceCandidateFilteringEnabled() const
373{
374 if (m_iceCandidateFilteringEnabledInspectorOverride)
375 return m_iceCandidateFilteringEnabledInspectorOverride.value();
376 return m_iceCandidateFilteringEnabled;
377}
378
379bool Settings::areImagesEnabled() const
380{
381 if (m_imagesEnabledInspectorOverride)
382 return m_imagesEnabledInspectorOverride.value();
383 return m_imagesEnabled;
384}
385
386bool Settings::needsSiteSpecificQuirks() const
387{
388 if (m_needsSiteSpecificQuirksInspectorOverride)
389 return m_needsSiteSpecificQuirksInspectorOverride.value();
390 return m_needsSiteSpecificQuirks;
391}
392
393bool Settings::isScriptEnabled() const
394{
395 if (m_scriptEnabledInspectorOverride)
396 return m_scriptEnabledInspectorOverride.value();
397 return m_scriptEnabled;
398}
399
400bool Settings::webSecurityEnabled() const
401{
402 if (m_webSecurityEnabledInspectorOverride)
403 return m_webSecurityEnabledInspectorOverride.value();
404 return m_webSecurityEnabled;
405}
406
407void Settings::setAcceleratedCompositedAnimationsEnabled(bool acceleratedCompositedAnimationsEnabled)
408{
409 if (m_acceleratedCompositedAnimationsEnabled == acceleratedCompositedAnimationsEnabled)
410 return;
411 m_acceleratedCompositedAnimationsEnabled = acceleratedCompositedAnimationsEnabled;
412 setNeedsRecalcStyleInAllFrames();
413}
414
415void Settings::setAcceleratedCompositingEnabled(bool acceleratedCompositingEnabled)
416{
417 if (m_acceleratedCompositingEnabled == acceleratedCompositingEnabled)
418 return;
419 m_acceleratedCompositingEnabled = acceleratedCompositingEnabled;
420 setNeedsRecalcStyleInAllFrames();
421}
422
423void Settings::setAsyncFrameScrollingEnabled(bool asyncFrameScrollingEnabled)
424{
425 if (m_asyncFrameScrollingEnabled == asyncFrameScrollingEnabled)
426 return;
427 m_asyncFrameScrollingEnabled = asyncFrameScrollingEnabled;
428 setNeedsRelayoutAllFrames();
429}
430
431void Settings::setAsyncOverflowScrollingEnabled(bool asyncOverflowScrollingEnabled)
432{
433 if (m_asyncOverflowScrollingEnabled == asyncOverflowScrollingEnabled)
434 return;
435 m_asyncOverflowScrollingEnabled = asyncOverflowScrollingEnabled;
436 setNeedsRelayoutAllFrames();
437}
438
439void Settings::setAuthorAndUserStylesEnabled(bool authorAndUserStylesEnabled)
440{
441 if (m_authorAndUserStylesEnabled == authorAndUserStylesEnabled)
442 return;
443 m_authorAndUserStylesEnabled = authorAndUserStylesEnabled;
444 setNeedsRecalcStyleInAllFrames();
445}
446
447void Settings::setBackgroundShouldExtendBeyondPage(bool backgroundShouldExtendBeyondPage)
448{
449 if (m_backgroundShouldExtendBeyondPage == backgroundShouldExtendBeyondPage)
450 return;
451 m_backgroundShouldExtendBeyondPage = backgroundShouldExtendBeyondPage;
452 backgroundShouldExtendBeyondPageChanged();
453}
454
455void Settings::setClientCoordinatesRelativeToLayoutViewport(bool clientCoordinatesRelativeToLayoutViewport)
456{
457 if (m_clientCoordinatesRelativeToLayoutViewport == clientCoordinatesRelativeToLayoutViewport)
458 return;
459 m_clientCoordinatesRelativeToLayoutViewport = clientCoordinatesRelativeToLayoutViewport;
460 setNeedsRecalcStyleInAllFrames();
461}
462
463void Settings::setColorFilterEnabled(bool colorFilterEnabled)
464{
465 if (m_colorFilterEnabled == colorFilterEnabled)
466 return;
467 m_colorFilterEnabled = colorFilterEnabled;
468 setNeedsRecalcStyleInAllFrames();
469}
470
471void Settings::setCoreMathMLEnabled(bool coreMathMLEnabled)
472{
473 if (m_coreMathMLEnabled == coreMathMLEnabled)
474 return;
475 m_coreMathMLEnabled = coreMathMLEnabled;
476 setNeedsRecalcStyleInAllFrames();
477}
478
479void Settings::setDefaultFixedFontSize(int defaultFixedFontSize)
480{
481 if (m_defaultFixedFontSize == defaultFixedFontSize)
482 return;
483 m_defaultFixedFontSize = defaultFixedFontSize;
484 setNeedsRecalcStyleInAllFrames();
485}
486
487void Settings::setDefaultFontSize(int defaultFontSize)
488{
489 if (m_defaultFontSize == defaultFontSize)
490 return;
491 m_defaultFontSize = defaultFontSize;
492 setNeedsRecalcStyleInAllFrames();
493}
494
495void Settings::setDNSPrefetchingEnabled(bool dnsPrefetchingEnabled)
496{
497 if (m_dnsPrefetchingEnabled == dnsPrefetchingEnabled)
498 return;
499 m_dnsPrefetchingEnabled = dnsPrefetchingEnabled;
500 dnsPrefetchingEnabledChanged();
501}
502
503void Settings::setFontFallbackPrefersPictographs(bool fontFallbackPrefersPictographs)
504{
505 if (m_fontFallbackPrefersPictographs == fontFallbackPrefersPictographs)
506 return;
507 m_fontFallbackPrefersPictographs = fontFallbackPrefersPictographs;
508 setNeedsRecalcStyleInAllFrames();
509}
510
511void Settings::setFrameFlattening(FrameFlattening frameFlattening)
512{
513 if (m_frameFlattening == frameFlattening)
514 return;
515 m_frameFlattening = frameFlattening;
516 setNeedsRelayoutAllFrames();
517}
518
519void Settings::setHiddenPageCSSAnimationSuspensionEnabled(bool hiddenPageCSSAnimationSuspensionEnabled)
520{
521 if (m_hiddenPageCSSAnimationSuspensionEnabled == hiddenPageCSSAnimationSuspensionEnabled)
522 return;
523 m_hiddenPageCSSAnimationSuspensionEnabled = hiddenPageCSSAnimationSuspensionEnabled;
524 hiddenPageCSSAnimationSuspensionEnabledChanged();
525}
526
527void Settings::setHiddenPageDOMTimerThrottlingAutoIncreases(bool hiddenPageDOMTimerThrottlingAutoIncreases)
528{
529 if (m_hiddenPageDOMTimerThrottlingAutoIncreases == hiddenPageDOMTimerThrottlingAutoIncreases)
530 return;
531 m_hiddenPageDOMTimerThrottlingAutoIncreases = hiddenPageDOMTimerThrottlingAutoIncreases;
532 hiddenPageDOMTimerThrottlingStateChanged();
533}
534
535void Settings::setHiddenPageDOMTimerThrottlingEnabled(bool hiddenPageDOMTimerThrottlingEnabled)
536{
537 if (m_hiddenPageDOMTimerThrottlingEnabled == hiddenPageDOMTimerThrottlingEnabled)
538 return;
539 m_hiddenPageDOMTimerThrottlingEnabled = hiddenPageDOMTimerThrottlingEnabled;
540 hiddenPageDOMTimerThrottlingStateChanged();
541}
542
543void Settings::setICECandidateFilteringEnabled(bool iceCandidateFilteringEnabled)
544{
545 if (m_iceCandidateFilteringEnabled == iceCandidateFilteringEnabled)
546 return;
547 m_iceCandidateFilteringEnabled = iceCandidateFilteringEnabled;
548 iceCandidateFilteringEnabledChanged();
549}
550
551void Settings::setImagesEnabled(bool imagesEnabled)
552{
553 if (m_imagesEnabled == imagesEnabled)
554 return;
555 m_imagesEnabled = imagesEnabled;
556 imagesEnabledChanged();
557}
558
559void Settings::setLayoutViewportHeightExpansionFactor(double layoutViewportHeightExpansionFactor)
560{
561 if (m_layoutViewportHeightExpansionFactor == layoutViewportHeightExpansionFactor)
562 return;
563 m_layoutViewportHeightExpansionFactor = layoutViewportHeightExpansionFactor;
564 setNeedsRecalcStyleInAllFrames();
565}
566
567void Settings::setLoadsImagesAutomatically(bool loadsImagesAutomatically)
568{
569 if (m_loadsImagesAutomatically == loadsImagesAutomatically)
570 return;
571 m_loadsImagesAutomatically = loadsImagesAutomatically;
572 imagesEnabledChanged();
573}
574
575void Settings::setMediaTypeOverride(const String& mediaTypeOverride)
576{
577 if (m_mediaTypeOverride == mediaTypeOverride)
578 return;
579 m_mediaTypeOverride = mediaTypeOverride;
580 mediaTypeOverrideChanged();
581}
582
583void Settings::setMinimumFontSize(int minimumFontSize)
584{
585 if (m_minimumFontSize == minimumFontSize)
586 return;
587 m_minimumFontSize = minimumFontSize;
588 setNeedsRecalcStyleInAllFrames();
589}
590
591void Settings::setMinimumLogicalFontSize(int minimumLogicalFontSize)
592{
593 if (m_minimumLogicalFontSize == minimumLogicalFontSize)
594 return;
595 m_minimumLogicalFontSize = minimumLogicalFontSize;
596 setNeedsRecalcStyleInAllFrames();
597}
598
599void Settings::setPluginsEnabled(bool pluginsEnabled)
600{
601 if (m_pluginsEnabled == pluginsEnabled)
602 return;
603 m_pluginsEnabled = pluginsEnabled;
604 pluginsEnabledChanged();
605}
606
607void Settings::setPunchOutWhiteBackgroundsInDarkMode(bool punchOutWhiteBackgroundsInDarkMode)
608{
609 if (m_punchOutWhiteBackgroundsInDarkMode == punchOutWhiteBackgroundsInDarkMode)
610 return;
611 m_punchOutWhiteBackgroundsInDarkMode = punchOutWhiteBackgroundsInDarkMode;
612 setNeedsRecalcStyleInAllFrames();
613}
614
615void Settings::setResourceUsageOverlayVisible(bool resourceUsageOverlayVisible)
616{
617 if (m_resourceUsageOverlayVisible == resourceUsageOverlayVisible)
618 return;
619 m_resourceUsageOverlayVisible = resourceUsageOverlayVisible;
620 resourceUsageOverlayVisibleChanged();
621}
622
623void Settings::setScrollingPerformanceLoggingEnabled(bool scrollingPerformanceLoggingEnabled)
624{
625 if (m_scrollingPerformanceLoggingEnabled == scrollingPerformanceLoggingEnabled)
626 return;
627 m_scrollingPerformanceLoggingEnabled = scrollingPerformanceLoggingEnabled;
628 scrollingPerformanceLoggingEnabledChanged();
629}
630
631void Settings::setShouldAllowUserInstalledFonts(bool shouldAllowUserInstalledFonts)
632{
633 if (m_shouldAllowUserInstalledFonts == shouldAllowUserInstalledFonts)
634 return;
635 m_shouldAllowUserInstalledFonts = shouldAllowUserInstalledFonts;
636 setNeedsRecalcStyleInAllFrames();
637}
638
639void Settings::setShowDebugBorders(bool showDebugBorders)
640{
641 if (m_showDebugBorders == showDebugBorders)
642 return;
643 m_showDebugBorders = showDebugBorders;
644 setNeedsRecalcStyleInAllFrames();
645}
646
647void Settings::setShowRepaintCounter(bool showRepaintCounter)
648{
649 if (m_showRepaintCounter == showRepaintCounter)
650 return;
651 m_showRepaintCounter = showRepaintCounter;
652 setNeedsRecalcStyleInAllFrames();
653}
654
655void Settings::setSimpleLineLayoutDebugBordersEnabled(bool simpleLineLayoutDebugBordersEnabled)
656{
657 if (m_simpleLineLayoutDebugBordersEnabled == simpleLineLayoutDebugBordersEnabled)
658 return;
659 m_simpleLineLayoutDebugBordersEnabled = simpleLineLayoutDebugBordersEnabled;
660 setNeedsRecalcStyleInAllFrames();
661}
662
663void Settings::setSimpleLineLayoutEnabled(bool simpleLineLayoutEnabled)
664{
665 if (m_simpleLineLayoutEnabled == simpleLineLayoutEnabled)
666 return;
667 m_simpleLineLayoutEnabled = simpleLineLayoutEnabled;
668 setNeedsRecalcStyleInAllFrames();
669}
670
671void Settings::setStorageBlockingPolicy(SecurityOrigin::StorageBlockingPolicy storageBlockingPolicy)
672{
673 if (m_storageBlockingPolicy == storageBlockingPolicy)
674 return;
675 m_storageBlockingPolicy = storageBlockingPolicy;
676 storageBlockingPolicyChanged();
677}
678
679void Settings::setSubpixelAntialiasedLayerTextEnabled(bool subpixelAntialiasedLayerTextEnabled)
680{
681 if (m_subpixelAntialiasedLayerTextEnabled == subpixelAntialiasedLayerTextEnabled)
682 return;
683 m_subpixelAntialiasedLayerTextEnabled = subpixelAntialiasedLayerTextEnabled;
684 setNeedsRecalcStyleInAllFrames();
685}
686
687void Settings::setTextAreasAreResizable(bool textAreasAreResizable)
688{
689 if (m_textAreasAreResizable == textAreasAreResizable)
690 return;
691 m_textAreasAreResizable = textAreasAreResizable;
692 setNeedsRecalcStyleInAllFrames();
693}
694
695void Settings::setUserStyleSheetLocation(const URL& userStyleSheetLocation)
696{
697 if (m_userStyleSheetLocation == userStyleSheetLocation)
698 return;
699 m_userStyleSheetLocation = userStyleSheetLocation;
700 userStyleSheetLocationChanged();
701}
702
703void Settings::setUsesPageCache(bool usesPageCache)
704{
705 if (m_usesPageCache == usesPageCache)
706 return;
707 m_usesPageCache = usesPageCache;
708 usesPageCacheChanged();
709}
710
711void Settings::setVisualViewportEnabled(bool visualViewportEnabled)
712{
713 if (m_visualViewportEnabled == visualViewportEnabled)
714 return;
715 m_visualViewportEnabled = visualViewportEnabled;
716 setNeedsRecalcStyleInAllFrames();
717}
718
719#if ENABLE(MEDIA_STREAM)
720bool Settings::mediaCaptureRequiresSecureConnection() const
721{
722 if (m_mediaCaptureRequiresSecureConnectionInspectorOverride)
723 return m_mediaCaptureRequiresSecureConnectionInspectorOverride.value();
724 return m_mediaCaptureRequiresSecureConnection;
725}
726bool Settings::mockCaptureDevicesEnabled() const
727{
728 if (m_mockCaptureDevicesEnabledInspectorOverride)
729 return m_mockCaptureDevicesEnabledInspectorOverride.value();
730 return m_mockCaptureDevicesEnabled;
731}
732void Settings::setMockCaptureDevicesEnabled(bool mockCaptureDevicesEnabled)
733{
734 if (m_mockCaptureDevicesEnabled == mockCaptureDevicesEnabled)
735 return;
736 m_mockCaptureDevicesEnabled = mockCaptureDevicesEnabled;
737 mockCaptureDevicesEnabledChanged();
738}
739#endif
740
741#if ENABLE(OVERFLOW_SCROLLING_TOUCH)
742void Settings::setLegacyOverflowScrollingTouchEnabled(bool legacyOverflowScrollingTouchEnabled)
743{
744 if (m_legacyOverflowScrollingTouchEnabled == legacyOverflowScrollingTouchEnabled)
745 return;
746 m_legacyOverflowScrollingTouchEnabled = legacyOverflowScrollingTouchEnabled;
747 setNeedsRelayoutAllFrames();
748}
749#endif
750
751#if ENABLE(TEXT_AUTOSIZING)
752void Settings::setShouldEnableTextAutosizingBoost(bool shouldEnableTextAutosizingBoost)
753{
754 if (m_shouldEnableTextAutosizingBoost == shouldEnableTextAutosizingBoost)
755 return;
756 m_shouldEnableTextAutosizingBoost = shouldEnableTextAutosizingBoost;
757 shouldEnableTextAutosizingBoostChanged();
758}
759void Settings::setTextAutosizingEnabled(bool textAutosizingEnabled)
760{
761 if (m_textAutosizingEnabled == textAutosizingEnabled)
762 return;
763 m_textAutosizingEnabled = textAutosizingEnabled;
764 setNeedsRecalcStyleInAllFrames();
765}
766void Settings::setTextAutosizingUsesIdempotentMode(bool textAutosizingUsesIdempotentMode)
767{
768 if (m_textAutosizingUsesIdempotentMode == textAutosizingUsesIdempotentMode)
769 return;
770 m_textAutosizingUsesIdempotentMode = textAutosizingUsesIdempotentMode;
771 setNeedsRecalcStyleInAllFrames();
772}
773void Settings::setTextAutosizingWindowSizeOverride(IntSize textAutosizingWindowSizeOverride)
774{
775 if (m_textAutosizingWindowSizeOverride == textAutosizingWindowSizeOverride)
776 return;
777 m_textAutosizingWindowSizeOverride = textAutosizingWindowSizeOverride;
778 setNeedsRecalcStyleInAllFrames();
779}
780#endif
781
782void Settings::setAuthorAndUserStylesEnabledInspectorOverride(Optional<bool> authorAndUserStylesEnabledInspectorOverride)
783{
784 if (m_authorAndUserStylesEnabledInspectorOverride == authorAndUserStylesEnabledInspectorOverride)
785 return;
786 m_authorAndUserStylesEnabledInspectorOverride = authorAndUserStylesEnabledInspectorOverride;
787 setNeedsRecalcStyleInAllFrames();
788}
789
790void Settings::setICECandidateFilteringEnabledInspectorOverride(Optional<bool> iceCandidateFilteringEnabledInspectorOverride)
791{
792 if (m_iceCandidateFilteringEnabledInspectorOverride == iceCandidateFilteringEnabledInspectorOverride)
793 return;
794 m_iceCandidateFilteringEnabledInspectorOverride = iceCandidateFilteringEnabledInspectorOverride;
795 iceCandidateFilteringEnabledChanged();
796}
797
798void Settings::setImagesEnabledInspectorOverride(Optional<bool> imagesEnabledInspectorOverride)
799{
800 if (m_imagesEnabledInspectorOverride == imagesEnabledInspectorOverride)
801 return;
802 m_imagesEnabledInspectorOverride = imagesEnabledInspectorOverride;
803 imagesEnabledChanged();
804}
805
806void Settings::setMockCaptureDevicesEnabledInspectorOverride(Optional<bool> mockCaptureDevicesEnabledInspectorOverride)
807{
808 if (m_mockCaptureDevicesEnabledInspectorOverride == mockCaptureDevicesEnabledInspectorOverride)
809 return;
810 m_mockCaptureDevicesEnabledInspectorOverride = mockCaptureDevicesEnabledInspectorOverride;
811#if ENABLE(MEDIA_STREAM)
812 mockCaptureDevicesEnabledChanged();
813#endif
814}
815
816}
817