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

Unified Diff: cc/input/top_controls_manager.cc

Issue 982333003: Don't calculate a shown ratio when top controls height is 0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | cc/input/top_controls_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/top_controls_manager.cc
diff --git a/cc/input/top_controls_manager.cc b/cc/input/top_controls_manager.cc
index 7362805de99acba4c5caa3145f9f268df1778336..3ac3b4a8813cfcf733cea0f6449817e1acf733f7 100644
--- a/cc/input/top_controls_manager.cc
+++ b/cc/input/top_controls_manager.cc
@@ -104,6 +104,9 @@ gfx::Vector2dF TopControlsManager::ScrollBy(
if (pinch_gesture_active_)
return pending_delta;
+ if (!TopControlsHeight())
+ return pending_delta;
+
if (permitted_state_ == SHOWN && pending_delta.y() > 0)
return pending_delta;
else if (permitted_state_ == HIDDEN && pending_delta.y() < 0)
« no previous file with comments | « no previous file | cc/input/top_controls_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698