Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(568)

Unified Diff: content/browser/renderer_host/overscroll_controller.cc

Issue 52263006: Put vertical overscroll behind kScrollEndEffect flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/breakpad.gypi ('k') | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/overscroll_controller.cc
diff --git a/content/browser/renderer_host/overscroll_controller.cc b/content/browser/renderer_host/overscroll_controller.cc
index 0ae3d3e25c3c9d5938e85d52c0149ebf4f3b8cb8..493c652eed2be1ccc1424409086538e49dbc121f 100644
--- a/content/browser/renderer_host/overscroll_controller.cc
+++ b/content/browser/renderer_host/overscroll_controller.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "content/browser/renderer_host/overscroll_controller_delegate.h"
#include "content/public/browser/overscroll_configuration.h"
+#include "content/public/common/content_switches_util.h"
using WebKit::WebInputEvent;
@@ -300,6 +301,12 @@ void OverscrollController::ProcessOverscroll(float delta_x,
fabs(overscroll_delta_y_) > fabs(overscroll_delta_x_) * kMinRatio)
new_mode = overscroll_delta_y_ > 0.f ? OVERSCROLL_SOUTH : OVERSCROLL_NORTH;
+ // The vertical oversrcoll currently does not have any UX effects other then
+ // for the scroll end effect, so testing if it is enabled.
+ if ((new_mode == OVERSCROLL_SOUTH || new_mode == OVERSCROLL_NORTH) &&
+ !switches::IsScrollEndEffectEnabled())
+ new_mode = OVERSCROLL_NONE;
sadrul 2013/10/30 16:06:50 This should be a separate CL from the content_swit
rharrison 2013/10/30 18:16:26 Done.
+
if (overscroll_mode_ == OVERSCROLL_NONE)
SetOverscrollMode(new_mode);
else if (new_mode != overscroll_mode_)
« no previous file with comments | « components/breakpad.gypi ('k') | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698