Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index 72705a74854f0b8a1758496e4ffd8843d923b3b9..67b6198dd78b7e1c3a754718ac7ba3d0c891c2ba 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -762,7 +762,7 @@ void RenderViewImpl::Initialize(const ViewMsg_New_Params& params, |
webview()->settings()->setRootLayerScrolls( |
command_line.HasSwitch(switches::kRootLayerScrolls)); |
- ApplyWebPreferences(webkit_preferences_, webview()); |
+ ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_); |
if (switches::IsTouchDragDropEnabled()) |
webview()->settings()->setTouchDragDropEnabled(true); |
@@ -1507,6 +1507,19 @@ void RenderViewImpl::SendUpdateState(HistoryEntry* entry) { |
routing_id_, page_id_, HistoryEntryToPageState(entry))); |
} |
+void RenderViewImpl::ApplyWebPreferencesInternal( |
+ const WebPreferences& prefs, |
+ blink::WebView* web_view, |
+ CompositorDependencies* compositor_deps) { |
+ ApplyWebPreferences(prefs, web_view); |
+#if defined(OS_MACOSX) && !defined(OS_IOS) |
+ DCHECK(compositor_deps); |
+ bool is_elastic_overscroll_enabled = |
+ compositor_deps->IsElasticOverscrollEnabled(); |
+ web_view->settings()->setReportWheelOverscroll(is_elastic_overscroll_enabled); |
+#endif |
+} |
+ |
bool RenderViewImpl::SendAndRunNestedMessageLoop(IPC::SyncMessage* message) { |
// Before WebKit asks us to show an alert (etc.), it takes care of doing the |
// equivalent of WebView::willEnterModalLoop. In the case of showModalDialog |
@@ -2650,7 +2663,7 @@ void RenderViewImpl::OnDragSourceSystemDragEnded() { |
void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) { |
webkit_preferences_ = prefs; |
- ApplyWebPreferences(webkit_preferences_, webview()); |
+ ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_); |
} |
void RenderViewImpl::OnEnumerateDirectoryResponse( |