| 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 0f1e3bc444b01bf13d4ce1a3f3a68de1a6786367..262f17a88e9347af39f1244b072e2e912b78513e 100644
|
| --- a/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| +++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| @@ -872,7 +872,7 @@ WebInputEventResult EventHandler::handleMousePressEvent(const PlatformMouseEvent
|
| InputDeviceCapabilities* sourceCapabilities = mouseEvent.getSyntheticEventType() == PlatformMouseEvent::FromTouch ? InputDeviceCapabilities::firesTouchEventsSourceCapabilities() :
|
| InputDeviceCapabilities::doesntFireTouchEventsSourceCapabilities();
|
| if (eventResult == WebInputEventResult::NotHandled)
|
| - eventResult = handleMouseFocus(MouseEventWithHitTestResults(mev.event(), hitTestResult), sourceCapabilities);
|
| + eventResult = handleMouseFocus(hitTestResult, sourceCapabilities);
|
| m_capturesDragging = eventResult == WebInputEventResult::NotHandled || mev.scrollbar();
|
|
|
| // If the hit testing originally determined the event was in a scrollbar, refetch the MouseEventWithHitTestResults
|
| @@ -1510,9 +1510,6 @@ WebInputEventResult EventHandler::updatePointerTargetAndDispatchEvents(const Ato
|
|
|
| Node* lastNodeUnderMouse = updateMouseEventTargetNode(targetNode, mouseEvent);
|
|
|
| - if (mouseEvent.getSyntheticEventType() == PlatformMouseEvent::FromTouch)
|
| - return dispatchMouseEvent(mouseEventType, m_nodeUnderMouse, clickCount, mouseEvent);
|
| -
|
| Node* newNodeUnderMouse = nullptr;
|
| const auto& eventResult = m_pointerEventManager.sendMousePointerEvent(
|
| m_nodeUnderMouse, mouseEventType, clickCount, mouseEvent, nullptr,
|
| @@ -1526,11 +1523,11 @@ void EventHandler::setClickNode(Node* node)
|
| m_clickNode = node;
|
| }
|
|
|
| -WebInputEventResult EventHandler::handleMouseFocus(const MouseEventWithHitTestResults& targetedEvent, InputDeviceCapabilities* sourceCapabilities)
|
| +WebInputEventResult EventHandler::handleMouseFocus(const HitTestResult& hitTestResult, InputDeviceCapabilities* sourceCapabilities)
|
| {
|
| // If clicking on a frame scrollbar, do not mess up with content focus.
|
| - if (targetedEvent.hitTestResult().scrollbar() && !m_frame->contentLayoutItem().isNull()) {
|
| - if (targetedEvent.hitTestResult().scrollbar()->getScrollableArea() == m_frame->contentLayoutItem().getScrollableArea())
|
| + if (hitTestResult.scrollbar() && !m_frame->contentLayoutItem().isNull()) {
|
| + if (hitTestResult.scrollbar()->getScrollableArea() == m_frame->contentLayoutItem().getScrollableArea())
|
| return WebInputEventResult::NotHandled;
|
| }
|
|
|
| @@ -1564,7 +1561,7 @@ WebInputEventResult EventHandler::handleMouseFocus(const MouseEventWithHitTestRe
|
|
|
| // Only change the focus when clicking scrollbars if it can transfered to a
|
| // mouse focusable node.
|
| - if (!element && targetedEvent.hitTestResult().scrollbar())
|
| + if (!element && hitTestResult.scrollbar())
|
| return WebInputEventResult::HandledSystem;
|
|
|
| if (Page* page = m_frame->page()) {
|
| @@ -2101,7 +2098,7 @@ WebInputEventResult EventHandler::sendContextMenuEventForKey(Element* overrideTa
|
| eventType = PlatformEvent::MouseReleased;
|
|
|
| PlatformMouseEvent mouseEvent(locationInRootFrame, globalPosition,
|
| - RightButton, eventType, 1,
|
| + NoButton, eventType, /* clickCount */ 0,
|
| PlatformEvent::NoModifiers, PlatformMouseEvent::RealOrIndistinguishable,
|
| WTF::monotonicallyIncreasingTime(), WebPointerProperties::PointerType::Mouse);
|
|
|
|
|