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

Side by Side Diff: public/web/WebInputEvent.h

Issue 702883004: Expose whether a touch event may cause scrolling if uncanceled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Comment 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 unified diff | Download patch
« no previous file with comments | « Source/web/WebInputEvent.cpp ('k') | 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 // Toggle modifiers for all events. Danger: these are not reflected 160 // Toggle modifiers for all events. Danger: these are not reflected
161 // into WebCore, so round-tripping from WebInputEvent to a WebCore 161 // into WebCore, so round-tripping from WebInputEvent to a WebCore
162 // event and back will not preserve these flags. 162 // event and back will not preserve these flags.
163 CapsLockOn = 1 << 9, 163 CapsLockOn = 1 << 9,
164 NumLockOn = 1 << 10, 164 NumLockOn = 1 << 10,
165 165
166 // Left/right modifiers for keyboard events. 166 // Left/right modifiers for keyboard events.
167 IsLeft = 1 << 11, 167 IsLeft = 1 << 11,
168 IsRight = 1 << 12, 168 IsRight = 1 << 12,
169
170 // Last input event to be sent for the current vsync interval. If this
171 // flag is set, the sender guarantees that no more input events will be
172 // delivered until the next vsync and the receiver can schedule
173 // rendering accordingly. If it isn't set, the receiver should not make
174 // any assumptions about the delivery times of future input events
175 // w.r.t. vsync.
176 IsLastInputEventForCurrentVSync = 1 << 13,
177 }; 169 };
178 170
179 static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey; 171 static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey;
180 172
181 double timeStampSeconds; // Seconds since epoch. 173 double timeStampSeconds; // Seconds since epoch.
182 unsigned size; // The size of this structure, for serialization. 174 unsigned size; // The size of this structure, for serialization.
183 Type type; 175 Type type;
184 int modifiers; 176 int modifiers;
185 177
186 // Returns true if the WebInputEvent |type| is a mouse event. 178 // Returns true if the WebInputEvent |type| is a mouse event.
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 481
490 unsigned touchesLength; 482 unsigned touchesLength;
491 // List of all touches, regardless of state. 483 // List of all touches, regardless of state.
492 WebTouchPoint touches[touchesLengthCap]; 484 WebTouchPoint touches[touchesLengthCap];
493 485
494 // Whether the event can be canceled (with preventDefault). If true then the browser 486 // Whether the event can be canceled (with preventDefault). If true then the browser
495 // must wait for an ACK for this event. If false then no ACK IPC is expected . 487 // must wait for an ACK for this event. If false then no ACK IPC is expected .
496 // See comment at the top for why an int is used here instead of a bool. 488 // See comment at the top for why an int is used here instead of a bool.
497 int cancelable; 489 int cancelable;
498 490
491 // Whether the event may cause scrolling if not canceled. This will be true
492 // for touchmove events after the platform slop region has been exceeded
493 // and touchend events that induce a fling.
494 // See comment at the top for why an int is used here instead of a bool.
495 int mayCauseScrollingIfUncanceled;
Rick Byers 2014/11/10 18:56:04 Nit: if it really "will be true for ..." then why
496
499 WebTouchEvent() 497 WebTouchEvent()
500 : WebInputEvent(sizeof(WebTouchEvent)) 498 : WebInputEvent(sizeof(WebTouchEvent))
501 , touchesLength(0) 499 , touchesLength(0)
502 , cancelable(true) 500 , cancelable(true)
501 , mayCauseScrollingIfUncanceled(false)
503 { 502 {
504 } 503 }
505 }; 504 };
506 505
507 #pragma pack(pop) 506 #pragma pack(pop)
508 507
509 } // namespace blink 508 } // namespace blink
510 509
511 #endif 510 #endif
OLDNEW
« no previous file with comments | « Source/web/WebInputEvent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698