2 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 #include "web/WebSettingsImpl.h"
34 #include "core/frame/Settings.h"
35 #include "platform/graphics/DeferredImageDecoder.h"
37 #include "public/platform/WebString.h"
38 #include "public/platform/WebURL.h"
39 #include "web/DevToolsEmulator.h"
40 #include "web/WebDevToolsAgentImpl.h"
44 WebSettingsImpl::WebSettingsImpl(Settings
* settings
, DevToolsEmulator
* devToolsEmulator
)
45 : m_settings(settings
)
46 , m_devToolsEmulator(devToolsEmulator
)
47 , m_showFPSCounter(false)
48 , m_showPaintRects(false)
49 , m_renderVSyncNotificationEnabled(false)
50 , m_autoZoomFocusedNodeToLegibleScale(false)
51 , m_supportDeprecatedTargetDensityDPI(false)
52 , m_shrinksViewportContentToFit(false)
53 , m_viewportMetaLayoutSizeQuirk(false)
54 , m_viewportMetaNonUserScalableQuirk(false)
55 , m_clobberUserAgentInitialScaleQuirk(false)
56 , m_mainFrameResizesAreOrientationChanges(false)
61 void WebSettingsImpl::setFromStrings(const WebString
& name
, const WebString
& value
)
63 m_settings
->setFromStrings(name
, value
);
66 void WebSettingsImpl::setStandardFontFamily(const WebString
& font
, UScriptCode script
)
68 if (m_settings
->genericFontFamilySettings().updateStandard(font
, script
))
69 m_settings
->notifyGenericFontFamilyChange();
72 void WebSettingsImpl::setFixedFontFamily(const WebString
& font
, UScriptCode script
)
74 if (m_settings
->genericFontFamilySettings().updateFixed(font
, script
))
75 m_settings
->notifyGenericFontFamilyChange();
78 void WebSettingsImpl::setReportWheelOverscroll(bool enabled
)
80 m_settings
->setReportWheelOverscroll(enabled
);
83 void WebSettingsImpl::setForceZeroLayoutHeight(bool enabled
)
85 m_settings
->setForceZeroLayoutHeight(enabled
);
88 void WebSettingsImpl::setFullscreenSupported(bool enabled
)
90 m_settings
->setFullscreenSupported(enabled
);
93 void WebSettingsImpl::setSerifFontFamily(const WebString
& font
, UScriptCode script
)
95 if (m_settings
->genericFontFamilySettings().updateSerif(font
, script
))
96 m_settings
->notifyGenericFontFamilyChange();
99 void WebSettingsImpl::setSansSerifFontFamily(const WebString
& font
, UScriptCode script
)
101 if (m_settings
->genericFontFamilySettings().updateSansSerif(font
, script
))
102 m_settings
->notifyGenericFontFamilyChange();
105 void WebSettingsImpl::setCursiveFontFamily(const WebString
& font
, UScriptCode script
)
107 if (m_settings
->genericFontFamilySettings().updateCursive(font
, script
))
108 m_settings
->notifyGenericFontFamilyChange();
111 void WebSettingsImpl::setFantasyFontFamily(const WebString
& font
, UScriptCode script
)
113 if (m_settings
->genericFontFamilySettings().updateFantasy(font
, script
))
114 m_settings
->notifyGenericFontFamilyChange();
117 void WebSettingsImpl::setPictographFontFamily(const WebString
& font
, UScriptCode script
)
119 if (m_settings
->genericFontFamilySettings().updatePictograph(font
, script
))
120 m_settings
->notifyGenericFontFamilyChange();
123 void WebSettingsImpl::setDefaultFontSize(int size
)
125 m_settings
->setDefaultFontSize(size
);
128 void WebSettingsImpl::setDefaultFixedFontSize(int size
)
130 m_settings
->setDefaultFixedFontSize(size
);
133 void WebSettingsImpl::setDefaultVideoPosterURL(const WebString
& url
)
135 m_settings
->setDefaultVideoPosterURL(url
);
138 void WebSettingsImpl::setMinimumFontSize(int size
)
140 m_settings
->setMinimumFontSize(size
);
143 void WebSettingsImpl::setMinimumLogicalFontSize(int size
)
145 m_settings
->setMinimumLogicalFontSize(size
);
148 void WebSettingsImpl::setDeviceSupportsTouch(bool deviceSupportsTouch
)
150 m_settings
->setDeviceSupportsTouch(deviceSupportsTouch
);
153 void WebSettingsImpl::setDeviceSupportsMouse(bool deviceSupportsMouse
)
155 m_settings
->setDeviceSupportsMouse(deviceSupportsMouse
);
158 void WebSettingsImpl::setAutoZoomFocusedNodeToLegibleScale(bool autoZoomFocusedNodeToLegibleScale
)
160 m_autoZoomFocusedNodeToLegibleScale
= autoZoomFocusedNodeToLegibleScale
;
163 void WebSettingsImpl::setTextAutosizingEnabled(bool enabled
)
165 m_devToolsEmulator
->setTextAutosizingEnabled(enabled
);
168 void WebSettingsImpl::setAccessibilityFontScaleFactor(float fontScaleFactor
)
170 m_settings
->setAccessibilityFontScaleFactor(fontScaleFactor
);
173 void WebSettingsImpl::setAccessibilityEnabled(bool enabled
)
175 m_settings
->setAccessibilityEnabled(enabled
);
178 void WebSettingsImpl::setAccessibilityPasswordValuesEnabled(bool enabled
)
180 m_settings
->setAccessibilityPasswordValuesEnabled(enabled
);
183 void WebSettingsImpl::setInlineTextBoxAccessibilityEnabled(bool enabled
)
185 m_settings
->setInlineTextBoxAccessibilityEnabled(enabled
);
188 void WebSettingsImpl::setInvertViewportScrollOrder(bool enabled
)
190 m_settings
->setInvertViewportScrollOrder(enabled
);
193 void WebSettingsImpl::setDeviceScaleAdjustment(float deviceScaleAdjustment
)
195 m_devToolsEmulator
->setDeviceScaleAdjustment(deviceScaleAdjustment
);
198 void WebSettingsImpl::setDefaultTextEncodingName(const WebString
& encoding
)
200 m_settings
->setDefaultTextEncodingName((String
)encoding
);
203 void WebSettingsImpl::setJavaScriptEnabled(bool enabled
)
205 m_devToolsEmulator
->setScriptEnabled(enabled
);
208 void WebSettingsImpl::setWebSecurityEnabled(bool enabled
)
210 m_settings
->setWebSecurityEnabled(enabled
);
213 void WebSettingsImpl::setJavaScriptCanOpenWindowsAutomatically(bool canOpenWindows
)
215 m_settings
->setJavaScriptCanOpenWindowsAutomatically(canOpenWindows
);
218 void WebSettingsImpl::setSupportDeprecatedTargetDensityDPI(bool supportDeprecatedTargetDensityDPI
)
220 m_supportDeprecatedTargetDensityDPI
= supportDeprecatedTargetDensityDPI
;
223 void WebSettingsImpl::setViewportMetaLayoutSizeQuirk(bool viewportMetaLayoutSizeQuirk
)
225 m_viewportMetaLayoutSizeQuirk
= viewportMetaLayoutSizeQuirk
;
228 void WebSettingsImpl::setViewportMetaMergeContentQuirk(bool viewportMetaMergeContentQuirk
)
230 m_settings
->setViewportMetaMergeContentQuirk(viewportMetaMergeContentQuirk
);
233 void WebSettingsImpl::setViewportMetaNonUserScalableQuirk(bool viewportMetaNonUserScalableQuirk
)
235 m_viewportMetaNonUserScalableQuirk
= viewportMetaNonUserScalableQuirk
;
238 void WebSettingsImpl::setViewportMetaZeroValuesQuirk(bool viewportMetaZeroValuesQuirk
)
240 m_settings
->setViewportMetaZeroValuesQuirk(viewportMetaZeroValuesQuirk
);
243 void WebSettingsImpl::setIgnoreMainFrameOverflowHiddenQuirk(bool ignoreMainFrameOverflowHiddenQuirk
)
245 m_settings
->setIgnoreMainFrameOverflowHiddenQuirk(ignoreMainFrameOverflowHiddenQuirk
);
248 void WebSettingsImpl::setReportScreenSizeInPhysicalPixelsQuirk(bool reportScreenSizeInPhysicalPixelsQuirk
)
250 m_settings
->setReportScreenSizeInPhysicalPixelsQuirk(reportScreenSizeInPhysicalPixelsQuirk
);
253 void WebSettingsImpl::setRootLayerScrolls(bool rootLayerScrolls
)
255 m_settings
->setRootLayerScrolls(rootLayerScrolls
);
258 void WebSettingsImpl::setRubberBandingOnCompositorThread(bool rubberBandingOnCompositorThread
)
262 void WebSettingsImpl::setClobberUserAgentInitialScaleQuirk(bool clobberUserAgentInitialScaleQuirk
)
264 m_clobberUserAgentInitialScaleQuirk
= clobberUserAgentInitialScaleQuirk
;
267 void WebSettingsImpl::setSupportsMultipleWindows(bool supportsMultipleWindows
)
269 m_settings
->setSupportsMultipleWindows(supportsMultipleWindows
);
272 void WebSettingsImpl::setLoadsImagesAutomatically(bool loadsImagesAutomatically
)
274 m_settings
->setLoadsImagesAutomatically(loadsImagesAutomatically
);
277 void WebSettingsImpl::setImageAnimationPolicy(ImageAnimationPolicy policy
)
279 m_settings
->setImageAnimationPolicy(static_cast<blink::ImageAnimationPolicy
>(policy
));
282 void WebSettingsImpl::setImagesEnabled(bool enabled
)
284 m_settings
->setImagesEnabled(enabled
);
287 void WebSettingsImpl::setLoadWithOverviewMode(bool enabled
)
289 m_settings
->setLoadWithOverviewMode(enabled
);
292 void WebSettingsImpl::setPluginsEnabled(bool enabled
)
294 m_devToolsEmulator
->setPluginsEnabled(enabled
);
297 void WebSettingsImpl::setAvailablePointerTypes(int pointers
)
299 m_devToolsEmulator
->setAvailablePointerTypes(pointers
);
302 void WebSettingsImpl::setPrimaryPointerType(PointerType pointer
)
304 m_devToolsEmulator
->setPrimaryPointerType(static_cast<blink::PointerType
>(pointer
));
307 void WebSettingsImpl::setAvailableHoverTypes(int types
)
309 m_devToolsEmulator
->setAvailableHoverTypes(types
);
312 void WebSettingsImpl::setPrimaryHoverType(HoverType type
)
314 m_devToolsEmulator
->setPrimaryHoverType(static_cast<blink::HoverType
>(type
));
317 void WebSettingsImpl::setPreferHiddenVolumeControls(bool enabled
)
319 m_settings
->setPreferHiddenVolumeControls(enabled
);
322 void WebSettingsImpl::setDOMPasteAllowed(bool enabled
)
324 m_settings
->setDOMPasteAllowed(enabled
);
327 void WebSettingsImpl::setShrinksViewportContentToFit(bool shrinkViewportContent
)
329 m_shrinksViewportContentToFit
= shrinkViewportContent
;
332 void WebSettingsImpl::setSpatialNavigationEnabled(bool enabled
)
334 m_settings
->setSpatialNavigationEnabled(enabled
);
337 void WebSettingsImpl::setUsesEncodingDetector(bool usesDetector
)
339 m_settings
->setUsesEncodingDetector(usesDetector
);
342 void WebSettingsImpl::setTextAreasAreResizable(bool areResizable
)
344 m_settings
->setTextAreasAreResizable(areResizable
);
347 void WebSettingsImpl::setAllowScriptsToCloseWindows(bool allow
)
349 m_settings
->setAllowScriptsToCloseWindows(allow
);
352 void WebSettingsImpl::setUseLegacyBackgroundSizeShorthandBehavior(bool useLegacyBackgroundSizeShorthandBehavior
)
354 m_settings
->setUseLegacyBackgroundSizeShorthandBehavior(useLegacyBackgroundSizeShorthandBehavior
);
357 void WebSettingsImpl::setWideViewportQuirkEnabled(bool wideViewportQuirkEnabled
)
359 m_settings
->setWideViewportQuirkEnabled(wideViewportQuirkEnabled
);
362 void WebSettingsImpl::setUseWideViewport(bool useWideViewport
)
364 m_settings
->setUseWideViewport(useWideViewport
);
367 void WebSettingsImpl::setDoubleTapToZoomEnabled(bool doubleTapToZoomEnabled
)
369 m_devToolsEmulator
->setDoubleTapToZoomEnabled(doubleTapToZoomEnabled
);
372 void WebSettingsImpl::setDownloadableBinaryFontsEnabled(bool enabled
)
374 m_settings
->setDownloadableBinaryFontsEnabled(enabled
);
377 void WebSettingsImpl::setJavaScriptCanAccessClipboard(bool enabled
)
379 m_settings
->setJavaScriptCanAccessClipboard(enabled
);
382 void WebSettingsImpl::setXSSAuditorEnabled(bool enabled
)
384 m_settings
->setXSSAuditorEnabled(enabled
);
387 void WebSettingsImpl::setTextTrackKindUserPreference(TextTrackKindUserPreference preference
)
389 m_settings
->setTextTrackKindUserPreference(static_cast<blink::TextTrackKindUserPreference
>(preference
));
392 void WebSettingsImpl::setTextTrackBackgroundColor(const WebString
& color
)
394 m_settings
->setTextTrackBackgroundColor(color
);
397 void WebSettingsImpl::setTextTrackFontFamily(const WebString
& fontFamily
)
399 m_settings
->setTextTrackFontFamily(fontFamily
);
402 void WebSettingsImpl::setTextTrackFontStyle(const WebString
& fontStyle
)
404 m_settings
->setTextTrackFontStyle(fontStyle
);
407 void WebSettingsImpl::setTextTrackFontVariant(const WebString
& fontVariant
)
409 m_settings
->setTextTrackFontVariant(fontVariant
);
412 void WebSettingsImpl::setTextTrackTextColor(const WebString
& color
)
414 m_settings
->setTextTrackTextColor(color
);
417 void WebSettingsImpl::setTextTrackTextShadow(const WebString
& shadow
)
419 m_settings
->setTextTrackTextShadow(shadow
);
422 void WebSettingsImpl::setTextTrackTextSize(const WebString
& size
)
424 m_settings
->setTextTrackTextSize(size
);
427 void WebSettingsImpl::setUnsafePluginPastingEnabled(bool enabled
)
429 m_settings
->setUnsafePluginPastingEnabled(enabled
);
432 void WebSettingsImpl::setDNSPrefetchingEnabled(bool enabled
)
434 m_settings
->setDNSPrefetchingEnabled(enabled
);
437 void WebSettingsImpl::setLocalStorageEnabled(bool enabled
)
439 m_settings
->setLocalStorageEnabled(enabled
);
442 void WebSettingsImpl::setMainFrameClipsContent(bool enabled
)
444 m_settings
->setMainFrameClipsContent(enabled
);
447 void WebSettingsImpl::setMaxTouchPoints(int maxTouchPoints
)
449 m_settings
->setMaxTouchPoints(maxTouchPoints
);
452 void WebSettingsImpl::setAllowUniversalAccessFromFileURLs(bool allow
)
454 m_settings
->setAllowUniversalAccessFromFileURLs(allow
);
457 void WebSettingsImpl::setAllowFileAccessFromFileURLs(bool allow
)
459 m_settings
->setAllowFileAccessFromFileURLs(allow
);
462 void WebSettingsImpl::setThreadedScrollingEnabled(bool enabled
)
464 m_settings
->setThreadedScrollingEnabled(enabled
);
467 void WebSettingsImpl::setTouchDragDropEnabled(bool enabled
)
469 m_settings
->setTouchDragDropEnabled(enabled
);
472 void WebSettingsImpl::setTouchEditingEnabled(bool enabled
)
474 m_settings
->setTouchEditingEnabled(enabled
);
477 void WebSettingsImpl::setOfflineWebApplicationCacheEnabled(bool enabled
)
479 m_settings
->setOfflineWebApplicationCacheEnabled(enabled
);
482 void WebSettingsImpl::setWebAudioEnabled(bool enabled
)
484 m_settings
->setWebAudioEnabled(enabled
);
487 void WebSettingsImpl::setExperimentalWebGLEnabled(bool enabled
)
489 m_settings
->setWebGLEnabled(enabled
);
492 void WebSettingsImpl::setOpenGLMultisamplingEnabled(bool enabled
)
494 m_settings
->setOpenGLMultisamplingEnabled(enabled
);
497 void WebSettingsImpl::setRenderVSyncNotificationEnabled(bool enabled
)
499 m_renderVSyncNotificationEnabled
= enabled
;
502 void WebSettingsImpl::setWebGLErrorsToConsoleEnabled(bool enabled
)
504 m_settings
->setWebGLErrorsToConsoleEnabled(enabled
);
507 void WebSettingsImpl::setShowContextMenuOnMouseUp(bool enabled
)
509 m_settings
->setShowContextMenuOnMouseUp(enabled
);
512 void WebSettingsImpl::setShowFPSCounter(bool show
)
514 m_showFPSCounter
= show
;
517 void WebSettingsImpl::setShowPaintRects(bool show
)
519 m_showPaintRects
= show
;
522 void WebSettingsImpl::setEditingBehavior(EditingBehavior behavior
)
524 m_settings
->setEditingBehaviorType(static_cast<EditingBehaviorType
>(behavior
));
527 void WebSettingsImpl::setAcceleratedCompositingEnabled(bool enabled
)
529 m_settings
->setAcceleratedCompositingEnabled(enabled
);
532 void WebSettingsImpl::setMockScrollbarsEnabled(bool enabled
)
534 m_settings
->setMockScrollbarsEnabled(enabled
);
537 void WebSettingsImpl::setMockGestureTapHighlightsEnabled(bool enabled
)
539 m_settings
->setMockGestureTapHighlightsEnabled(enabled
);
542 void WebSettingsImpl::setAccelerated2dCanvasEnabled(bool enabled
)
544 m_settings
->setAccelerated2dCanvasEnabled(enabled
);
547 void WebSettingsImpl::setAccelerated2dCanvasMSAASampleCount(int count
)
549 m_settings
->setAccelerated2dCanvasMSAASampleCount(count
);
552 void WebSettingsImpl::setAntialiased2dCanvasEnabled(bool enabled
)
554 m_settings
->setAntialiased2dCanvasEnabled(enabled
);
557 void WebSettingsImpl::setAntialiasedClips2dCanvasEnabled(bool enabled
)
559 m_settings
->setAntialiasedClips2dCanvasEnabled(enabled
);
562 void WebSettingsImpl::setPreferCompositingToLCDTextEnabled(bool enabled
)
564 m_devToolsEmulator
->setPreferCompositingToLCDTextEnabled(enabled
);
567 void WebSettingsImpl::setMinimumAccelerated2dCanvasSize(int numPixels
)
569 m_settings
->setMinimumAccelerated2dCanvasSize(numPixels
);
572 void WebSettingsImpl::setHyperlinkAuditingEnabled(bool enabled
)
574 m_settings
->setHyperlinkAuditingEnabled(enabled
);
577 void WebSettingsImpl::setAsynchronousSpellCheckingEnabled(bool enabled
)
579 m_settings
->setAsynchronousSpellCheckingEnabled(enabled
);
582 void WebSettingsImpl::setAutoplayExperimentMode(const WebString
& mode
)
584 m_settings
->setAutoplayExperimentMode(mode
);
587 void WebSettingsImpl::setUnifiedTextCheckerEnabled(bool enabled
)
589 m_settings
->setUnifiedTextCheckerEnabled(enabled
);
592 void WebSettingsImpl::setCaretBrowsingEnabled(bool enabled
)
594 m_settings
->setCaretBrowsingEnabled(enabled
);
597 void WebSettingsImpl::setValidationMessageTimerMagnification(int newValue
)
599 m_settings
->setValidationMessageTimerMagnification(newValue
);
602 void WebSettingsImpl::setAllowDisplayOfInsecureContent(bool enabled
)
604 m_settings
->setAllowDisplayOfInsecureContent(enabled
);
607 void WebSettingsImpl::setAllowRunningOfInsecureContent(bool enabled
)
609 m_settings
->setAllowRunningOfInsecureContent(enabled
);
612 void WebSettingsImpl::setDisableReadingFromCanvas(bool enabled
)
614 m_settings
->setDisableReadingFromCanvas(enabled
);
617 void WebSettingsImpl::setStrictMixedContentChecking(bool enabled
)
619 m_settings
->setStrictMixedContentChecking(enabled
);
622 void WebSettingsImpl::setStrictMixedContentCheckingForPlugin(bool enabled
)
624 m_settings
->setStrictMixedContentCheckingForPlugin(enabled
);
627 void WebSettingsImpl::setStrictPowerfulFeatureRestrictions(bool enabled
)
629 m_settings
->setStrictPowerfulFeatureRestrictions(enabled
);
632 void WebSettingsImpl::setStrictlyBlockBlockableMixedContent(bool enabled
)
634 m_settings
->setStrictlyBlockBlockableMixedContent(enabled
);
637 void WebSettingsImpl::setPasswordEchoEnabled(bool flag
)
639 m_settings
->setPasswordEchoEnabled(flag
);
642 void WebSettingsImpl::setPasswordEchoDurationInSeconds(double durationInSeconds
)
644 m_settings
->setPasswordEchoDurationInSeconds(durationInSeconds
);
647 void WebSettingsImpl::setPerTilePaintingEnabled(bool enabled
)
649 m_perTilePaintingEnabled
= enabled
;
652 void WebSettingsImpl::setShouldPrintBackgrounds(bool enabled
)
654 m_settings
->setShouldPrintBackgrounds(enabled
);
657 void WebSettingsImpl::setShouldClearDocumentBackground(bool enabled
)
659 m_settings
->setShouldClearDocumentBackground(enabled
);
662 void WebSettingsImpl::setEnableScrollAnimator(bool enabled
)
664 m_settings
->setScrollAnimatorEnabled(enabled
);
667 void WebSettingsImpl::setEnableTouchAdjustment(bool enabled
)
669 m_settings
->setTouchAdjustmentEnabled(enabled
);
672 bool WebSettingsImpl::multiTargetTapNotificationEnabled()
674 return m_settings
->multiTargetTapNotificationEnabled();
677 void WebSettingsImpl::setMultiTargetTapNotificationEnabled(bool enabled
)
679 m_settings
->setMultiTargetTapNotificationEnabled(enabled
);
682 bool WebSettingsImpl::viewportEnabled() const
684 return m_settings
->viewportEnabled();
687 bool WebSettingsImpl::viewportMetaEnabled() const
689 return m_settings
->viewportMetaEnabled();
692 bool WebSettingsImpl::doubleTapToZoomEnabled() const
694 return m_devToolsEmulator
->doubleTapToZoomEnabled();
697 bool WebSettingsImpl::mockGestureTapHighlightsEnabled() const
699 return m_settings
->mockGestureTapHighlightsEnabled();
702 bool WebSettingsImpl::mainFrameResizesAreOrientationChanges() const
704 return m_mainFrameResizesAreOrientationChanges
;
707 bool WebSettingsImpl::shrinksViewportContentToFit() const
709 return m_shrinksViewportContentToFit
;
712 void WebSettingsImpl::setShouldRespectImageOrientation(bool enabled
)
714 m_settings
->setShouldRespectImageOrientation(enabled
);
717 void WebSettingsImpl::setMediaControlsOverlayPlayButtonEnabled(bool enabled
)
719 m_settings
->setMediaControlsOverlayPlayButtonEnabled(enabled
);
722 void WebSettingsImpl::setMediaPlaybackRequiresUserGesture(bool required
)
724 m_settings
->setMediaPlaybackRequiresUserGesture(required
);
727 void WebSettingsImpl::setViewportEnabled(bool enabled
)
729 m_settings
->setViewportEnabled(enabled
);
732 void WebSettingsImpl::setViewportMetaEnabled(bool enabled
)
734 m_settings
->setViewportMetaEnabled(enabled
);
737 void WebSettingsImpl::setSyncXHRInDocumentsEnabled(bool enabled
)
739 m_settings
->setSyncXHRInDocumentsEnabled(enabled
);
742 void WebSettingsImpl::setCookieEnabled(bool enabled
)
744 m_settings
->setCookieEnabled(enabled
);
747 void WebSettingsImpl::setNavigateOnDragDrop(bool enabled
)
749 m_settings
->setNavigateOnDragDrop(enabled
);
752 void WebSettingsImpl::setAllowCustomScrollbarInMainFrame(bool enabled
)
754 m_settings
->setAllowCustomScrollbarInMainFrame(enabled
);
757 void WebSettingsImpl::setSelectTrailingWhitespaceEnabled(bool enabled
)
759 m_settings
->setSelectTrailingWhitespaceEnabled(enabled
);
762 void WebSettingsImpl::setSelectionIncludesAltImageText(bool enabled
)
764 m_settings
->setSelectionIncludesAltImageText(enabled
);
767 void WebSettingsImpl::setSelectionStrategy(SelectionStrategyType strategy
)
769 m_settings
->setSelectionStrategy(static_cast<SelectionStrategy
>(strategy
));
773 void WebSettingsImpl::setSmartInsertDeleteEnabled(bool enabled
)
775 m_settings
->setSmartInsertDeleteEnabled(enabled
);
778 void WebSettingsImpl::setPinchOverlayScrollbarThickness(int thickness
)
780 m_settings
->setPinchOverlayScrollbarThickness(thickness
);
783 void WebSettingsImpl::setUseSolidColorScrollbars(bool enabled
)
785 m_settings
->setUseSolidColorScrollbars(enabled
);
788 void WebSettingsImpl::setMainFrameResizesAreOrientationChanges(bool enabled
)
790 m_mainFrameResizesAreOrientationChanges
= enabled
;
793 void WebSettingsImpl::setV8CacheOptions(V8CacheOptions options
)
795 m_settings
->setV8CacheOptions(static_cast<blink::V8CacheOptions
>(options
));
798 void WebSettingsImpl::setUseMobileViewportStyle(bool enabled
)
800 m_devToolsEmulator
->setUseMobileViewportStyle(enabled
);
803 void WebSettingsImpl::setHidePinchScrollbarsNearMinScale(bool enabled
)
805 m_devToolsEmulator
->setHidePinchScrollbarsNearMinScale(enabled
);