| Index: content/browser/web_contents/web_contents_view_aura.cc
|
| diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
|
| index b416ceb1421c9adbae5d857f9f5d500540b25e53..235005970d7876a1338c1c517b2a09169b4613f5 100644
|
| --- a/content/browser/web_contents/web_contents_view_aura.cc
|
| +++ b/content/browser/web_contents/web_contents_view_aura.cc
|
| @@ -728,8 +728,12 @@ gfx::Vector2d WebContentsViewAura::GetTranslationForOverscroll(int delta_x,
|
| int delta_y) {
|
| if (current_overscroll_gesture_ == OVERSCROLL_NORTH ||
|
| current_overscroll_gesture_ == OVERSCROLL_SOUTH) {
|
| - // Ignore vertical overscroll.
|
| - return gfx::Vector2d();
|
| + // For vertical overscroll, always do a resisted drag.
|
| + const float threshold = GetOverscrollConfig(
|
| + OVERSCROLL_CONFIG_VERT_RESIST_AFTER);
|
| + int scroll = GetResistedScrollAmount(abs(delta_y),
|
| + static_cast<int>(threshold));
|
| + return gfx::Vector2d(0, delta_y < 0 ? -scroll : scroll);
|
| }
|
|
|
| // For horizontal overscroll, scroll freely if a navigation is possible. Do a
|
| @@ -841,9 +845,8 @@ RenderWidgetHostView* WebContentsViewAura::CreateViewForWidget(
|
|
|
| RenderWidgetHostImpl* host_impl =
|
| RenderWidgetHostImpl::From(render_widget_host);
|
| - if (host_impl->overscroll_controller() &&
|
| - (!web_contents_->GetDelegate() ||
|
| - web_contents_->GetDelegate()->CanOverscrollContent())) {
|
| + if (host_impl->overscroll_controller() && web_contents_->GetDelegate() &&
|
| + web_contents_->GetDelegate()->CanOverscrollContent()) {
|
| host_impl->overscroll_controller()->set_delegate(this);
|
| if (!navigation_overlay_.get())
|
| navigation_overlay_.reset(new OverscrollNavigationOverlay());
|
|
|