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

Unified Diff: content/common/input/web_input_event_traits.cc

Issue 997283002: Coalesce async touch move events until the ack back from render (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing unittests Created 5 years, 7 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
Index: content/common/input/web_input_event_traits.cc
diff --git a/content/common/input/web_input_event_traits.cc b/content/common/input/web_input_event_traits.cc
index b2346401ad4d088e8477fd77350a1579eabd43e8..f72526f7af9b7b88ee3e800441e4346176a857e3 100644
--- a/content/common/input/web_input_event_traits.cc
+++ b/content/common/input/web_input_event_traits.cc
@@ -463,7 +463,8 @@ void WebInputEventTraits::Coalesce(const WebInputEvent& event_to_coalesce,
Apply(WebInputEventCoalesce(), event->type, event_to_coalesce, event);
}
-bool WebInputEventTraits::IgnoresAckDisposition(const WebInputEvent& event) {
+bool WebInputEventTraits::WillReceiveAckFromRenderer(
+ const WebInputEvent& event) {
switch (event.type) {
case WebInputEvent::MouseDown:
case WebInputEvent::MouseUp:
@@ -479,14 +480,20 @@ bool WebInputEventTraits::IgnoresAckDisposition(const WebInputEvent& event) {
case WebInputEvent::GesturePinchBegin:
case WebInputEvent::GesturePinchEnd:
case WebInputEvent::TouchCancel:
- return true;
+ return false;
case WebInputEvent::TouchStart:
- case WebInputEvent::TouchMove:
case WebInputEvent::TouchEnd:
- return !static_cast<const WebTouchEvent&>(event).cancelable;
+ return static_cast<const WebTouchEvent&>(event).cancelable;
default:
- return false;
+ return true;
+ }
+}
+
+uint32 WebInputEventTraits::GetUniqueTouchEventId(const WebInputEvent& event) {
+ if (WebInputEvent::isTouchEventType(event.type)) {
+ return static_cast<const WebTouchEvent&>(event).uniqueTouchEventId;
}
+ return 0U;
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698