summaryrefslogtreecommitdiffstats
path: root/dom/events/PointerEvent.cpp
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-04-21 14:53:24 +0200
committerGitHub <noreply@github.com>2018-04-21 14:53:24 +0200
commit844da4597f92c4d603e8df2c1f5c8b23f31904f0 (patch)
tree3d8fe3c6bec0d7e4538affe5efa6fd3294a72f86 /dom/events/PointerEvent.cpp
parentfb37ed0a373a0bbc29bbe6e20ca684e856185c5c (diff)
parent09f456b2808224e7707e51bfab8957ef067154e4 (diff)
downloadUXP-844da4597f92c4d603e8df2c1f5c8b23f31904f0.tar
UXP-844da4597f92c4d603e8df2c1f5c8b23f31904f0.tar.gz
UXP-844da4597f92c4d603e8df2c1f5c8b23f31904f0.tar.lz
UXP-844da4597f92c4d603e8df2c1f5c8b23f31904f0.tar.xz
UXP-844da4597f92c4d603e8df2c1f5c8b23f31904f0.zip
Merge pull request #221 from janekptacijarabaci/js_dom_pointer_events_1
moebius#71: Pointer Events - improvements
Diffstat (limited to 'dom/events/PointerEvent.cpp')
-rw-r--r--dom/events/PointerEvent.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/dom/events/PointerEvent.cpp b/dom/events/PointerEvent.cpp
index f53739863..fbaa0f737 100644
--- a/dom/events/PointerEvent.cpp
+++ b/dom/events/PointerEvent.cpp
@@ -93,8 +93,10 @@ PointerEvent::Constructor(EventTarget* aOwner,
widgetEvent->mWidth = aParam.mWidth;
widgetEvent->mHeight = aParam.mHeight;
widgetEvent->pressure = aParam.mPressure;
+ widgetEvent->tangentialPressure = aParam.mTangentialPressure;
widgetEvent->tiltX = aParam.mTiltX;
widgetEvent->tiltY = aParam.mTiltY;
+ widgetEvent->twist = aParam.mTwist;
widgetEvent->inputSource = ConvertStringToPointerType(aParam.mPointerType);
widgetEvent->mIsPrimary = aParam.mIsPrimary;
widgetEvent->buttons = aParam.mButtons;
@@ -145,6 +147,12 @@ PointerEvent::Pressure()
return mEvent->AsPointerEvent()->pressure;
}
+float
+PointerEvent::TangentialPressure()
+{
+ return mEvent->AsPointerEvent()->tangentialPressure;
+}
+
int32_t
PointerEvent::TiltX()
{
@@ -157,6 +165,12 @@ PointerEvent::TiltY()
return mEvent->AsPointerEvent()->tiltY;
}
+int32_t
+PointerEvent::Twist()
+{
+ return mEvent->AsPointerEvent()->twist;
+}
+
bool
PointerEvent::IsPrimary()
{