summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-16 18:22:52 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-16 18:22:52 +0000
commitff6db01ab96f207d36b9a23a164fba6ba9bf28e2 (patch)
tree9bf31aef4734823bf4e5c9d51a66532c260504b5
parenteb3e52cf67792aede12fd4dcff42d6e9ff83686d (diff)
downloadchromium_src-ff6db01ab96f207d36b9a23a164fba6ba9bf28e2.zip
chromium_src-ff6db01ab96f207d36b9a23a164fba6ba9bf28e2.tar.gz
chromium_src-ff6db01ab96f207d36b9a23a164fba6ba9bf28e2.tar.bz2
overscroll: Get rid of resisted horizontal scrolling.
BUG=181219 Review URL: https://codereview.chromium.org/12693013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188606 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/web_contents/web_contents_view_aura.cc21
1 files changed, 1 insertions, 20 deletions
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index cdc7ce8..1b23b7c 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -443,21 +443,6 @@ int ConvertAuraEventFlagsToWebInputEventModifiers(int aura_event_flags) {
return web_input_event_modifiers;
}
-// Given the scrolled amount (|scroll|) and the threshold (|threshold|), returns
-// the amount the window should be translated.
-int GetResistedScrollAmount(int scroll, int threshold) {
- DCHECK_GE(scroll, 0);
- if (scroll <= threshold)
- return scroll / 2;
-
- // Start resisting after the threshold.
- int resisted = threshold / 2;
- float extra = scroll - threshold;
- while ((extra /= 1.3f) > 1.f)
- resisted += 1;
- return resisted;
-}
-
} // namespace
// ShadowWindow is used to paint shadows around a content window.
@@ -1077,11 +1062,7 @@ gfx::Vector2d WebContentsViewAura::GetTranslationForOverscroll(int delta_x,
else if (ShouldNavigateBack(controller, current_overscroll_gesture_))
return gfx::Vector2d(std::min(bounds.width(), delta_x), 0);
- const float threshold = GetOverscrollConfig(
- OVERSCROLL_CONFIG_HORIZ_RESIST_AFTER);
- int scroll = GetResistedScrollAmount(abs(delta_x),
- static_cast<int>(threshold));
- return gfx::Vector2d(delta_x < 0 ? -scroll : scroll, 0);
+ return gfx::Vector2d();
}
void WebContentsViewAura::PrepareOverscrollNavigationOverlay() {