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

Side by Side Diff: third_party/WebKit/public/platform/WebInputEvent.h

Issue 2778853005: Add comments to WebInputEvent for touch enum types. (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 MouseLeave, 99 MouseLeave,
100 ContextMenu, 100 ContextMenu,
101 MouseTypeLast = ContextMenu, 101 MouseTypeLast = ContextMenu,
102 102
103 // WebMouseWheelEvent 103 // WebMouseWheelEvent
104 MouseWheel, 104 MouseWheel,
105 105
106 // WebKeyboardEvent 106 // WebKeyboardEvent
107 RawKeyDown, 107 RawKeyDown,
108 KeyboardTypeFirst = RawKeyDown, 108 KeyboardTypeFirst = RawKeyDown,
109 // KeyDown is a single event combining RawKeyDown and Char. If KeyDown is
dtapuska 2017/03/29 13:01:55 Probably adding a piece of text here like assuming
aelias_OOO_until_Jul13 2017/03/29 19:07:53 Done.
110 // sent, those two other events will not be sent.
109 KeyDown, 111 KeyDown,
110 KeyUp, 112 KeyUp,
111 Char, 113 Char,
112 KeyboardTypeLast = Char, 114 KeyboardTypeLast = Char,
113 115
114 // WebGestureEvent 116 // WebGestureEvent - touch pointers already interpreted semi-sematically.
tdresser 2017/03/29 12:26:48 sematically -> semantically? It's a bit tricky, b
aelias_OOO_until_Jul13 2017/03/29 19:07:55 Done.
115 GestureScrollBegin, 117 GestureScrollBegin,
116 GestureTypeFirst = GestureScrollBegin, 118 GestureTypeFirst = GestureScrollBegin,
117 GestureScrollEnd, 119 GestureScrollEnd,
118 GestureScrollUpdate, 120 GestureScrollUpdate,
121 // Fling is a high-velocity and quickly released finger movement.
122 // FlingStart is sent once and kicks off a scroll animation.
119 GestureFlingStart, 123 GestureFlingStart,
120 GestureFlingCancel, 124 GestureFlingCancel,
121 GestureShowPress, 125 // Pinch is two fingers moving closer or farther apart.
122 GestureTap,
123 GestureTapUnconfirmed,
124 GestureTapDown,
125 GestureTapCancel,
126 GestureDoubleTap,
127 GestureTwoFingerTap,
128 GestureLongPress,
129 GestureLongTap,
130 GesturePinchBegin, 126 GesturePinchBegin,
131 GesturePinchEnd, 127 GesturePinchEnd,
132 GesturePinchUpdate, 128 GesturePinchUpdate,
133 GestureTypeLast = GesturePinchUpdate,
134 129
135 // WebTouchEvent 130 // The following types are variations and subevents of single-taps.
131 //
132 // Sent the moment the user's finger hits the screen.
133 GestureTapDown,
134 // Sent a short interval later, after it seems the finger is staying in
135 // place. It's used to activate the link highlight ("show the press").
136 GestureShowPress,
137 // Sent on finger lift, if the gesture didn't turn into a scroll. This is
138 // the "main" event which maps to a synthetic mouse click event.
tdresser 2017/03/29 12:26:48 On long tap, we don't send a tap event, do we?
aelias_OOO_until_Jul13 2017/03/29 19:07:54 Switched to "for a simple, static, quick finger ta
139 GestureTap,
140 // Sent when a GestureTapDown didn't turn into a GestureTap (likely it
141 // turned into a scroll instead).
142 GestureTapCancel,
143 // Sent as soon as the long-press timeout fires, while the finger is still
144 // down.
145 GestureLongPress,
146 // Sent when the finger is lifted following a GestureLongPress.
147 GestureLongTap,
148 // Sent on finger lift when two fingers tapped at the same time without
149 // moving.
150 GestureTwoFingerTap,
151 // A rare event sent in place of GestureTap on desktop pages viewed on an
152 // Android phone. This tap could not yet be resolved into a GestureTap
153 // because it may still turn into a GestureDoubleTap.
154 GestureTapUnconfirmed,
mustaq 2017/03/29 18:27:28 Am I right to recall that CrOS also fires GestureT
aelias_OOO_until_Jul13 2017/03/29 19:07:53 No, I had grepped this and only place that sets it
aelias_OOO_until_Jul13 2017/03/29 19:10:55 And in general, there's no appetite at all for shi
tdresser 2017/03/29 19:45:55 +1
155
156 // Double-tap is two single-taps spread apart in time, like a double-click.
157 // This event is only sent on desktop pages viewed on an Android phone, and
158 // is always preceded by GestureTapUnconfirmed. It's an instruction to
159 // Blink to perform a PageScaleAnimation zoom onto the double-tapped
160 // content. (It's treated differently from GestureTap with tapCount=2,
161 // which can also happen.)
162 GestureDoubleTap,
163
164 GestureTypeLast = GestureDoubleTap,
165
166 // WebTouchEvent - raw touch pointers not yet classified into gestures.
136 TouchStart, 167 TouchStart,
137 TouchTypeFirst = TouchStart, 168 TouchTypeFirst = TouchStart,
138 TouchMove, 169 TouchMove,
139 TouchEnd, 170 TouchEnd,
140 TouchCancel, 171 TouchCancel,
141 TouchScrollStarted, 172 TouchScrollStarted,
142 TouchTypeLast = TouchScrollStarted, 173 TouchTypeLast = TouchScrollStarted,
143 174
144 TypeLast = TouchTypeLast 175 TypeLast = TouchTypeLast
145 }; 176 };
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 unsigned m_size; // The size of this structure, for serialization. 412 unsigned m_size; // The size of this structure, for serialization.
382 Type m_type; 413 Type m_type;
383 int m_modifiers; 414 int m_modifiers;
384 }; 415 };
385 416
386 #pragma pack(pop) 417 #pragma pack(pop)
387 418
388 } // namespace blink 419 } // namespace blink
389 420
390 #endif 421 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698