Chromium Code Reviews| 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 a25cf8ed2ba8a60f70832d3e410d70f65f18d35c..d65eca83db0b3f825773b6a9bb8b8825087aa830 100644 |
| --- a/content/common/input/web_input_event_traits.cc |
| +++ b/content/common/input/web_input_event_traits.cc |
| @@ -111,9 +111,9 @@ void ApppendTouchPointDetails(const WebTouchPoint& point, std::string* result) { |
| void ApppendEventDetails(const WebTouchEvent& event, std::string* result) { |
| StringAppendF(result, |
| - "{\n Touches: %u, Cancelable: %d, CausesScrolling: %d," |
| + "{\n Touches: %u, DispatchType: %d, CausesScrolling: %d," |
| " uniqueTouchEventId: %u\n[\n", |
| - event.touchesLength, event.cancelable, |
| + event.touchesLength, event.dispatchType, |
| event.movedBeyondSlopRegion, event.uniqueTouchEventId); |
| for (unsigned i = 0; i < event.touchesLength; ++i) |
| ApppendTouchPointDetails(event.touches[i], result); |
| @@ -481,11 +481,24 @@ bool WebInputEventTraits::ShouldBlockEventStream(const WebInputEvent& event) { |
| case WebInputEvent::GestureTapCancel: |
| case WebInputEvent::GesturePinchBegin: |
| case WebInputEvent::GesturePinchEnd: |
| + return false; |
| + |
| + // Touch cancel should always be non-blocking. |
| case WebInputEvent::TouchCancel: |
| + DCHECK_NE(WebInputEvent::Blocking, |
| + static_cast<const WebTouchEvent&>(event).dispatchType); |
| return false; |
| + |
| + // Touch start and touch end indicate whether they are non-blocking |
| + // (aka cancelable) on the event. |
|
tdresser
2016/04/18 19:40:45
The aka here is backwards.
non-blocking -> uncanc
dtapuska
2016/04/18 20:09:09
Done.
|
| case WebInputEvent::TouchStart: |
| case WebInputEvent::TouchEnd: |
| - return static_cast<const WebTouchEvent&>(event).cancelable; |
| + return static_cast<const WebTouchEvent&>(event).dispatchType == |
| + WebInputEvent::Blocking; |
| + |
| + // Touch move events may be non-blocking but are always explicitly |
| + // acknowledge by the renderer so they block the event stream. |
| + case WebInputEvent::TouchMove: |
| default: |
| return true; |
| } |