| Index: third_party/WebKit/Source/web/WebInputEventConversion.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebInputEventConversion.cpp b/third_party/WebKit/Source/web/WebInputEventConversion.cpp
|
| index b020b0fefe2505da660ce60447e3fab4555fcdfd..fd00ac28660de1ae5fdc5907742cd7b7652f8881 100644
|
| --- a/third_party/WebKit/Source/web/WebInputEventConversion.cpp
|
| +++ b/third_party/WebKit/Source/web/WebInputEventConversion.cpp
|
| @@ -91,6 +91,20 @@ FloatPoint convertHitPointToRootFrame(const Widget* widget, FloatPoint pointInRe
|
| (pointInRendererViewport.y() - offset.height()) / scale + visualViewport.y() + overscrollOffset.height());
|
| }
|
|
|
| +PlatformEvent::DispatchType toPlatformDispatchType(WebInputEvent::DispatchType type)
|
| +{
|
| + static_assert(PlatformEvent::DispatchType::Blocking == static_cast<PlatformEvent::DispatchType>(WebInputEvent::DispatchType::Blocking),
|
| + "Dispatch Types not equal");
|
| + static_assert(PlatformEvent::DispatchType::EventNonBlocking == static_cast<PlatformEvent::DispatchType>(WebInputEvent::DispatchType::EventNonBlocking),
|
| + "Dispatch Types not equal");
|
| + static_assert(PlatformEvent::DispatchType::ListenersNonBlockingPassive == static_cast<PlatformEvent::DispatchType>(WebInputEvent::DispatchType::ListenersNonBlockingPassive),
|
| + "Dispatch Types not equal");
|
| + static_assert(PlatformEvent::DispatchType::ListenersForcedNonBlockingPassive == static_cast<PlatformEvent::DispatchType>(WebInputEvent::DispatchType::ListenersForcedNonBlockingPassive),
|
| + "Dispatch Types not equal");
|
| +
|
| + return static_cast<PlatformEvent::DispatchType>(type);
|
| +}
|
| +
|
| unsigned toPlatformModifierFrom(WebMouseEvent::Button button)
|
| {
|
| if (button == WebMouseEvent::ButtonNone)
|
| @@ -457,7 +471,7 @@ PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTo
|
| for (unsigned i = 0; i < event.touchesLength; ++i)
|
| m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touches[i]));
|
|
|
| - m_cancelable = event.cancelable;
|
| + m_dispatchType = toPlatformDispatchType(event.dispatchType);
|
| }
|
|
|
| static FloatPoint convertAbsoluteLocationForLayoutObjectFloat(const LayoutPoint& location, const LayoutObject& layoutObject)
|
| @@ -717,7 +731,7 @@ WebTouchEventBuilder::WebTouchEventBuilder(const LayoutObject* layoutObject, con
|
|
|
| timeStampSeconds = event.platformTimeStamp();
|
| modifiers = event.modifiers();
|
| - cancelable = event.cancelable();
|
| + dispatchType = event.cancelable() ? WebInputEvent::Blocking : WebInputEvent::EventNonBlocking;
|
| movedBeyondSlopRegion = event.causesScrollingIfUncanceled();
|
|
|
| // Currently touches[] is empty, add stationary points as-is.
|
|
|