• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2009 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met:
7  *
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
13  * distribution.
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.
17  *
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.
29  */
30 
31 #include "config.h"
32 #include "web/WebSettingsImpl.h"
33 
34 #include "core/frame/Settings.h"
35 #include "core/inspector/InspectorController.h"
36 #include "platform/graphics/DeferredImageDecoder.h"
37 
38 #include "public/platform/WebString.h"
39 #include "public/platform/WebURL.h"
40 
41 namespace blink {
42 
WebSettingsImpl(Settings * settings,InspectorController * inspectorController)43 WebSettingsImpl::WebSettingsImpl(Settings* settings, InspectorController* inspectorController)
44     : m_settings(settings)
45     , m_inspectorController(inspectorController)
46     , m_showFPSCounter(false)
47     , m_showPaintRects(false)
48     , m_renderVSyncNotificationEnabled(false)
49     , m_autoZoomFocusedNodeToLegibleScale(false)
50     , m_deferredImageDecodingEnabled(false)
51     , m_doubleTapToZoomEnabled(false)
52     , m_supportDeprecatedTargetDensityDPI(false)
53     , m_shrinksViewportContentToFit(false)
54     , m_viewportMetaLayoutSizeQuirk(false)
55     , m_viewportMetaNonUserScalableQuirk(false)
56     , m_clobberUserAgentInitialScaleQuirk(false)
57     , m_mainFrameResizesAreOrientationChanges(false)
58 {
59     ASSERT(settings);
60 }
61 
setStandardFontFamily(const WebString & font,UScriptCode script)62 void WebSettingsImpl::setStandardFontFamily(const WebString& font, UScriptCode script)
63 {
64     if (m_settings->genericFontFamilySettings().updateStandard(font, script))
65         m_settings->notifyGenericFontFamilyChange();
66 }
67 
setFixedFontFamily(const WebString & font,UScriptCode script)68 void WebSettingsImpl::setFixedFontFamily(const WebString& font, UScriptCode script)
69 {
70     if (m_settings->genericFontFamilySettings().updateFixed(font, script))
71         m_settings->notifyGenericFontFamilyChange();
72 }
73 
setForceZeroLayoutHeight(bool enabled)74 void WebSettingsImpl::setForceZeroLayoutHeight(bool enabled)
75 {
76     m_settings->setForceZeroLayoutHeight(enabled);
77 }
78 
setFullscreenSupported(bool enabled)79 void WebSettingsImpl::setFullscreenSupported(bool enabled)
80 {
81     m_settings->setFullscreenSupported(enabled);
82 }
83 
setSerifFontFamily(const WebString & font,UScriptCode script)84 void WebSettingsImpl::setSerifFontFamily(const WebString& font, UScriptCode script)
85 {
86     if (m_settings->genericFontFamilySettings().updateSerif(font, script))
87         m_settings->notifyGenericFontFamilyChange();
88 }
89 
setSansSerifFontFamily(const WebString & font,UScriptCode script)90 void WebSettingsImpl::setSansSerifFontFamily(const WebString& font, UScriptCode script)
91 {
92     if (m_settings->genericFontFamilySettings().updateSansSerif(font, script))
93         m_settings->notifyGenericFontFamilyChange();
94 }
95 
setCursiveFontFamily(const WebString & font,UScriptCode script)96 void WebSettingsImpl::setCursiveFontFamily(const WebString& font, UScriptCode script)
97 {
98     if (m_settings->genericFontFamilySettings().updateCursive(font, script))
99         m_settings->notifyGenericFontFamilyChange();
100 }
101 
setFantasyFontFamily(const WebString & font,UScriptCode script)102 void WebSettingsImpl::setFantasyFontFamily(const WebString& font, UScriptCode script)
103 {
104     if (m_settings->genericFontFamilySettings().updateFantasy(font, script))
105         m_settings->notifyGenericFontFamilyChange();
106 }
107 
setPictographFontFamily(const WebString & font,UScriptCode script)108 void WebSettingsImpl::setPictographFontFamily(const WebString& font, UScriptCode script)
109 {
110     if (m_settings->genericFontFamilySettings().updatePictograph(font, script))
111         m_settings->notifyGenericFontFamilyChange();
112 }
113 
setDefaultFontSize(int size)114 void WebSettingsImpl::setDefaultFontSize(int size)
115 {
116     m_settings->setDefaultFontSize(size);
117 }
118 
setDefaultFixedFontSize(int size)119 void WebSettingsImpl::setDefaultFixedFontSize(int size)
120 {
121     m_settings->setDefaultFixedFontSize(size);
122 }
123 
setDefaultVideoPosterURL(const WebString & url)124 void WebSettingsImpl::setDefaultVideoPosterURL(const WebString& url)
125 {
126     m_settings->setDefaultVideoPosterURL(url);
127 }
128 
setMinimumFontSize(int size)129 void WebSettingsImpl::setMinimumFontSize(int size)
130 {
131     m_settings->setMinimumFontSize(size);
132 }
133 
setMinimumLogicalFontSize(int size)134 void WebSettingsImpl::setMinimumLogicalFontSize(int size)
135 {
136     m_settings->setMinimumLogicalFontSize(size);
137 }
138 
setDeviceSupportsTouch(bool deviceSupportsTouch)139 void WebSettingsImpl::setDeviceSupportsTouch(bool deviceSupportsTouch)
140 {
141     m_settings->setDeviceSupportsTouch(deviceSupportsTouch);
142 
143     // FIXME: Until the embedder is converted to using the new APIs, set them
144     // here to keep the media queries working unchanged.
145     if (deviceSupportsTouch) {
146         m_settings->setPrimaryPointerType(blink::PointerTypeCoarse);
147         m_settings->setPrimaryHoverType(blink::HoverTypeOnDemand);
148     } else {
149         m_settings->setPrimaryPointerType(blink::PointerTypeNone);
150         m_settings->setPrimaryHoverType(blink::HoverTypeNone);
151     }
152 }
153 
setDeviceSupportsMouse(bool deviceSupportsMouse)154 void WebSettingsImpl::setDeviceSupportsMouse(bool deviceSupportsMouse)
155 {
156     m_settings->setDeviceSupportsMouse(deviceSupportsMouse);
157 }
158 
setAutoZoomFocusedNodeToLegibleScale(bool autoZoomFocusedNodeToLegibleScale)159 void WebSettingsImpl::setAutoZoomFocusedNodeToLegibleScale(bool autoZoomFocusedNodeToLegibleScale)
160 {
161     m_autoZoomFocusedNodeToLegibleScale = autoZoomFocusedNodeToLegibleScale;
162 }
163 
setTextAutosizingEnabled(bool enabled)164 void WebSettingsImpl::setTextAutosizingEnabled(bool enabled)
165 {
166     m_inspectorController->setTextAutosizingEnabled(enabled);
167 }
168 
setAccessibilityFontScaleFactor(float fontScaleFactor)169 void WebSettingsImpl::setAccessibilityFontScaleFactor(float fontScaleFactor)
170 {
171     m_settings->setAccessibilityFontScaleFactor(fontScaleFactor);
172 }
173 
setAccessibilityEnabled(bool enabled)174 void WebSettingsImpl::setAccessibilityEnabled(bool enabled)
175 {
176     m_settings->setAccessibilityEnabled(enabled);
177 }
178 
setInlineTextBoxAccessibilityEnabled(bool enabled)179 void WebSettingsImpl::setInlineTextBoxAccessibilityEnabled(bool enabled)
180 {
181     m_settings->setInlineTextBoxAccessibilityEnabled(enabled);
182 }
183 
setDeviceScaleAdjustment(float deviceScaleAdjustment)184 void WebSettingsImpl::setDeviceScaleAdjustment(float deviceScaleAdjustment)
185 {
186     m_inspectorController->setDeviceScaleAdjustment(deviceScaleAdjustment);
187 }
188 
setDefaultTextEncodingName(const WebString & encoding)189 void WebSettingsImpl::setDefaultTextEncodingName(const WebString& encoding)
190 {
191     m_settings->setDefaultTextEncodingName((String)encoding);
192 }
193 
setJavaScriptEnabled(bool enabled)194 void WebSettingsImpl::setJavaScriptEnabled(bool enabled)
195 {
196     m_settings->setScriptEnabled(enabled);
197 }
198 
setWebSecurityEnabled(bool enabled)199 void WebSettingsImpl::setWebSecurityEnabled(bool enabled)
200 {
201     m_settings->setWebSecurityEnabled(enabled);
202 }
203 
setJavaScriptCanOpenWindowsAutomatically(bool canOpenWindows)204 void WebSettingsImpl::setJavaScriptCanOpenWindowsAutomatically(bool canOpenWindows)
205 {
206     m_settings->setJavaScriptCanOpenWindowsAutomatically(canOpenWindows);
207 }
208 
setSupportDeprecatedTargetDensityDPI(bool supportDeprecatedTargetDensityDPI)209 void WebSettingsImpl::setSupportDeprecatedTargetDensityDPI(bool supportDeprecatedTargetDensityDPI)
210 {
211     m_supportDeprecatedTargetDensityDPI = supportDeprecatedTargetDensityDPI;
212 }
213 
setViewportMetaLayoutSizeQuirk(bool viewportMetaLayoutSizeQuirk)214 void WebSettingsImpl::setViewportMetaLayoutSizeQuirk(bool viewportMetaLayoutSizeQuirk)
215 {
216     m_viewportMetaLayoutSizeQuirk = viewportMetaLayoutSizeQuirk;
217 }
218 
setViewportMetaMergeContentQuirk(bool viewportMetaMergeContentQuirk)219 void WebSettingsImpl::setViewportMetaMergeContentQuirk(bool viewportMetaMergeContentQuirk)
220 {
221     m_settings->setViewportMetaMergeContentQuirk(viewportMetaMergeContentQuirk);
222 }
223 
setViewportMetaNonUserScalableQuirk(bool viewportMetaNonUserScalableQuirk)224 void WebSettingsImpl::setViewportMetaNonUserScalableQuirk(bool viewportMetaNonUserScalableQuirk)
225 {
226     m_viewportMetaNonUserScalableQuirk = viewportMetaNonUserScalableQuirk;
227 }
228 
setViewportMetaZeroValuesQuirk(bool viewportMetaZeroValuesQuirk)229 void WebSettingsImpl::setViewportMetaZeroValuesQuirk(bool viewportMetaZeroValuesQuirk)
230 {
231     m_settings->setViewportMetaZeroValuesQuirk(viewportMetaZeroValuesQuirk);
232 }
233 
setIgnoreMainFrameOverflowHiddenQuirk(bool ignoreMainFrameOverflowHiddenQuirk)234 void WebSettingsImpl::setIgnoreMainFrameOverflowHiddenQuirk(bool ignoreMainFrameOverflowHiddenQuirk)
235 {
236     m_settings->setIgnoreMainFrameOverflowHiddenQuirk(ignoreMainFrameOverflowHiddenQuirk);
237 }
238 
setReportScreenSizeInPhysicalPixelsQuirk(bool reportScreenSizeInPhysicalPixelsQuirk)239 void WebSettingsImpl::setReportScreenSizeInPhysicalPixelsQuirk(bool reportScreenSizeInPhysicalPixelsQuirk)
240 {
241     m_settings->setReportScreenSizeInPhysicalPixelsQuirk(reportScreenSizeInPhysicalPixelsQuirk);
242 }
243 
setClobberUserAgentInitialScaleQuirk(bool clobberUserAgentInitialScaleQuirk)244 void WebSettingsImpl::setClobberUserAgentInitialScaleQuirk(bool clobberUserAgentInitialScaleQuirk)
245 {
246     m_clobberUserAgentInitialScaleQuirk = clobberUserAgentInitialScaleQuirk;
247 }
248 
setSupportsMultipleWindows(bool supportsMultipleWindows)249 void WebSettingsImpl::setSupportsMultipleWindows(bool supportsMultipleWindows)
250 {
251     m_settings->setSupportsMultipleWindows(supportsMultipleWindows);
252 }
253 
setLoadsImagesAutomatically(bool loadsImagesAutomatically)254 void WebSettingsImpl::setLoadsImagesAutomatically(bool loadsImagesAutomatically)
255 {
256     m_settings->setLoadsImagesAutomatically(loadsImagesAutomatically);
257 }
258 
setImagesEnabled(bool enabled)259 void WebSettingsImpl::setImagesEnabled(bool enabled)
260 {
261     m_settings->setImagesEnabled(enabled);
262 }
263 
setLoadWithOverviewMode(bool enabled)264 void WebSettingsImpl::setLoadWithOverviewMode(bool enabled)
265 {
266     m_settings->setLoadWithOverviewMode(enabled);
267 }
268 
setPluginsEnabled(bool enabled)269 void WebSettingsImpl::setPluginsEnabled(bool enabled)
270 {
271     m_settings->setPluginsEnabled(enabled);
272 }
273 
setAvailablePointerTypes(int pointers)274 void WebSettingsImpl::setAvailablePointerTypes(int pointers)
275 {
276     m_settings->setAvailablePointerTypes(pointers);
277 }
278 
setPrimaryPointerType(PointerType pointer)279 void WebSettingsImpl::setPrimaryPointerType(PointerType pointer)
280 {
281     m_settings->setPrimaryPointerType(static_cast<blink::PointerType>(pointer));
282 }
283 
setAvailableHoverTypes(int types)284 void WebSettingsImpl::setAvailableHoverTypes(int types)
285 {
286     m_settings->setAvailableHoverTypes(types);
287 }
288 
setPrimaryHoverType(HoverType type)289 void WebSettingsImpl::setPrimaryHoverType(HoverType type)
290 {
291     m_settings->setPrimaryHoverType(static_cast<blink::HoverType>(type));
292 }
293 
setDOMPasteAllowed(bool enabled)294 void WebSettingsImpl::setDOMPasteAllowed(bool enabled)
295 {
296     m_settings->setDOMPasteAllowed(enabled);
297 }
298 
setShrinksStandaloneImagesToFit(bool shrinkImages)299 void WebSettingsImpl::setShrinksStandaloneImagesToFit(bool shrinkImages)
300 {
301     m_settings->setShrinksStandaloneImagesToFit(shrinkImages);
302 }
303 
setShrinksViewportContentToFit(bool shrinkViewportContent)304 void WebSettingsImpl::setShrinksViewportContentToFit(bool shrinkViewportContent)
305 {
306     m_shrinksViewportContentToFit = shrinkViewportContent;
307 }
308 
setSpatialNavigationEnabled(bool enabled)309 void WebSettingsImpl::setSpatialNavigationEnabled(bool enabled)
310 {
311     m_settings->setSpatialNavigationEnabled(enabled);
312 }
313 
setUsesEncodingDetector(bool usesDetector)314 void WebSettingsImpl::setUsesEncodingDetector(bool usesDetector)
315 {
316     m_settings->setUsesEncodingDetector(usesDetector);
317 }
318 
setTextAreasAreResizable(bool areResizable)319 void WebSettingsImpl::setTextAreasAreResizable(bool areResizable)
320 {
321     m_settings->setTextAreasAreResizable(areResizable);
322 }
323 
setJavaEnabled(bool enabled)324 void WebSettingsImpl::setJavaEnabled(bool enabled)
325 {
326     m_settings->setJavaEnabled(enabled);
327 }
328 
setAllowScriptsToCloseWindows(bool allow)329 void WebSettingsImpl::setAllowScriptsToCloseWindows(bool allow)
330 {
331     m_settings->setAllowScriptsToCloseWindows(allow);
332 }
333 
setUseLegacyBackgroundSizeShorthandBehavior(bool useLegacyBackgroundSizeShorthandBehavior)334 void WebSettingsImpl::setUseLegacyBackgroundSizeShorthandBehavior(bool useLegacyBackgroundSizeShorthandBehavior)
335 {
336     m_settings->setUseLegacyBackgroundSizeShorthandBehavior(useLegacyBackgroundSizeShorthandBehavior);
337 }
338 
setWideViewportQuirkEnabled(bool wideViewportQuirkEnabled)339 void WebSettingsImpl::setWideViewportQuirkEnabled(bool wideViewportQuirkEnabled)
340 {
341     m_settings->setWideViewportQuirkEnabled(wideViewportQuirkEnabled);
342 }
343 
setUseWideViewport(bool useWideViewport)344 void WebSettingsImpl::setUseWideViewport(bool useWideViewport)
345 {
346     m_settings->setUseWideViewport(useWideViewport);
347 }
348 
setDoubleTapToZoomEnabled(bool doubleTapToZoomEnabled)349 void WebSettingsImpl::setDoubleTapToZoomEnabled(bool doubleTapToZoomEnabled)
350 {
351     m_doubleTapToZoomEnabled = doubleTapToZoomEnabled;
352 }
353 
setDownloadableBinaryFontsEnabled(bool enabled)354 void WebSettingsImpl::setDownloadableBinaryFontsEnabled(bool enabled)
355 {
356     m_settings->setDownloadableBinaryFontsEnabled(enabled);
357 }
358 
setJavaScriptCanAccessClipboard(bool enabled)359 void WebSettingsImpl::setJavaScriptCanAccessClipboard(bool enabled)
360 {
361     m_settings->setJavaScriptCanAccessClipboard(enabled);
362 }
363 
setXSSAuditorEnabled(bool enabled)364 void WebSettingsImpl::setXSSAuditorEnabled(bool enabled)
365 {
366     m_settings->setXSSAuditorEnabled(enabled);
367 }
368 
setUnsafePluginPastingEnabled(bool enabled)369 void WebSettingsImpl::setUnsafePluginPastingEnabled(bool enabled)
370 {
371     m_settings->setUnsafePluginPastingEnabled(enabled);
372 }
373 
setDNSPrefetchingEnabled(bool enabled)374 void WebSettingsImpl::setDNSPrefetchingEnabled(bool enabled)
375 {
376     m_settings->setDNSPrefetchingEnabled(enabled);
377 }
378 
setLocalStorageEnabled(bool enabled)379 void WebSettingsImpl::setLocalStorageEnabled(bool enabled)
380 {
381     m_settings->setLocalStorageEnabled(enabled);
382 }
383 
setMainFrameClipsContent(bool enabled)384 void WebSettingsImpl::setMainFrameClipsContent(bool enabled)
385 {
386     m_settings->setMainFrameClipsContent(enabled);
387 }
388 
setMaxTouchPoints(int maxTouchPoints)389 void WebSettingsImpl::setMaxTouchPoints(int maxTouchPoints)
390 {
391     m_settings->setMaxTouchPoints(maxTouchPoints);
392 }
393 
setAllowUniversalAccessFromFileURLs(bool allow)394 void WebSettingsImpl::setAllowUniversalAccessFromFileURLs(bool allow)
395 {
396     m_settings->setAllowUniversalAccessFromFileURLs(allow);
397 }
398 
setAllowFileAccessFromFileURLs(bool allow)399 void WebSettingsImpl::setAllowFileAccessFromFileURLs(bool allow)
400 {
401     m_settings->setAllowFileAccessFromFileURLs(allow);
402 }
403 
setThreadedScrollingEnabled(bool enabled)404 void WebSettingsImpl::setThreadedScrollingEnabled(bool enabled)
405 {
406     m_settings->setThreadedScrollingEnabled(enabled);
407 }
408 
setTouchDragDropEnabled(bool enabled)409 void WebSettingsImpl::setTouchDragDropEnabled(bool enabled)
410 {
411     m_settings->setTouchDragDropEnabled(enabled);
412 }
413 
setTouchEditingEnabled(bool enabled)414 void WebSettingsImpl::setTouchEditingEnabled(bool enabled)
415 {
416     m_settings->setTouchEditingEnabled(enabled);
417 }
418 
setOfflineWebApplicationCacheEnabled(bool enabled)419 void WebSettingsImpl::setOfflineWebApplicationCacheEnabled(bool enabled)
420 {
421     m_settings->setOfflineWebApplicationCacheEnabled(enabled);
422 }
423 
setWebAudioEnabled(bool enabled)424 void WebSettingsImpl::setWebAudioEnabled(bool enabled)
425 {
426     m_settings->setWebAudioEnabled(enabled);
427 }
428 
setExperimentalWebGLEnabled(bool enabled)429 void WebSettingsImpl::setExperimentalWebGLEnabled(bool enabled)
430 {
431     m_settings->setWebGLEnabled(enabled);
432 }
433 
setRegionBasedColumnsEnabled(bool enabled)434 void WebSettingsImpl::setRegionBasedColumnsEnabled(bool enabled)
435 {
436     m_settings->setRegionBasedColumnsEnabled(enabled);
437 }
438 
setOpenGLMultisamplingEnabled(bool enabled)439 void WebSettingsImpl::setOpenGLMultisamplingEnabled(bool enabled)
440 {
441     m_settings->setOpenGLMultisamplingEnabled(enabled);
442 }
443 
setRenderVSyncNotificationEnabled(bool enabled)444 void WebSettingsImpl::setRenderVSyncNotificationEnabled(bool enabled)
445 {
446     m_renderVSyncNotificationEnabled = enabled;
447 }
448 
setWebGLErrorsToConsoleEnabled(bool enabled)449 void WebSettingsImpl::setWebGLErrorsToConsoleEnabled(bool enabled)
450 {
451     m_settings->setWebGLErrorsToConsoleEnabled(enabled);
452 }
453 
setShowFPSCounter(bool show)454 void WebSettingsImpl::setShowFPSCounter(bool show)
455 {
456     m_showFPSCounter = show;
457 }
458 
setShowPaintRects(bool show)459 void WebSettingsImpl::setShowPaintRects(bool show)
460 {
461     m_showPaintRects = show;
462 }
463 
setEditingBehavior(EditingBehavior behavior)464 void WebSettingsImpl::setEditingBehavior(EditingBehavior behavior)
465 {
466     m_settings->setEditingBehaviorType(static_cast<EditingBehaviorType>(behavior));
467 }
468 
setAcceleratedCompositingEnabled(bool enabled)469 void WebSettingsImpl::setAcceleratedCompositingEnabled(bool enabled)
470 {
471     m_settings->setAcceleratedCompositingEnabled(enabled);
472 }
473 
setMockScrollbarsEnabled(bool enabled)474 void WebSettingsImpl::setMockScrollbarsEnabled(bool enabled)
475 {
476     m_settings->setMockScrollbarsEnabled(enabled);
477 }
478 
setMockGestureTapHighlightsEnabled(bool enabled)479 void WebSettingsImpl::setMockGestureTapHighlightsEnabled(bool enabled)
480 {
481     m_settings->setMockGestureTapHighlightsEnabled(enabled);
482 }
483 
setAccelerated2dCanvasEnabled(bool enabled)484 void WebSettingsImpl::setAccelerated2dCanvasEnabled(bool enabled)
485 {
486     m_settings->setAccelerated2dCanvasEnabled(enabled);
487 }
488 
setAccelerated2dCanvasMSAASampleCount(int count)489 void WebSettingsImpl::setAccelerated2dCanvasMSAASampleCount(int count)
490 {
491     m_settings->setAccelerated2dCanvasMSAASampleCount(count);
492 }
493 
setAntialiased2dCanvasEnabled(bool enabled)494 void WebSettingsImpl::setAntialiased2dCanvasEnabled(bool enabled)
495 {
496     m_settings->setAntialiased2dCanvasEnabled(enabled);
497 }
498 
setContainerCullingEnabled(bool enabled)499 void WebSettingsImpl::setContainerCullingEnabled(bool enabled)
500 {
501     m_settings->setContainerCullingEnabled(enabled);
502 }
503 
setDeferredImageDecodingEnabled(bool enabled)504 void WebSettingsImpl::setDeferredImageDecodingEnabled(bool enabled)
505 {
506     DeferredImageDecoder::setEnabled(enabled);
507     m_deferredImageDecodingEnabled = enabled;
508 }
509 
setDeferredFiltersEnabled(bool enabled)510 void WebSettingsImpl::setDeferredFiltersEnabled(bool enabled)
511 {
512     m_settings->setDeferredFiltersEnabled(enabled);
513 }
514 
setPreferCompositingToLCDTextEnabled(bool enabled)515 void WebSettingsImpl::setPreferCompositingToLCDTextEnabled(bool enabled)
516 {
517     m_inspectorController->setPreferCompositingToLCDTextEnabled(enabled);
518 }
519 
setMinimumAccelerated2dCanvasSize(int numPixels)520 void WebSettingsImpl::setMinimumAccelerated2dCanvasSize(int numPixels)
521 {
522     m_settings->setMinimumAccelerated2dCanvasSize(numPixels);
523 }
524 
setHyperlinkAuditingEnabled(bool enabled)525 void WebSettingsImpl::setHyperlinkAuditingEnabled(bool enabled)
526 {
527     m_settings->setHyperlinkAuditingEnabled(enabled);
528 }
529 
setLayerSquashingEnabled(bool enabled)530 void WebSettingsImpl::setLayerSquashingEnabled(bool enabled)
531 {
532     m_settings->setLayerSquashingEnabled(enabled);
533 }
534 
setAsynchronousSpellCheckingEnabled(bool enabled)535 void WebSettingsImpl::setAsynchronousSpellCheckingEnabled(bool enabled)
536 {
537     m_settings->setAsynchronousSpellCheckingEnabled(enabled);
538 }
539 
setUnifiedTextCheckerEnabled(bool enabled)540 void WebSettingsImpl::setUnifiedTextCheckerEnabled(bool enabled)
541 {
542     m_settings->setUnifiedTextCheckerEnabled(enabled);
543 }
544 
setCaretBrowsingEnabled(bool enabled)545 void WebSettingsImpl::setCaretBrowsingEnabled(bool enabled)
546 {
547     m_settings->setCaretBrowsingEnabled(enabled);
548 }
549 
setValidationMessageTimerMagnification(int newValue)550 void WebSettingsImpl::setValidationMessageTimerMagnification(int newValue)
551 {
552     m_settings->setValidationMessageTimerMagnification(newValue);
553 }
554 
setAllowDisplayOfInsecureContent(bool enabled)555 void WebSettingsImpl::setAllowDisplayOfInsecureContent(bool enabled)
556 {
557     m_settings->setAllowDisplayOfInsecureContent(enabled);
558 }
559 
setAllowRunningOfInsecureContent(bool enabled)560 void WebSettingsImpl::setAllowRunningOfInsecureContent(bool enabled)
561 {
562     m_settings->setAllowRunningOfInsecureContent(enabled);
563 }
564 
setAllowConnectingInsecureWebSocket(bool enabled)565 void WebSettingsImpl::setAllowConnectingInsecureWebSocket(bool enabled)
566 {
567     m_settings->setAllowConnectingInsecureWebSocket(enabled);
568 }
569 
setPasswordEchoEnabled(bool flag)570 void WebSettingsImpl::setPasswordEchoEnabled(bool flag)
571 {
572     m_settings->setPasswordEchoEnabled(flag);
573 }
574 
setPasswordEchoDurationInSeconds(double durationInSeconds)575 void WebSettingsImpl::setPasswordEchoDurationInSeconds(double durationInSeconds)
576 {
577     m_settings->setPasswordEchoDurationInSeconds(durationInSeconds);
578 }
579 
setPerTilePaintingEnabled(bool enabled)580 void WebSettingsImpl::setPerTilePaintingEnabled(bool enabled)
581 {
582     m_perTilePaintingEnabled = enabled;
583 }
584 
setShouldPrintBackgrounds(bool enabled)585 void WebSettingsImpl::setShouldPrintBackgrounds(bool enabled)
586 {
587     m_settings->setShouldPrintBackgrounds(enabled);
588 }
589 
setShouldClearDocumentBackground(bool enabled)590 void WebSettingsImpl::setShouldClearDocumentBackground(bool enabled)
591 {
592     m_settings->setShouldClearDocumentBackground(enabled);
593 }
594 
setEnableScrollAnimator(bool enabled)595 void WebSettingsImpl::setEnableScrollAnimator(bool enabled)
596 {
597     m_settings->setScrollAnimatorEnabled(enabled);
598 }
599 
setEnableTouchAdjustment(bool enabled)600 void WebSettingsImpl::setEnableTouchAdjustment(bool enabled)
601 {
602     m_settings->setTouchAdjustmentEnabled(enabled);
603 }
604 
availablePointerTypes() const605 int WebSettingsImpl::availablePointerTypes() const
606 {
607     return m_settings->availablePointerTypes();
608 }
609 
primaryPointerType() const610 WebSettings::PointerType WebSettingsImpl::primaryPointerType() const
611 {
612     return static_cast<PointerType>(m_settings->primaryPointerType());
613 }
614 
availableHoverTypes() const615 int WebSettingsImpl::availableHoverTypes() const
616 {
617     return m_settings->availableHoverTypes();
618 }
619 
primaryHoverType() const620 WebSettings::HoverType WebSettingsImpl::primaryHoverType() const
621 {
622     return static_cast<HoverType>(m_settings->primaryHoverType());
623 }
624 
viewportEnabled() const625 bool WebSettingsImpl::viewportEnabled() const
626 {
627     return m_settings->viewportEnabled();
628 }
629 
mockGestureTapHighlightsEnabled() const630 bool WebSettingsImpl::mockGestureTapHighlightsEnabled() const
631 {
632     return m_settings->mockGestureTapHighlightsEnabled();
633 }
634 
mainFrameResizesAreOrientationChanges() const635 bool WebSettingsImpl::mainFrameResizesAreOrientationChanges() const
636 {
637     return m_mainFrameResizesAreOrientationChanges;
638 }
639 
shrinksViewportContentToFit() const640 bool WebSettingsImpl::shrinksViewportContentToFit() const
641 {
642     return m_shrinksViewportContentToFit;
643 }
644 
setShouldRespectImageOrientation(bool enabled)645 void WebSettingsImpl::setShouldRespectImageOrientation(bool enabled)
646 {
647     m_settings->setShouldRespectImageOrientation(enabled);
648 }
649 
setMediaControlsOverlayPlayButtonEnabled(bool enabled)650 void WebSettingsImpl::setMediaControlsOverlayPlayButtonEnabled(bool enabled)
651 {
652     m_settings->setMediaControlsOverlayPlayButtonEnabled(enabled);
653 }
654 
setMediaPlaybackRequiresUserGesture(bool required)655 void WebSettingsImpl::setMediaPlaybackRequiresUserGesture(bool required)
656 {
657     m_settings->setMediaPlaybackRequiresUserGesture(required);
658 }
659 
setViewportEnabled(bool enabled)660 void WebSettingsImpl::setViewportEnabled(bool enabled)
661 {
662     m_settings->setViewportEnabled(enabled);
663 }
664 
setViewportMetaEnabled(bool enabled)665 void WebSettingsImpl::setViewportMetaEnabled(bool enabled)
666 {
667     m_settings->setViewportMetaEnabled(enabled);
668 }
669 
setSyncXHRInDocumentsEnabled(bool enabled)670 void WebSettingsImpl::setSyncXHRInDocumentsEnabled(bool enabled)
671 {
672     m_settings->setSyncXHRInDocumentsEnabled(enabled);
673 }
674 
setCookieEnabled(bool enabled)675 void WebSettingsImpl::setCookieEnabled(bool enabled)
676 {
677     m_settings->setCookieEnabled(enabled);
678 }
679 
setNavigateOnDragDrop(bool enabled)680 void WebSettingsImpl::setNavigateOnDragDrop(bool enabled)
681 {
682     m_settings->setNavigateOnDragDrop(enabled);
683 }
684 
setAllowCustomScrollbarInMainFrame(bool enabled)685 void WebSettingsImpl::setAllowCustomScrollbarInMainFrame(bool enabled)
686 {
687     m_settings->setAllowCustomScrollbarInMainFrame(enabled);
688 }
689 
setSelectTrailingWhitespaceEnabled(bool enabled)690 void WebSettingsImpl::setSelectTrailingWhitespaceEnabled(bool enabled)
691 {
692     m_settings->setSelectTrailingWhitespaceEnabled(enabled);
693 }
694 
setSelectionIncludesAltImageText(bool enabled)695 void WebSettingsImpl::setSelectionIncludesAltImageText(bool enabled)
696 {
697     m_settings->setSelectionIncludesAltImageText(enabled);
698 }
699 
setSmartInsertDeleteEnabled(bool enabled)700 void WebSettingsImpl::setSmartInsertDeleteEnabled(bool enabled)
701 {
702     m_settings->setSmartInsertDeleteEnabled(enabled);
703 }
704 
setPinchOverlayScrollbarThickness(int thickness)705 void WebSettingsImpl::setPinchOverlayScrollbarThickness(int thickness)
706 {
707     m_settings->setPinchOverlayScrollbarThickness(thickness);
708 }
709 
setPinchVirtualViewportEnabled(bool enabled)710 void WebSettingsImpl::setPinchVirtualViewportEnabled(bool enabled)
711 {
712     m_settings->setPinchVirtualViewportEnabled(enabled);
713 }
714 
setUseSolidColorScrollbars(bool enabled)715 void WebSettingsImpl::setUseSolidColorScrollbars(bool enabled)
716 {
717     m_settings->setUseSolidColorScrollbars(enabled);
718 }
719 
setMainFrameResizesAreOrientationChanges(bool enabled)720 void WebSettingsImpl::setMainFrameResizesAreOrientationChanges(bool enabled)
721 {
722     m_mainFrameResizesAreOrientationChanges = enabled;
723 }
724 
setDisallowFullscreenForNonMediaElements(bool enabled)725 void WebSettingsImpl::setDisallowFullscreenForNonMediaElements(bool enabled)
726 {
727     m_settings->setDisallowFullscreenForNonMediaElements(enabled);
728 }
729 
setV8CacheOptions(V8CacheOptions options)730 void WebSettingsImpl::setV8CacheOptions(V8CacheOptions options)
731 {
732     m_settings->setV8CacheOptions(static_cast<blink::V8CacheOptions>(options));
733 }
734 
setV8ScriptStreamingEnabled(bool enabled)735 void WebSettingsImpl::setV8ScriptStreamingEnabled(bool enabled)
736 {
737     m_settings->setV8ScriptStreamingEnabled(enabled);
738 }
739 
740 } // namespace blink
741