summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/render_widget_host_view_qt.cpp3
-rw-r--r--src/core/web_event_factory.cpp6
2 files changed, 8 insertions, 1 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index bee3c4ca4..b6cac85ce 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -1662,7 +1662,8 @@ void RenderWidgetHostViewQt::handleGestureEvent(QNativeGestureEvent *ev)
{
const Qt::NativeGestureType type = ev->gestureType();
// These are the only supported gestures by Chromium so far.
- if (type == Qt::ZoomNativeGesture || type == Qt::SmartZoomNativeGesture) {
+ if (type == Qt::ZoomNativeGesture || type == Qt::SmartZoomNativeGesture
+ || type == Qt::BeginNativeGesture || type == Qt::EndNativeGesture) {
if (host()->delegate() && host()->delegate()->GetInputEventRouter()) {
auto webEvent = WebEventFactory::toWebGestureEvent(ev);
host()->delegate()->GetInputEventRouter()->RouteGestureEvent(this, &webEvent, ui::LatencyInfo());
diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp
index dcfa3dc39..b6ca70294 100644
--- a/src/core/web_event_factory.cpp
+++ b/src/core/web_event_factory.cpp
@@ -1540,7 +1540,13 @@ WebGestureEvent WebEventFactory::toWebGestureEvent(QNativeGestureEvent *ev)
webKitEvent.data.tap.tap_count = 1;
break;
case Qt::BeginNativeGesture:
+ webKitEvent.SetType(WebInputEvent::Type::kGesturePinchBegin);
+ webKitEvent.SetNeedsWheelEvent(true);
+ break;
case Qt::EndNativeGesture:
+ webKitEvent.SetType(WebInputEvent::Type::kGesturePinchEnd);
+ webKitEvent.SetNeedsWheelEvent(true);
+ break;
case Qt::RotateNativeGesture:
case Qt::PanNativeGesture:
case Qt::SwipeNativeGesture: