| 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 f849b0ecdbd6bb6320cf9dd83dd100ad42b87bd3..5b594addabcb2a729098642010cedc4c7f277e12 100644
|
| --- a/content/browser/renderer_host/input/touch_event_queue.cc
|
| +++ b/content/browser/renderer_host/input/touch_event_queue.cc
|
| @@ -292,8 +292,32 @@
|
| TouchMoveSlopSuppressor() : suppressing_touchmoves_(false) {}
|
|
|
| bool FilterEvent(const WebTouchEvent& event) {
|
| - suppressing_touchmoves_ = false;
|
| - return false;
|
| + if (WebTouchEventTraits::IsTouchSequenceStart(event)) {
|
| + suppressing_touchmoves_ = true;
|
| + touch_start_location_ = gfx::PointF(event.touches[0].position);
|
| + }
|
| +
|
| + if (event.type() == WebInputEvent::TouchEnd ||
|
| + event.type() == WebInputEvent::TouchCancel)
|
| + suppressing_touchmoves_ = false;
|
| +
|
| + if (event.type() != WebInputEvent::TouchMove)
|
| + return false;
|
| +
|
| + if (suppressing_touchmoves_) {
|
| + if (event.touchesLength > 1) {
|
| + suppressing_touchmoves_ = false;
|
| + } else if (event.movedBeyondSlopRegion) {
|
| + suppressing_touchmoves_ = false;
|
| + } else {
|
| + // No sane slop region should be larger than 60 DIPs.
|
| + DCHECK_LT((gfx::PointF(event.touches[0].position) -
|
| + touch_start_location_).LengthSquared(),
|
| + kMaxConceivablePlatformSlopRegionLengthDipsSquared);
|
| + }
|
| + }
|
| +
|
| + return suppressing_touchmoves_;
|
| }
|
|
|
| void ConfirmTouchEvent(InputEventAckState ack_result) {
|
|
|