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

Unified Diff: components/exo/pointer.cc

Issue 2840113002: exo: Replace fling cancel with generic zero distance scroll (Closed)
Patch Set: Created 3 years, 8 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/exo/pointer.h ('k') | components/exo/pointer_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/pointer.cc
diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc
index e650b4f4ffe35b7732e406cdf59a315515d966a9..ae53458ff93b258cba5c1ea7ed98092437e61938 100644
--- a/components/exo/pointer.cc
+++ b/components/exo/pointer.cc
@@ -212,8 +212,13 @@ void Pointer::OnMouseEvent(ui::MouseEvent* event) {
break;
}
case ui::ET_SCROLL_FLING_CANCEL: {
- delegate_->OnPointerScrollCancel(event->time_stamp());
- delegate_->OnPointerFrame();
+ if (last_event_type_ == ui::ET_SCROLL_FLING_START) {
reveman 2017/04/27 13:28:17 Can you add a comment here that explains why we do
denniskempin (chromium) 2017/05/03 20:55:28 Done.
+ delegate_->OnPointerScroll(event->time_stamp(), gfx::Vector2dF(),
reveman 2017/04/27 13:28:17 I think this logic deserves a comment similar to w
denniskempin (chromium) 2017/05/03 20:55:28 Done.
+ false);
+ delegate_->OnPointerFrame();
+ delegate_->OnPointerScrollStop(event->time_stamp());
+ delegate_->OnPointerFrame();
+ }
break;
}
case ui::ET_MOUSE_MOVED:
@@ -227,6 +232,7 @@ void Pointer::OnMouseEvent(ui::MouseEvent* event) {
break;
}
+ last_event_type_ = event->type();
UpdateCursorScale();
}
« no previous file with comments | « components/exo/pointer.h ('k') | components/exo/pointer_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698