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