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

Unified Diff: content/browser/renderer_host/input/touch_event_queue.cc

Issue 2233543002: Make first TouchStart and first TouchMove events on a flinging layer non-blocking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename Created 4 years, 4 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 | « no previous file | content/browser/renderer_host/input/touch_event_queue_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/touch_event_queue.cc
diff --git a/content/browser/renderer_host/input/touch_event_queue.cc b/content/browser/renderer_host/input/touch_event_queue.cc
index 817815ac9a145f940905a1e62dd071b9fd71e510..701f4fde7fe7e88a6bc5febfeb41b2ecdb277d5a 100644
--- a/content/browser/renderer_host/input/touch_event_queue.cc
+++ b/content/browser/renderer_host/input/touch_event_queue.cc
@@ -792,10 +792,15 @@ void TouchEventQueue::SendTouchEventImmediately(
if (dispatching_touch_)
return;
+ if (touch->event.type == WebInputEvent::TouchStart)
+ touch->event.touchStartOrFirstTouchMove = true;
+
// For touchmove events, compare touch points position from current event
// to last sent event and update touch points state.
if (touch->event.type == WebInputEvent::TouchMove) {
CHECK(last_sent_touchevent_);
+ if (last_sent_touchevent_->type == WebInputEvent::TouchStart)
+ touch->event.touchStartOrFirstTouchMove = true;
for (unsigned int i = 0; i < last_sent_touchevent_->touchesLength; ++i) {
const WebTouchPoint& last_touch_point =
last_sent_touchevent_->touches[i];
« no previous file with comments | « no previous file | content/browser/renderer_host/input/touch_event_queue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698