| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1056 settings->setSpatialNavigationEnabled(prefs.spatial_navigation_enabled); | 1056 settings->setSpatialNavigationEnabled(prefs.spatial_navigation_enabled); |
| 1057 | 1057 |
| 1058 settings->setSelectionIncludesAltImageText(true); | 1058 settings->setSelectionIncludesAltImageText(true); |
| 1059 | 1059 |
| 1060 settings->setV8CacheOptions( | 1060 settings->setV8CacheOptions( |
| 1061 static_cast<WebSettings::V8CacheOptions>(prefs.v8_cache_options)); | 1061 static_cast<WebSettings::V8CacheOptions>(prefs.v8_cache_options)); |
| 1062 | 1062 |
| 1063 settings->setImageAnimationPolicy( | 1063 settings->setImageAnimationPolicy( |
| 1064 static_cast<WebSettings::ImageAnimationPolicy>(prefs.animation_policy)); | 1064 static_cast<WebSettings::ImageAnimationPolicy>(prefs.animation_policy)); |
| 1065 | 1065 |
| 1066 settings->setPresentationRequiresUserGesture( |
| 1067 prefs.user_gesture_required_for_presentation); |
| 1068 |
| 1066 // Needs to happen before setIgnoreVIewportTagScaleLimits below. | 1069 // Needs to happen before setIgnoreVIewportTagScaleLimits below. |
| 1067 web_view->setDefaultPageScaleLimits( | 1070 web_view->setDefaultPageScaleLimits( |
| 1068 prefs.default_minimum_page_scale_factor, | 1071 prefs.default_minimum_page_scale_factor, |
| 1069 prefs.default_maximum_page_scale_factor); | 1072 prefs.default_maximum_page_scale_factor); |
| 1070 | 1073 |
| 1071 #if defined(OS_ANDROID) | 1074 #if defined(OS_ANDROID) |
| 1072 settings->setAllowCustomScrollbarInMainFrame(false); | 1075 settings->setAllowCustomScrollbarInMainFrame(false); |
| 1073 settings->setTextAutosizingEnabled(prefs.text_autosizing_enabled); | 1076 settings->setTextAutosizingEnabled(prefs.text_autosizing_enabled); |
| 1074 settings->setAccessibilityFontScaleFactor(prefs.font_scale_factor); | 1077 settings->setAccessibilityFontScaleFactor(prefs.font_scale_factor); |
| 1075 settings->setDeviceScaleAdjustment(prefs.device_scale_adjustment); | 1078 settings->setDeviceScaleAdjustment(prefs.device_scale_adjustment); |
| (...skipping 2456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3532 if (IsUseZoomForDSFEnabled()) { | 3535 if (IsUseZoomForDSFEnabled()) { |
| 3533 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3536 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 3534 } else { | 3537 } else { |
| 3535 webview()->setDeviceScaleFactor(device_scale_factor_); | 3538 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 3536 } | 3539 } |
| 3537 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3540 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 3538 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3541 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 3539 } | 3542 } |
| 3540 | 3543 |
| 3541 } // namespace content | 3544 } // namespace content |
| OLD | NEW |