Chromium Code Reviews| 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 39b426486a0639eba217e8c0ba1b7182be1cd34e..fba7033769e61402e09d12b0623f42c6df1b260d 100644 |
| --- a/third_party/WebKit/Source/core/input/EventHandler.cpp |
| +++ b/third_party/WebKit/Source/core/input/EventHandler.cpp |
| @@ -432,12 +432,7 @@ 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; |
| + clearMouseDragState(); |
| return selectionController().handleMouseReleaseEvent(event, m_dragStartPos) ? WebInputEventResult::HandledSystem : WebInputEventResult::NotHandled; |
| } |
| @@ -1206,6 +1201,8 @@ WebInputEventResult EventHandler::handleMouseReleaseEvent(const PlatformMouseEve |
| if (eventResult == WebInputEventResult::NotHandled) |
| eventResult = handleMouseReleaseEvent(mev); |
| + else |
| + clearMouseDragState(); |
|
dtapuska
2016/06/09 21:18:58
what about the code path for gesture tap that has
mustaq
2016/06/10 15:44:04
handleMousePressEvent(MouseEventWithHitTestResults
Navid Zolghadr
2016/06/10 19:19:55
I added the call as suggested to the tap flow as w
mustaq
2016/06/10 19:30:16
I am indifferent about AutoReset here, mainly for
|
| invalidateClick(); |
| @@ -1383,6 +1380,16 @@ WebInputEventResult EventHandler::performDragAndDrop(const PlatformMouseEvent& e |
| return result; |
| } |
| +void EventHandler::clearMouseDragState() |
| +{ |
| + // 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(); |