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