| 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 e5213ef6d9d7276b98412f25192212e9c4bf0fb1..055b51e2ea62f747373272cf16423fb8de1f33e5 100644
|
| --- a/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| +++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| @@ -88,7 +88,6 @@
|
| #include "core/style/CursorData.h"
|
| #include "core/svg/SVGDocumentExtensions.h"
|
| #include "platform/PlatformTouchEvent.h"
|
| -#include "platform/PlatformWheelEvent.h"
|
| #include "platform/RuntimeEnabledFeatures.h"
|
| #include "platform/WindowsKeyboardCodes.h"
|
| #include "platform/geometry/FloatPoint.h"
|
| @@ -98,6 +97,7 @@
|
| #include "platform/scroll/Scrollbar.h"
|
| #include "platform/tracing/TraceEvent.h"
|
| #include "public/platform/WebInputEvent.h"
|
| +#include "public/platform/WebMouseWheelEvent.h"
|
| #include "wtf/Assertions.h"
|
| #include "wtf/CurrentTime.h"
|
| #include "wtf/PtrUtil.h"
|
| @@ -1269,17 +1269,18 @@ WebInputEventResult EventHandler::updatePointerTargetAndDispatchEvents(
|
| }
|
|
|
| WebInputEventResult EventHandler::handleWheelEvent(
|
| - const PlatformWheelEvent& event) {
|
| + const WebMouseWheelEvent& event) {
|
| #if OS(MACOSX)
|
| // Filter Mac OS specific phases, usually with a zero-delta.
|
| // https://crbug.com/553732
|
| - // TODO(chongz): EventSender sends events with |PlatformWheelEventPhaseNone|,
|
| + // TODO(chongz): EventSender sends events with
|
| + // |WebMouseWheelEvent::PhaseNone|,
|
| // but it shouldn't.
|
| - const int kPlatformWheelEventPhaseNoEventMask =
|
| - PlatformWheelEventPhaseEnded | PlatformWheelEventPhaseCancelled |
|
| - PlatformWheelEventPhaseMayBegin;
|
| - if ((event.phase() & kPlatformWheelEventPhaseNoEventMask) ||
|
| - (event.momentumPhase() & kPlatformWheelEventPhaseNoEventMask))
|
| + const int kWheelEventPhaseNoEventMask = WebMouseWheelEvent::PhaseEnded |
|
| + WebMouseWheelEvent::PhaseCancelled |
|
| + WebMouseWheelEvent::PhaseMayBegin;
|
| + if ((event.phase & kWheelEventPhaseNoEventMask) ||
|
| + (event.momentumPhase & kWheelEventPhaseNoEventMask))
|
| return WebInputEventResult::NotHandled;
|
| #endif
|
| Document* doc = m_frame->document();
|
| @@ -1291,7 +1292,8 @@ WebInputEventResult EventHandler::handleWheelEvent(
|
| if (!view)
|
| return WebInputEventResult::NotHandled;
|
|
|
| - LayoutPoint vPoint = view->rootFrameToContents(event.position());
|
| + LayoutPoint vPoint =
|
| + view->rootFrameToContents(flooredIntPoint(event.positionInRootFrame()));
|
|
|
| HitTestRequest request(HitTestRequest::ReadOnly);
|
| HitTestResult result(request, vPoint);
|
|
|