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