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