Chromium Code Reviews| Index: third_party/WebKit/Source/core/input/TouchEventManager.cpp |
| diff --git a/third_party/WebKit/Source/core/input/TouchEventManager.cpp b/third_party/WebKit/Source/core/input/TouchEventManager.cpp |
| index 6561639c92306c184a507ffda0ca0ebbd7347306..3b2945b5359b014b1898605c267490a5527910a5 100644 |
| --- a/third_party/WebKit/Source/core/input/TouchEventManager.cpp |
| +++ b/third_party/WebKit/Source/core/input/TouchEventManager.cpp |
| @@ -95,6 +95,7 @@ void TouchEventManager::clear() { |
| m_targetForTouchID.clear(); |
| m_regionForTouchID.clear(); |
| m_touchPressed = false; |
| + m_suppressingTouchmoves = false; |
| m_currentTouchAction = TouchActionAuto; |
| } |
| @@ -113,6 +114,17 @@ WebInputEventResult TouchEventManager::dispatchTouchEvents( |
| // http://www.w3.org/TR/touch-events/#touchevent-interface for how these |
| // lists fit together. |
| + // Suppress all the touch moves in the slop region. |
| + if (event.type() == WebInputEvent::TouchStart) |
|
dtapuska
2017/02/01 15:42:06
I don't think this matches the consistent state we
lanwei
2017/02/02 19:49:36
Done.
|
| + m_suppressingTouchmoves = true; |
| + |
| + if (m_suppressingTouchmoves && event.type() == WebInputEvent::TouchMove && |
| + touchInfos.size() == 1) { |
| + if (!event.movedBeyondSlopRegion) |
| + return WebInputEventResult::HandledSuppressed; |
| + m_suppressingTouchmoves = false; |
| + } |
| + |
| // Holds the complete set of touches on the screen. |
| TouchList* touches = TouchList::create(); |