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

Side by Side Diff: content/browser/renderer_host/ui_events_helper.cc

Issue 247433003: Mark touchcancel events as uncancelable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/ui_events_helper.h" 5 #include "content/browser/renderer_host/ui_events_helper.h"
6 6
7 #include "third_party/WebKit/public/web/WebInputEvent.h" 7 #include "third_party/WebKit/public/web/WebInputEvent.h"
8 #include "ui/events/event.h" 8 #include "ui/events/event.h"
9 #include "ui/events/event_constants.h" 9 #include "ui/events/event_constants.h"
10 10
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 319
320 // Mark the rest of the points as stationary. 320 // Mark the rest of the points as stationary.
321 for (unsigned i = 0; i < web_event->touchesLength; ++i) { 321 for (unsigned i = 0; i < web_event->touchesLength; ++i) {
322 blink::WebTouchPoint* iter = web_event->touches + i; 322 blink::WebTouchPoint* iter = web_event->touches + i;
323 if (iter != point) 323 if (iter != point)
324 iter->state = blink::WebTouchPoint::StateStationary; 324 iter->state = blink::WebTouchPoint::StateStationary;
325 } 325 }
326 326
327 // Update the type of the touch event. 327 // Update the type of the touch event.
328 web_event->type = TouchEventTypeFromEvent(event); 328 web_event->type = TouchEventTypeFromEvent(event);
329 if (web_event->type == blink::WebInputEvent::TouchCancel)
330 web_event->cancelable = false;
329 web_event->timeStampSeconds = event.time_stamp().InSecondsF(); 331 web_event->timeStampSeconds = event.time_stamp().InSecondsF();
330 web_event->modifiers = EventFlagsToWebEventModifiers(event.flags()); 332 web_event->modifiers = EventFlagsToWebEventModifiers(event.flags());
331 333
332 return point; 334 return point;
333 } 335 }
334 336
335 } // namespace content 337 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698