Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: third_party/WebKit/Source/web/WebInputEventConversion.cpp

Issue 1760183002: Fixed missing pointerTypes for touch events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed line-lengths, added a bug ref. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 d84c91f77c6eea3d7b6a4509ab9d4e020ae4f57a..1ae6a4ae6f46d48d7eda647a1343940cf942d1df 100644
--- a/third_party/WebKit/Source/web/WebInputEventConversion.cpp
+++ b/third_party/WebKit/Source/web/WebInputEventConversion.cpp
@@ -509,6 +509,8 @@ WebMouseEventBuilder::WebMouseEventBuilder(const Widget* widget, const LayoutObj
movementX = event.movementX();
movementY = event.movementY();
clickCount = event.detail();
+
+ pointerType = WebPointerProperties::PointerType::Mouse;
}
// Generate a synthetic WebMouseEvent given a TouchEvent (eg. for emulating a mouse
@@ -557,6 +559,8 @@ WebMouseEventBuilder::WebMouseEventBuilder(const Widget* widget, const LayoutObj
IntPoint localPoint = convertAbsoluteLocationForLayoutObject(touch->absoluteLocation(), *layoutObject);
x = localPoint.x();
y = localPoint.y();
+
+ pointerType = WebPointerProperties::PointerType::Touch;
}
WebMouseWheelEventBuilder::WebMouseWheelEventBuilder(const Widget* widget, const LayoutObject* layoutObject, const WheelEvent& event)
@@ -626,6 +630,7 @@ WebInputEvent::Type toWebKeyboardEventType(PlatformEvent::EventType type)
static WebTouchPoint toWebTouchPoint(const Touch* touch, const LayoutObject* layoutObject, WebTouchPoint::State state)
{
WebTouchPoint point;
+ point.pointerType = WebPointerProperties::PointerType::Touch;
point.id = touch->identifier();
point.screenPosition = touch->screenLocation();
point.position = convertAbsoluteLocationForLayoutObjectFloat(touch->absoluteLocation(), *layoutObject);

Powered by Google App Engine
This is Rietveld 408576698