moebius#71: DOM - Pointer Events - improvements

https://github.com/MoonchildProductions/moebius/pull/71
This commit is contained in:
janekptacijarabaci 2018-04-20 22:18:52 +02:00 committed by Roy Tam
commit 40c62c205b
23 changed files with 294 additions and 430 deletions

View file

@ -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()
{