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

Unified Diff: ui/events/gesture_event_details.h

Issue 712133003: Track whether a scroll sequence has been partially prevented (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Filter swipe explicitly Created 6 years, 1 month 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: ui/events/gesture_event_details.h
diff --git a/ui/events/gesture_event_details.h b/ui/events/gesture_event_details.h
index da7a60bef2a87217c6c4e0082f3230ee46c2be84..77381f7496f6a2bcbbcc1be7bcbe686313ca4651 100644
--- a/ui/events/gesture_event_details.h
+++ b/ui/events/gesture_event_details.h
@@ -130,6 +130,16 @@ struct EVENTS_BASE_EXPORT GestureEventDetails {
data.scale = scale;
}
+ void mark_previous_scroll_update_in_sequence_prevented() const {
+ DCHECK_EQ(ET_GESTURE_SCROLL_UPDATE, type_);
+ data.scroll_update.previous_update_in_sequence_prevented = true;
+ }
+
+ bool previous_scroll_update_in_sequence_prevented() const {
+ DCHECK_EQ(ET_GESTURE_SCROLL_UPDATE, type_);
+ return data.scroll_update.previous_update_in_sequence_prevented;
+ }
+
private:
EventType type_;
union Details {
@@ -144,6 +154,10 @@ struct EVENTS_BASE_EXPORT GestureEventDetails {
struct { // SCROLL delta.
float x;
float y;
+ // Whether any previous scroll update in the current scroll sequence was
+ // suppressed because the underlying touch was consumed. This is marked
+ // mutable as its value may be set downstream from event creation.
+ mutable bool previous_update_in_sequence_prevented;
tdresser 2014/11/10 21:51:01 I'm not sure this is superior to making all the ev
Rick Byers 2014/11/10 22:03:08 We hit a similar issue with touch-action, and ther
jdduke (slow) 2014/11/10 22:23:43 This is a very different case. This extra bit I c
jdduke (slow) 2014/11/10 22:31:32 Anyhow, if you guys prefer we not make this mutabl
} scroll_update;
float scale; // PINCH scale.

Powered by Google App Engine
This is Rietveld 408576698