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

Unified Diff: cc/input/top_controls_manager.cc

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch 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 | « cc/debug/rasterize_and_record_benchmark_impl.cc ('k') | 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..c8bd5348721ca72c007c38ada13b9dd650b536f8 100644
--- a/cc/input/top_controls_manager.cc
+++ b/cc/input/top_controls_manager.cc
@@ -101,6 +101,9 @@ void TopControlsManager::ScrollBegin() {
gfx::Vector2dF TopControlsManager::ScrollBy(
const gfx::Vector2dF& pending_delta) {
+ if (!TopControlsHeight())
+ return pending_delta;
+
if (pinch_gesture_active_)
return pending_delta;
@@ -180,6 +183,12 @@ void TopControlsManager::SetupAnimation(AnimationDirection direction) {
if (top_controls_animation_ && animation_direction_ == direction)
return;
+ if (!TopControlsHeight()) {
+ client_->SetCurrentTopControlsShownRatio(
+ direction == HIDING_CONTROLS ? 0.f : 1.f);
+ return;
+ }
+
top_controls_animation_ = KeyframedFloatAnimationCurve::Create();
base::TimeDelta start_time = gfx::FrameTime::Now() - base::TimeTicks();
top_controls_animation_->AddKeyframe(
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark_impl.cc ('k') | cc/input/top_controls_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698