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

Unified Diff: third_party/WebKit/Source/core/events/PointerEventFactory.cpp

Issue 2587393004: Add tangentialPressure and twist properties to PointerEvent on Mac (Closed)
Patch Set: pressure mac Created 3 years, 12 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/core/events/PointerEventFactory.cpp
diff --git a/third_party/WebKit/Source/core/events/PointerEventFactory.cpp b/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
index 7900cf790b6d9a49dd6c4abc76f3439811ce9514..3d4184c82eef277ea11c540d3d51142b7a770795 100644
--- a/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
+++ b/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
@@ -129,6 +129,9 @@ void updateTouchPointerEventInit(const PlatformTouchPoint& touchPoint,
getPointerEventPressure(touchPoint.force(), pointerEventInit->buttons()));
pointerEventInit->setTiltX(touchPoint.pointerProperties().tiltX);
pointerEventInit->setTiltY(touchPoint.pointerProperties().tiltY);
+ pointerEventInit->setTangentialPressure(
+ touchPoint.pointerProperties().tangentialPressure);
+ pointerEventInit->setTwist(touchPoint.pointerProperties().twist);
}
void updateMousePointerEventInit(const PlatformMouseEvent& mouseEvent,
@@ -159,6 +162,9 @@ void updateMousePointerEventInit(const PlatformMouseEvent& mouseEvent,
mouseEvent.pointerProperties().force, pointerEventInit->buttons()));
pointerEventInit->setTiltX(mouseEvent.pointerProperties().tiltX);
pointerEventInit->setTiltY(mouseEvent.pointerProperties().tiltY);
+ pointerEventInit->setTangentialPressure(
+ mouseEvent.pointerProperties().tangentialPressure);
+ pointerEventInit->setTwist(mouseEvent.pointerProperties().twist);
}
} // namespace
@@ -369,6 +375,8 @@ PointerEvent* PointerEventFactory::createPointerEventFrom(
pointerEventInit.setPressure(pointerEvent->pressure());
pointerEventInit.setTiltX(pointerEvent->tiltX());
pointerEventInit.setTiltY(pointerEvent->tiltY());
+ pointerEventInit.setTangentialPressure(pointerEvent->tangentialPressure());
+ pointerEventInit.setTwist(pointerEvent->twist());
pointerEventInit.setView(pointerEvent->view());
setEventSpecificFields(pointerEventInit, type);

Powered by Google App Engine
This is Rietveld 408576698