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_allowsInlineMediaPlayback(defaultAllowsInlineMediaPlayback)
119 , m_allowsInlineMediaPlaybackAfterFullscreen(true)
120 , m_allowsPictureInPictureMediaPlayback(defaultAllowsPictureInPictureMediaPlayback)
121 , m_alwaysUseAcceleratedOverflowScroll(false)
122 , m_animatedImageAsyncDecodingEnabled(true)
123 , m_appleMailPaginationQuirkEnabled(false)
124 , m_asyncFrameScrollingEnabled(false)
125 , m_asyncOverflowScrollingEnabled(false)
126 , m_asynchronousSpellCheckingEnabled(false)
127 , m_audioPlaybackRequiresUserGesture(defaultAudioPlaybackRequiresUserGesture)
128 , m_authorAndUserStylesEnabled(true)
129 , m_autoscrollForDragAndDropEnabled(false)
130 , m_autostartOriginPlugInSnapshottingEnabled(true)
131 , m_backgroundShouldExtendBeyondPage(false)
132 , m_backspaceKeyNavigationEnabled(true)
133 , m_beaconAPIEnabled(false)
134 , m_blockingOfSmallPluginsEnabled(true)
135 , m_canvasUsesAcceleratedDrawing(false)
136 , m_caretBrowsingEnabled(false)
137 , m_clientCoordinatesRelativeToLayoutViewport(false)
138 , m_colorFilterEnabled(false)
139 , m_constantPropertiesEnabled(false)
140 , m_contentChangeObserverEnabled(defaultContentChangeObserverEnabled())
141 , m_contentDispositionAttachmentSandboxEnabled(false)
142 , m_cookieEnabled(true)
143 , m_coreMathMLEnabled(false)
144 , m_crossOriginCheckInGetMatchedCSSRulesDisabled(false)
145 , m_deferredCSSParserEnabled(false)
146 , m_delegatesPageScaling(false)
147 , m_developerExtrasEnabled(false)
148 , m_diagnosticLoggingEnabled(false)
149 , m_disableScreenSizeOverride(false)
150 , m_displayListDrawingEnabled(false)
151 , m_dnsPrefetchingEnabled(false)
152 , m_domPasteAccessRequestsEnabled(false)
153 , m_domTimersThrottlingEnabled(true)
154 , m_downloadableBinaryFontsEnabled(defaultDownloadableBinaryFontsEnabled())
155 , m_editableImagesEnabled(false)
156 , m_enableInheritURIQueryComponent(false)
157 , m_enforceCSSMIMETypeInNoQuirksMode(true)
158 , m_experimentalNotificationsEnabled(false)
159 , m_fixedBackgroundsPaintRelativeToDocument(defaultFixedBackgroundsPaintRelativeToDocument)
160 , m_fixedElementsLayoutRelativeToFrame(false)
161 , m_fontFallbackPrefersPictographs(false)
162 , m_forceCompositingMode(false)
163 , m_forceFTPDirectoryListings(false)
164 , m_forcePendingWebGLPolicy(false)
165 , m_forceSoftwareWebGLRendering(false)
166 , m_forceUpdateScrollbarsOnMainThreadForPerformanceTesting(false)
167 , m_forceWebGLUsesLowPower(false)
168 , m_geolocationFloorLevelEnabled(true)
169 , m_hiddenPageCSSAnimationSuspensionEnabled(false)
170 , m_hiddenPageDOMTimerThrottlingAutoIncreases(false)
171 , m_hiddenPageDOMTimerThrottlingEnabled(false)
172 , m_httpEquivEnabled(true)
173 , m_hyperlinkAuditingEnabled(false)
174 , m_iceCandidateFilteringEnabled(true)
175 , m_imageSubsamplingEnabled(defaultImageSubsamplingEnabled)
176 , m_imagesEnabled(true)
177 , m_incompleteImageBorderEnabled(false)
178 , m_inlineMediaPlaybackRequiresPlaysInlineAttribute(defaultInlineMediaPlaybackRequiresPlaysInlineAttribute)
179 , m_inputEventsEnabled(true)
180 , m_interactiveFormValidationEnabled(false)
181 , m_invisibleAutoplayNotPermitted(false)
182 , m_javaEnabled(false)
183 , m_javaEnabledForLocalFiles(true)
184 , m_javaScriptCanAccessClipboard(false)
185 , m_javaScriptCanOpenWindowsAutomatically(false)
186 , m_langAttributeAwareFormControlUIEnabled(false)
187 , m_largeImageAsyncDecodingEnabled(true)
188 , m_linkPreconnectEnabled(false)
189 , m_loadDeferringEnabled(true)
190 , m_loadsImagesAutomatically(false)
191 , m_loadsSiteIconsIgnoringImageLoadingSetting(false)
192 , m_localFileContentSniffingEnabled(false)
193 , m_localStorageEnabled(false)
194 , m_logsPageMessagesToSystemConsoleEnabled(false)
195 , m_mainContentUserGestureOverrideEnabled(false)
196 , m_mediaCapabilitiesEnabled(false)
197 , m_mediaCapabilitiesExtensionsEnabled(false)
198 , m_mediaControlsScaleWithPageZoom(defaultMediaControlsScaleWithPageZoom)
199 , m_mediaDataLoadsAutomatically(defaultMediaDataLoadsAutomatically)
200 , m_mediaEnabled(defaultMediaEnabled)
201 , m_mediaPreloadingEnabled(false)
202 , m_mediaUserGestureInheritsFromDocument(false)
203 , m_needsAdobeFrameReloadingQuirk(false)
204 , m_needsFrameNameFallbackToIdQuirk(false)
205 , m_needsIsLoadingInAPISenseQuirk(false)
206 , m_needsKeyboardEventDisambiguationQuirks(false)
207 , m_needsSiteSpecificQuirks(false)
208 , m_needsStorageAccessFromFileURLsQuirk(true)
209 , m_notificationsEnabled(true)
210 , m_offlineWebApplicationCacheEnabled(false)
211 , m_pageCacheSupportsPlugins(false)
212 , m_paginateDuringLayoutEnabled(false)
213 , m_passiveTouchListenersAsDefaultOnDocument(true)
214 , m_passwordEchoEnabled(false)
215 , m_plugInSnapshottingEnabled(false)
216 , m_pluginsEnabled(false)
217 , m_preferMIMETypeForImages(false)
218 , m_preventKeyboardDOMEventDispatch(false)
219 , m_primaryPlugInSnapshotDetectionEnabled(true)
220 , m_punchOutWhiteBackgroundsInDarkMode(false)
221 , m_quickTimePluginReplacementEnabled(defaultQuickTimePluginReplacementEnabled)
222 , m_repaintOutsideLayoutEnabled(false)
223 , m_requestAnimationFrameEnabled(true)
224 , m_requiresUserGestureToLoadVideo(defaultRequiresUserGestureToLoadVideo)
225 , m_resourceUsageOverlayVisible(false)
226 , m_scriptEnabled(false)
227 , m_scriptMarkupEnabled(true)
228 , m_scrollingCoordinatorEnabled(false)
229 , m_scrollingPerformanceLoggingEnabled(false)
230 , m_scrollingTreeIncludesFrames(defaultScrollingTreeIncludesFrames)
231 , m_selectTrailingWhitespaceEnabled(defaultSelectTrailingWhitespaceEnabled)
232 , m_selectionAcrossShadowBoundariesEnabled(true)
233 , m_selectionPaintingWithoutSelectionGapsEnabled(false)
234 , m_shouldAllowUserInstalledFonts(true)
235 , m_shouldConvertInvalidURLsToBlank(true)
236 , m_shouldConvertPositionStyleOnCopy(false)
237 , m_shouldDecidePolicyBeforeLoadingQuickLookPreview(false)
238 , m_shouldDeferAsynchronousScriptsUntilAfterDocumentLoad(false)
239 , m_shouldDispatchSyntheticMouseEventsWhenModifyingSelection(false)
240 , m_shouldIgnoreFontLoadCompletions(false)
241 , m_shouldIgnoreMetaViewport(false)
242 , m_shouldInjectUserScriptsInInitialEmptyDocument(false)
243 , m_shouldPrintBackgrounds(false)
244 , m_shouldRespectImageOrientation(defaultShouldRespectImageOrientation)
245 , m_shouldSuppressTextInputFromEditingDuringProvisionalNavigation(false)
246 , m_showDebugBorders(false)
247 , m_showRepaintCounter(false)
248 , m_showTiledScrollingIndicator(false)
249 , m_showsToolTipOverTruncatedText(false)
250 , m_showsURLsInToolTips(false)
251 , m_shrinksStandaloneImagesToFit(true)
252 , m_simpleLineLayoutDebugBordersEnabled(false)
253 , m_simpleLineLayoutEnabled(true)
254 , m_smartInsertDeleteEnabled(defaultSmartInsertDeleteEnabled)
255 , m_snapshotAllPlugIns(false)
256 , m_spatialNavigationEnabled(false)
257 , m_springTimingFunctionEnabled(false)
258 , m_standalone(false)
259 , m_storageAccessAPIEnabled(true)
260 , m_subpixelAntialiasedLayerTextEnabled(false)
261 , m_subpixelCSSOMElementMetricsEnabled(false)
262 , m_subresourceIntegrityEnabled(true)
263 , m_suppressesIncrementalRendering(false)
264 , m_telephoneNumberParsingEnabled(false)
265 , m_temporaryTileCohortRetentionEnabled(true)
266 , m_textAreasAreResizable(false)
267 , m_thirdPartyIframeRedirectBlockingEnabled(true)
268 , m_treatIPAddressAsDomain(false)
269 , m_treatsAnyTextCSSLinkAsStylesheet(false)
270 , m_unhandledPromiseRejectionToConsoleEnabled(true)
271 , m_unifiedTextCheckerEnabled(defaultUnifiedTextCheckerEnabled)
272 , m_useAnonymousModeWhenFetchingMaskImages(true)
273 , m_useGiantTiles(false)
274 , m_useImageDocumentForSubframePDF(false)
275 , m_useLegacyBackgroundSizeShorthandBehavior(false)
276 , m_useLegacyTextAlignPositionedElementBehavior(false)
277 , m_usePreHTML5ParserQuirks(false)
278 , m_usesEncodingDetector(false)
279 , m_usesPageCache(false)
280 , m_videoPlaybackRequiresUserGesture(defaultVideoPlaybackRequiresUserGesture)
281 , m_viewportFitEnabled(false)
282 , m_visualViewportAPIEnabled(false)
283 , m_visualViewportEnabled(true)
284 , m_wantsBalancedSetDefersLoadingBehavior(false)
285 , m_webAudioEnabled(false)
286 , m_webGLEnabled(false)
287 , m_webGLErrorsToConsoleEnabled(true)
288 , m_webSecurityEnabled(true)
289 , m_webkitImageReadyEventEnabled(false)
290 , m_windowFocusRestricted(true)
291 , m_xssAuditorEnabled(false)
292 , m_youTubeFlashPluginReplacementEnabled(defaultYouTubeFlashPluginReplacementEnabled)
293#if ENABLE(APPLE_PAY)
294 , m_applePayCapabilityDisclosureAllowed(true)
295 , m_applePayEnabled(defaultApplePayEnabled)
296#endif
297#if ENABLE(APPLE_PAY_REMOTE_UI)
298 , m_applePayRemoteUIEnabled(true)
299#endif
300#if ENABLE(DASHBOARD_SUPPORT)
301 , m_usesDashboardBackwardCompatibilityMode(false)
302#endif
303#if ENABLE(DEVICE_ORIENTATION)
304 , m_deviceOrientationEventEnabled(true)
305 , m_deviceOrientationPermissionAPIEnabled(false)
306#endif
307#if ENABLE(FULLSCREEN_API)
308 , m_fullScreenEnabled(false)
309#endif
310#if ENABLE(MEDIA_SOURCE)
311 , m_mediaSourceEnabled(platformDefaultMediaSourceEnabled())
312 , m_sourceBufferChangeTypeEnabled(true)
313#endif
314#if ENABLE(MEDIA_STREAM)
315 , m_mediaCaptureRequiresSecureConnection(true)
316 , m_mockCaptureDevicesEnabled(false)
317#endif
318#if ENABLE(OVERFLOW_SCROLLING_TOUCH)
319 , m_legacyOverflowScrollingTouchEnabled(true)
320#endif
321#if ENABLE(PAYMENT_REQUEST)
322 , m_paymentRequestEnabled(false)
323#endif
324#if ENABLE(RESIZE_OBSERVER)
325 , m_resizeObserverEnabled(false)
326#endif
327#if ENABLE(RUBBER_BANDING)
328 , m_rubberBandingForSubScrollableRegionsEnabled(true)
329#endif
330#if ENABLE(SERVICE_CONTROLS)
331 , m_imageControlsEnabled(false)
332 , m_serviceControlsEnabled(false)
333#endif
334#if ENABLE(SMOOTH_SCROLLING)
335 , m_scrollAnimatorEnabled(true)
336#endif
337#if ENABLE(TEXT_AUTOSIZING)
338 , m_shouldEnableTextAutosizingBoost(false)
339 , m_textAutosizingEnabled(defaultTextAutosizingEnabled())
340 , m_textAutosizingUsesIdempotentMode(defaultTextAutosizingUsesIdempotentMode())
341#endif
342#if ENABLE(TOUCH_EVENTS)
343 , m_touchEventEmulationEnabled(false)
344#endif
345#if ENABLE(VIDEO)
346 , m_videoQualityIncludesDisplayCompositingEnabled(false)
347#endif
348#if ENABLE(VIDEO_TRACK)
349 , m_shouldDisplayCaptions(false)
350 , m_shouldDisplaySubtitles(false)
351 , m_shouldDisplayTextDescriptions(false)
352#endif
353#if ENABLE(WEB_ARCHIVE)
354 , m_webArchiveDebugModeEnabled(false)
355#endif
356#if ENABLE(WIRELESS_PLAYBACK_TARGET)
357 , m_allowsAirPlayForMediaPlayback(true)
358#endif
359{
360}
361
362Settings::~Settings()
363{
364}
365
366bool Settings::authorAndUserStylesEnabled() const
367{
368 if (m_authorAndUserStylesEnabledInspectorOverride)
369 return m_authorAndUserStylesEnabledInspectorOverride.value();
370 return m_authorAndUserStylesEnabled;
371}
372
373bool Settings::iceCandidateFilteringEnabled() const
374{
375 if (m_iceCandidateFilteringEnabledInspectorOverride)
376 return m_iceCandidateFilteringEnabledInspectorOverride.value();
377 return m_iceCandidateFilteringEnabled;
378}
379
380bool Settings::areImagesEnabled() const
381{
382 if (m_imagesEnabledInspectorOverride)
383 return m_imagesEnabledInspectorOverride.value();
384 return m_imagesEnabled;
385}
386
387bool Settings::needsSiteSpecificQuirks() const
388{
389 if (m_needsSiteSpecificQuirksInspectorOverride)
390 return m_needsSiteSpecificQuirksInspectorOverride.value();
391 return m_needsSiteSpecificQuirks;
392}
393
394bool Settings::isScriptEnabled() const
395{
396 if (m_scriptEnabledInspectorOverride)
397 return m_scriptEnabledInspectorOverride.value();
398 return m_scriptEnabled;
399}
400
401bool Settings::webSecurityEnabled() const
402{
403 if (m_webSecurityEnabledInspectorOverride)
404 return m_webSecurityEnabledInspectorOverride.value();
405 return m_webSecurityEnabled;
406}
407
408void Settings::setAcceleratedCompositedAnimationsEnabled(bool acceleratedCompositedAnimationsEnabled)
409{
410 if (m_acceleratedCompositedAnimationsEnabled == acceleratedCompositedAnimationsEnabled)
411 return;
412 m_acceleratedCompositedAnimationsEnabled = acceleratedCompositedAnimationsEnabled;
413 setNeedsRecalcStyleInAllFrames();
414}
415
416void Settings::setAcceleratedCompositingEnabled(bool acceleratedCompositingEnabled)
417{
418 if (m_acceleratedCompositingEnabled == acceleratedCompositingEnabled)
419 return;
420 m_acceleratedCompositingEnabled = acceleratedCompositingEnabled;
421 setNeedsRecalcStyleInAllFrames();
422}
423
424void Settings::setAsyncFrameScrollingEnabled(bool asyncFrameScrollingEnabled)
425{
426 if (m_asyncFrameScrollingEnabled == asyncFrameScrollingEnabled)
427 return;
428 m_asyncFrameScrollingEnabled = asyncFrameScrollingEnabled;
429 setNeedsRelayoutAllFrames();
430}
431
432void Settings::setAsyncOverflowScrollingEnabled(bool asyncOverflowScrollingEnabled)
433{
434 if (m_asyncOverflowScrollingEnabled == asyncOverflowScrollingEnabled)
435 return;
436 m_asyncOverflowScrollingEnabled = asyncOverflowScrollingEnabled;
437 setNeedsRelayoutAllFrames();
438}
439
440void Settings::setAuthorAndUserStylesEnabled(bool authorAndUserStylesEnabled)
441{
442 if (m_authorAndUserStylesEnabled == authorAndUserStylesEnabled)
443 return;
444 m_authorAndUserStylesEnabled = authorAndUserStylesEnabled;
445 setNeedsRecalcStyleInAllFrames();
446}
447
448void Settings::setBackgroundShouldExtendBeyondPage(bool backgroundShouldExtendBeyondPage)
449{
450 if (m_backgroundShouldExtendBeyondPage == backgroundShouldExtendBeyondPage)
451 return;
452 m_backgroundShouldExtendBeyondPage = backgroundShouldExtendBeyondPage;
453 backgroundShouldExtendBeyondPageChanged();
454}
455
456void Settings::setClientCoordinatesRelativeToLayoutViewport(bool clientCoordinatesRelativeToLayoutViewport)
457{
458 if (m_clientCoordinatesRelativeToLayoutViewport == clientCoordinatesRelativeToLayoutViewport)
459 return;
460 m_clientCoordinatesRelativeToLayoutViewport = clientCoordinatesRelativeToLayoutViewport;
461 setNeedsRecalcStyleInAllFrames();
462}
463
464void Settings::setColorFilterEnabled(bool colorFilterEnabled)
465{
466 if (m_colorFilterEnabled == colorFilterEnabled)
467 return;
468 m_colorFilterEnabled = colorFilterEnabled;
469 setNeedsRecalcStyleInAllFrames();
470}
471
472void Settings::setCoreMathMLEnabled(bool coreMathMLEnabled)
473{
474 if (m_coreMathMLEnabled == coreMathMLEnabled)
475 return;
476 m_coreMathMLEnabled = coreMathMLEnabled;
477 setNeedsRecalcStyleInAllFrames();
478}
479
480void Settings::setDefaultFixedFontSize(int defaultFixedFontSize)
481{
482 if (m_defaultFixedFontSize == defaultFixedFontSize)
483 return;
484 m_defaultFixedFontSize = defaultFixedFontSize;
485 setNeedsRecalcStyleInAllFrames();
486}
487
488void Settings::setDefaultFontSize(int defaultFontSize)
489{
490 if (m_defaultFontSize == defaultFontSize)
491 return;
492 m_defaultFontSize = defaultFontSize;
493 setNeedsRecalcStyleInAllFrames();
494}
495
496void Settings::setDNSPrefetchingEnabled(bool dnsPrefetchingEnabled)
497{
498 if (m_dnsPrefetchingEnabled == dnsPrefetchingEnabled)
499 return;
500 m_dnsPrefetchingEnabled = dnsPrefetchingEnabled;
501 dnsPrefetchingEnabledChanged();
502}
503
504void Settings::setFontFallbackPrefersPictographs(bool fontFallbackPrefersPictographs)
505{
506 if (m_fontFallbackPrefersPictographs == fontFallbackPrefersPictographs)
507 return;
508 m_fontFallbackPrefersPictographs = fontFallbackPrefersPictographs;
509 setNeedsRecalcStyleInAllFrames();
510}
511
512void Settings::setFrameFlattening(FrameFlattening frameFlattening)
513{
514 if (m_frameFlattening == frameFlattening)
515 return;
516 m_frameFlattening = frameFlattening;
517 setNeedsRelayoutAllFrames();
518}
519
520void Settings::setHiddenPageCSSAnimationSuspensionEnabled(bool hiddenPageCSSAnimationSuspensionEnabled)
521{
522 if (m_hiddenPageCSSAnimationSuspensionEnabled == hiddenPageCSSAnimationSuspensionEnabled)
523 return;
524 m_hiddenPageCSSAnimationSuspensionEnabled = hiddenPageCSSAnimationSuspensionEnabled;
525 hiddenPageCSSAnimationSuspensionEnabledChanged();
526}
527
528void Settings::setHiddenPageDOMTimerThrottlingAutoIncreases(bool hiddenPageDOMTimerThrottlingAutoIncreases)
529{
530 if (m_hiddenPageDOMTimerThrottlingAutoIncreases == hiddenPageDOMTimerThrottlingAutoIncreases)
531 return;
532 m_hiddenPageDOMTimerThrottlingAutoIncreases = hiddenPageDOMTimerThrottlingAutoIncreases;
533 hiddenPageDOMTimerThrottlingStateChanged();
534}
535
536void Settings::setHiddenPageDOMTimerThrottlingEnabled(bool hiddenPageDOMTimerThrottlingEnabled)
537{
538 if (m_hiddenPageDOMTimerThrottlingEnabled == hiddenPageDOMTimerThrottlingEnabled)
539 return;
540 m_hiddenPageDOMTimerThrottlingEnabled = hiddenPageDOMTimerThrottlingEnabled;
541 hiddenPageDOMTimerThrottlingStateChanged();
542}
543
544void Settings::setICECandidateFilteringEnabled(bool iceCandidateFilteringEnabled)
545{
546 if (m_iceCandidateFilteringEnabled == iceCandidateFilteringEnabled)
547 return;
548 m_iceCandidateFilteringEnabled = iceCandidateFilteringEnabled;
549 iceCandidateFilteringEnabledChanged();
550}
551
552void Settings::setImagesEnabled(bool imagesEnabled)
553{
554 if (m_imagesEnabled == imagesEnabled)
555 return;
556 m_imagesEnabled = imagesEnabled;
557 imagesEnabledChanged();
558}
559
560void Settings::setLayoutViewportHeightExpansionFactor(double layoutViewportHeightExpansionFactor)
561{
562 if (m_layoutViewportHeightExpansionFactor == layoutViewportHeightExpansionFactor)
563 return;
564 m_layoutViewportHeightExpansionFactor = layoutViewportHeightExpansionFactor;
565 setNeedsRecalcStyleInAllFrames();
566}
567
568void Settings::setLoadsImagesAutomatically(bool loadsImagesAutomatically)
569{
570 if (m_loadsImagesAutomatically == loadsImagesAutomatically)
571 return;
572 m_loadsImagesAutomatically = loadsImagesAutomatically;
573 imagesEnabledChanged();
574}
575
576void Settings::setMediaTypeOverride(const String& mediaTypeOverride)
577{
578 if (m_mediaTypeOverride == mediaTypeOverride)
579 return;
580 m_mediaTypeOverride = mediaTypeOverride;
581 mediaTypeOverrideChanged();
582}
583
584void Settings::setMinimumFontSize(int minimumFontSize)
585{
586 if (m_minimumFontSize == minimumFontSize)
587 return;
588 m_minimumFontSize = minimumFontSize;
589 setNeedsRecalcStyleInAllFrames();
590}
591
592void Settings::setMinimumLogicalFontSize(int minimumLogicalFontSize)
593{
594 if (m_minimumLogicalFontSize == minimumLogicalFontSize)
595 return;
596 m_minimumLogicalFontSize = minimumLogicalFontSize;
597 setNeedsRecalcStyleInAllFrames();
598}
599
600void Settings::setPluginsEnabled(bool pluginsEnabled)
601{
602 if (m_pluginsEnabled == pluginsEnabled)
603 return;
604 m_pluginsEnabled = pluginsEnabled;
605 pluginsEnabledChanged();
606}
607
608void Settings::setPunchOutWhiteBackgroundsInDarkMode(bool punchOutWhiteBackgroundsInDarkMode)
609{
610 if (m_punchOutWhiteBackgroundsInDarkMode == punchOutWhiteBackgroundsInDarkMode)
611 return;
612 m_punchOutWhiteBackgroundsInDarkMode = punchOutWhiteBackgroundsInDarkMode;
613 setNeedsRecalcStyleInAllFrames();
614}
615
616void Settings::setResourceUsageOverlayVisible(bool resourceUsageOverlayVisible)
617{
618 if (m_resourceUsageOverlayVisible == resourceUsageOverlayVisible)
619 return;
620 m_resourceUsageOverlayVisible = resourceUsageOverlayVisible;
621 resourceUsageOverlayVisibleChanged();
622}
623
624void Settings::setScrollingPerformanceLoggingEnabled(bool scrollingPerformanceLoggingEnabled)
625{
626 if (m_scrollingPerformanceLoggingEnabled == scrollingPerformanceLoggingEnabled)
627 return;
628 m_scrollingPerformanceLoggingEnabled = scrollingPerformanceLoggingEnabled;
629 scrollingPerformanceLoggingEnabledChanged();
630}
631
632void Settings::setShouldAllowUserInstalledFonts(bool shouldAllowUserInstalledFonts)
633{
634 if (m_shouldAllowUserInstalledFonts == shouldAllowUserInstalledFonts)
635 return;
636 m_shouldAllowUserInstalledFonts = shouldAllowUserInstalledFonts;
637 setNeedsRecalcStyleInAllFrames();
638}
639
640void Settings::setShowDebugBorders(bool showDebugBorders)
641{
642 if (m_showDebugBorders == showDebugBorders)
643 return;
644 m_showDebugBorders = showDebugBorders;
645 setNeedsRecalcStyleInAllFrames();
646}
647
648void Settings::setShowRepaintCounter(bool showRepaintCounter)
649{
650 if (m_showRepaintCounter == showRepaintCounter)
651 return;
652 m_showRepaintCounter = showRepaintCounter;
653 setNeedsRecalcStyleInAllFrames();
654}
655
656void Settings::setSimpleLineLayoutDebugBordersEnabled(bool simpleLineLayoutDebugBordersEnabled)
657{
658 if (m_simpleLineLayoutDebugBordersEnabled == simpleLineLayoutDebugBordersEnabled)
659 return;
660 m_simpleLineLayoutDebugBordersEnabled = simpleLineLayoutDebugBordersEnabled;
661 setNeedsRecalcStyleInAllFrames();
662}
663
664void Settings::setSimpleLineLayoutEnabled(bool simpleLineLayoutEnabled)
665{
666 if (m_simpleLineLayoutEnabled == simpleLineLayoutEnabled)
667 return;
668 m_simpleLineLayoutEnabled = simpleLineLayoutEnabled;
669 setNeedsRecalcStyleInAllFrames();
670}
671
672void Settings::setStorageBlockingPolicy(SecurityOrigin::StorageBlockingPolicy storageBlockingPolicy)
673{
674 if (m_storageBlockingPolicy == storageBlockingPolicy)
675 return;
676 m_storageBlockingPolicy = storageBlockingPolicy;
677 storageBlockingPolicyChanged();
678}
679
680void Settings::setSubpixelAntialiasedLayerTextEnabled(bool subpixelAntialiasedLayerTextEnabled)
681{
682 if (m_subpixelAntialiasedLayerTextEnabled == subpixelAntialiasedLayerTextEnabled)
683 return;
684 m_subpixelAntialiasedLayerTextEnabled = subpixelAntialiasedLayerTextEnabled;
685 setNeedsRecalcStyleInAllFrames();
686}
687
688void Settings::setTextAreasAreResizable(bool textAreasAreResizable)
689{
690 if (m_textAreasAreResizable == textAreasAreResizable)
691 return;
692 m_textAreasAreResizable = textAreasAreResizable;
693 setNeedsRecalcStyleInAllFrames();
694}
695
696void Settings::setUserStyleSheetLocation(const URL& userStyleSheetLocation)
697{
698 if (m_userStyleSheetLocation == userStyleSheetLocation)
699 return;
700 m_userStyleSheetLocation = userStyleSheetLocation;
701 userStyleSheetLocationChanged();
702}
703
704void Settings::setUsesPageCache(bool usesPageCache)
705{
706 if (m_usesPageCache == usesPageCache)
707 return;
708 m_usesPageCache = usesPageCache;
709 usesPageCacheChanged();
710}
711
712void Settings::setVisualViewportEnabled(bool visualViewportEnabled)
713{
714 if (m_visualViewportEnabled == visualViewportEnabled)
715 return;
716 m_visualViewportEnabled = visualViewportEnabled;
717 setNeedsRecalcStyleInAllFrames();
718}
719
720#if ENABLE(MEDIA_STREAM)
721bool Settings::mediaCaptureRequiresSecureConnection() const
722{
723 if (m_mediaCaptureRequiresSecureConnectionInspectorOverride)
724 return m_mediaCaptureRequiresSecureConnectionInspectorOverride.value();
725 return m_mediaCaptureRequiresSecureConnection;
726}
727bool Settings::mockCaptureDevicesEnabled() const
728{
729 if (m_mockCaptureDevicesEnabledInspectorOverride)
730 return m_mockCaptureDevicesEnabledInspectorOverride.value();
731 return m_mockCaptureDevicesEnabled;
732}
733void Settings::setMockCaptureDevicesEnabled(bool mockCaptureDevicesEnabled)
734{
735 if (m_mockCaptureDevicesEnabled == mockCaptureDevicesEnabled)
736 return;
737 m_mockCaptureDevicesEnabled = mockCaptureDevicesEnabled;
738 mockCaptureDevicesEnabledChanged();
739}
740#endif
741
742#if ENABLE(OVERFLOW_SCROLLING_TOUCH)
743void Settings::setLegacyOverflowScrollingTouchEnabled(bool legacyOverflowScrollingTouchEnabled)
744{
745 if (m_legacyOverflowScrollingTouchEnabled == legacyOverflowScrollingTouchEnabled)
746 return;
747 m_legacyOverflowScrollingTouchEnabled = legacyOverflowScrollingTouchEnabled;
748 setNeedsRelayoutAllFrames();
749}
750#endif
751
752#if ENABLE(TEXT_AUTOSIZING)
753void Settings::setShouldEnableTextAutosizingBoost(bool shouldEnableTextAutosizingBoost)
754{
755 if (m_shouldEnableTextAutosizingBoost == shouldEnableTextAutosizingBoost)
756 return;
757 m_shouldEnableTextAutosizingBoost = shouldEnableTextAutosizingBoost;
758 shouldEnableTextAutosizingBoostChanged();
759}
760void Settings::setTextAutosizingEnabled(bool textAutosizingEnabled)
761{
762 if (m_textAutosizingEnabled == textAutosizingEnabled)
763 return;
764 m_textAutosizingEnabled = textAutosizingEnabled;
765 setNeedsRecalcStyleInAllFrames();
766}
767void Settings::setTextAutosizingUsesIdempotentMode(bool textAutosizingUsesIdempotentMode)
768{
769 if (m_textAutosizingUsesIdempotentMode == textAutosizingUsesIdempotentMode)
770 return;
771 m_textAutosizingUsesIdempotentMode = textAutosizingUsesIdempotentMode;
772 setNeedsRecalcStyleInAllFrames();
773}
774void Settings::setTextAutosizingWindowSizeOverride(IntSize textAutosizingWindowSizeOverride)
775{
776 if (m_textAutosizingWindowSizeOverride == textAutosizingWindowSizeOverride)
777 return;
778 m_textAutosizingWindowSizeOverride = textAutosizingWindowSizeOverride;
779 setNeedsRecalcStyleInAllFrames();
780}
781#endif
782
783void Settings::setAuthorAndUserStylesEnabledInspectorOverride(Optional<bool> authorAndUserStylesEnabledInspectorOverride)
784{
785 if (m_authorAndUserStylesEnabledInspectorOverride == authorAndUserStylesEnabledInspectorOverride)
786 return;
787 m_authorAndUserStylesEnabledInspectorOverride = authorAndUserStylesEnabledInspectorOverride;
788 setNeedsRecalcStyleInAllFrames();
789}
790
791void Settings::setICECandidateFilteringEnabledInspectorOverride(Optional<bool> iceCandidateFilteringEnabledInspectorOverride)
792{
793 if (m_iceCandidateFilteringEnabledInspectorOverride == iceCandidateFilteringEnabledInspectorOverride)
794 return;
795 m_iceCandidateFilteringEnabledInspectorOverride = iceCandidateFilteringEnabledInspectorOverride;
796 iceCandidateFilteringEnabledChanged();
797}
798
799void Settings::setImagesEnabledInspectorOverride(Optional<bool> imagesEnabledInspectorOverride)
800{
801 if (m_imagesEnabledInspectorOverride == imagesEnabledInspectorOverride)
802 return;
803 m_imagesEnabledInspectorOverride = imagesEnabledInspectorOverride;
804 imagesEnabledChanged();
805}
806
807void Settings::setMockCaptureDevicesEnabledInspectorOverride(Optional<bool> mockCaptureDevicesEnabledInspectorOverride)
808{
809 if (m_mockCaptureDevicesEnabledInspectorOverride == mockCaptureDevicesEnabledInspectorOverride)
810 return;
811 m_mockCaptureDevicesEnabledInspectorOverride = mockCaptureDevicesEnabledInspectorOverride;
812#if ENABLE(MEDIA_STREAM)
813 mockCaptureDevicesEnabledChanged();
814#endif
815}
816
817}
818