| Index: third_party/WebKit/Source/core/input/EventHandler.cpp
|
| diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| index 04b488f2cf5755fc2d017c11b7f5758beeeb7fc9..864f214974333ffe74678e4e1a98886a0f6a7b53 100644
|
| --- a/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| +++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| @@ -436,13 +436,6 @@ WebInputEventResult EventHandler::handleMouseReleaseEvent(const MouseEventWithHi
|
| if (controller && controller->autoscrollInProgress())
|
| m_scrollManager.stopAutoscroll();
|
|
|
| - // Used to prevent mouseMoveEvent from initiating a drag before
|
| - // the mouse is pressed again.
|
| - m_mousePressed = false;
|
| - m_capturesDragging = false;
|
| - m_mouseDownMayStartDrag = false;
|
| - m_mouseDownMayStartAutoscroll = false;
|
| -
|
| return selectionController().handleMouseReleaseEvent(event, m_dragStartPos) ? WebInputEventResult::HandledSystem : WebInputEventResult::NotHandled;
|
| }
|
|
|
| @@ -1212,6 +1205,7 @@ WebInputEventResult EventHandler::handleMouseReleaseEvent(const PlatformMouseEve
|
|
|
| if (eventResult == WebInputEventResult::NotHandled)
|
| eventResult = handleMouseReleaseEvent(mev);
|
| + clearDragHeuristicState();
|
|
|
| invalidateClick();
|
|
|
| @@ -1389,6 +1383,16 @@ WebInputEventResult EventHandler::performDragAndDrop(const PlatformMouseEvent& e
|
| return result;
|
| }
|
|
|
| +void EventHandler::clearDragHeuristicState()
|
| +{
|
| + // Used to prevent mouseMoveEvent from initiating a drag before
|
| + // the mouse is pressed again.
|
| + m_mousePressed = false;
|
| + m_capturesDragging = false;
|
| + m_mouseDownMayStartDrag = false;
|
| + m_mouseDownMayStartAutoscroll = false;
|
| +}
|
| +
|
| void EventHandler::clearDragState()
|
| {
|
| m_scrollManager.stopAutoscroll();
|
| @@ -1874,6 +1878,7 @@ WebInputEventResult EventHandler::handleGestureTap(const GestureEventWithHitTest
|
|
|
| if (mouseUpEventResult == WebInputEventResult::NotHandled)
|
| mouseUpEventResult = handleMouseReleaseEvent(MouseEventWithHitTestResults(fakeMouseUp, currentHitTest));
|
| + clearDragHeuristicState();
|
|
|
| WebInputEventResult eventResult = mergeEventResult(mergeEventResult(mouseDownEventResult, mouseUpEventResult), clickEventResult);
|
| if (eventResult == WebInputEventResult::NotHandled && tappedNode && m_frame->page()) {
|
|
|