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

Unified Diff: content/browser/web_contents/aura/overscroll_window_animation.cc

Issue 2983883002: Reset overscroll state when OverscrollWindowDelegate is destroyed.
Patch Set: Created 3 years, 5 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
Index: content/browser/web_contents/aura/overscroll_window_animation.cc
diff --git a/content/browser/web_contents/aura/overscroll_window_animation.cc b/content/browser/web_contents/aura/overscroll_window_animation.cc
index 8ed863772f022b4b5f1e2d54008bbda2fc691bef..8c3b0bb123573a12360114267a0a861947d37e34 100644
--- a/content/browser/web_contents/aura/overscroll_window_animation.cc
+++ b/content/browser/web_contents/aura/overscroll_window_animation.cc
@@ -100,8 +100,12 @@ void OverscrollWindowAnimation::OnOverscrollModeChange(
Direction new_direction = GetDirectionForMode(new_mode);
if (new_direction == SLIDE_NONE) {
// The user cancelled the in progress animation.
- if (is_active())
+ if (is_active()) {
CancelSlide();
+ } else {
+ overscroll_source_ = OverscrollSource::NONE;
+ direction_ = SLIDE_NONE;
+ }
return;
}
if (is_active()) {

Powered by Google App Engine
This is Rietveld 408576698