Bug 1125040: Use LayoutDeviceIntPoint for nsLayoutUtils::GetEventCoordinatesRelativeTo and Touch::mRefPoint r=botond

This commit is contained in:
David Zbarsky 2015-02-01 17:27:31 -05:00
parent c50e6233cb
commit 1330fc1496
26 changed files with 68 additions and 72 deletions

View File

@ -149,7 +149,7 @@ nsCoreUtils::DispatchTouchEvent(uint32_t aEventType, int32_t aX, int32_t aY,
event.time = PR_IntervalNow();
// XXX: Touch has an identifier of -1 to hint that it is synthesized.
nsRefPtr<dom::Touch> t = new dom::Touch(-1, nsIntPoint(aX, aY),
nsRefPtr<dom::Touch> t = new dom::Touch(-1, LayoutDeviceIntPoint(aX, aY),
nsIntPoint(1, 1), 0.0f, 1.0f);
t->SetTarget(aContent);
event.touches.AppendElement(t);

View File

@ -1158,7 +1158,7 @@ nsDOMWindowUtils::SendTouchEventCommon(const nsAString& aType,
LayoutDeviceIntPoint pt =
ToWidgetPoint(CSSPoint(aXs[i], aYs[i]), offset, presContext);
nsRefPtr<Touch> t = new Touch(aIdentifiers[i],
LayoutDeviceIntPoint::ToUntyped(pt),
pt,
nsIntPoint(aRxs[i], aRys[i]),
aRotationAngles[i],
aForces[i]);
@ -3392,8 +3392,8 @@ nsDOMWindowUtils::SelectAtPoint(float aX, float aY, uint32_t aSelectBehavior,
// Get the target frame at the client coordinates passed to us
nsPoint offset;
nsCOMPtr<nsIWidget> widget = GetWidget(&offset);
nsIntPoint pt = LayoutDeviceIntPoint::ToUntyped(
ToWidgetPoint(CSSPoint(aX, aY), offset, GetPresContext()));
LayoutDeviceIntPoint pt =
ToWidgetPoint(CSSPoint(aX, aY), offset, GetPresContext());
nsPoint ptInRoot =
nsLayoutUtils::GetEventCoordinatesRelativeTo(widget, pt, rootFrame);
nsIFrame* targetFrame = nsLayoutUtils::GetFrameForPoint(rootFrame, ptInRoot);

View File

@ -966,8 +966,7 @@ Event::GetClientCoords(nsPresContext* aPresContext,
return CSSIntPoint(0, 0);
}
nsPoint pt =
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent,
LayoutDeviceIntPoint::ToUntyped(aPoint), rootFrame);
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, aPoint, rootFrame);
return CSSIntPoint::FromAppUnitsRounded(pt);
}

View File

@ -33,7 +33,7 @@ Touch::Touch(EventTarget* aTarget,
mPagePoint = CSSIntPoint(aPageX, aPageY);
mScreenPoint = nsIntPoint(aScreenX, aScreenY);
mClientPoint = CSSIntPoint(aClientX, aClientY);
mRefPoint = nsIntPoint(0, 0);
mRefPoint = LayoutDeviceIntPoint(0, 0);
mPointsInitialized = true;
mRadius.x = aRadiusX;
mRadius.y = aRadiusY;
@ -46,7 +46,7 @@ Touch::Touch(EventTarget* aTarget,
}
Touch::Touch(int32_t aIdentifier,
nsIntPoint aPoint,
LayoutDeviceIntPoint aPoint,
nsIntPoint aRadius,
float aRotationAngle,
float aForce)
@ -106,13 +106,10 @@ Touch::InitializePoints(nsPresContext* aPresContext, WidgetEvent* aEvent)
return;
}
mClientPoint = Event::GetClientCoords(
aPresContext, aEvent, LayoutDeviceIntPoint::FromUntyped(mRefPoint),
mClientPoint);
aPresContext, aEvent, mRefPoint, mClientPoint);
mPagePoint = Event::GetPageCoords(
aPresContext, aEvent, LayoutDeviceIntPoint::FromUntyped(mRefPoint),
mClientPoint);
mScreenPoint = Event::GetScreenCoords(aPresContext, aEvent,
LayoutDeviceIntPoint::FromUntyped(mRefPoint));
aPresContext, aEvent, mRefPoint, mClientPoint);
mScreenPoint = Event::GetScreenCoords(aPresContext, aEvent, mRefPoint);
mPointsInitialized = true;
}

View File

@ -40,7 +40,7 @@ public:
float aRotationAngle,
float aForce);
Touch(int32_t aIdentifier,
nsIntPoint aPoint,
LayoutDeviceIntPoint aPoint,
nsIntPoint aRadius,
float aRotationAngle,
float aForce);
@ -73,7 +73,7 @@ public:
float Force() const { return mForce; }
nsCOMPtr<EventTarget> mTarget;
nsIntPoint mRefPoint;
LayoutDeviceIntPoint mRefPoint;
bool mChanged;
uint32_t mMessage;
int32_t mIdentifier;

View File

@ -2302,9 +2302,8 @@ TabChild::RecvMouseWheelEvent(const WidgetWheelEvent& aEvent,
if (nsIPresShell* shell = document->GetShell()) {
if (nsIFrame* rootFrame = shell->GetRootFrame()) {
nsTArray<ScrollableLayerGuid> targets;
nsIntPoint refPoint(aEvent.refPoint.x, aEvent.refPoint.y);
bool waitForRefresh =
PrepareForSetTargetAPZCNotification(aGuid, aInputBlockId, rootFrame, refPoint, &targets);
PrepareForSetTargetAPZCNotification(aGuid, aInputBlockId, rootFrame, aEvent.refPoint, &targets);
SendSetTargetAPZCNotification(shell, aInputBlockId, targets, waitForRefresh);
}
@ -2541,7 +2540,7 @@ bool
TabChild::PrepareForSetTargetAPZCNotification(const ScrollableLayerGuid& aGuid,
const uint64_t& aInputBlockId,
nsIFrame* aRootFrame,
const nsIntPoint& aRefPoint,
const LayoutDeviceIntPoint& aRefPoint,
nsTArray<ScrollableLayerGuid>* aTargets)
{
ScrollableLayerGuid guid(aGuid.mLayersId, 0, FrameMetrics::NULL_SCROLL_ID);

View File

@ -592,7 +592,7 @@ private:
bool PrepareForSetTargetAPZCNotification(const ScrollableLayerGuid& aGuid,
const uint64_t& aInputBlockId,
nsIFrame* aRootFrame,
const nsIntPoint& aRefPoint,
const LayoutDeviceIntPoint& aRefPoint,
nsTArray<ScrollableLayerGuid>* aTargets);
// Sends a SetTarget notification for APZC, given one or more previous

View File

@ -1085,7 +1085,7 @@ TabParent::MapEventCoordinatesForChildProcess(
for (uint32_t i = 0; i < touches.Length(); ++i) {
Touch* touch = touches[i];
if (touch) {
touch->mRefPoint += LayoutDeviceIntPoint::ToUntyped(aOffset);
touch->mRefPoint += aOffset;
}
}
}
@ -1731,7 +1731,7 @@ TabParent::GetChildProcessOffset()
return offset;
}
nsPoint pt = nsLayoutUtils::GetEventCoordinatesRelativeTo(widget,
nsIntPoint(0, 0),
LayoutDeviceIntPoint(0, 0),
targetFrame);
return LayoutDeviceIntPoint::ToUntyped(LayoutDeviceIntPoint::FromAppUnitsToNearest(
@ -2485,7 +2485,7 @@ TabParent::InjectTouchEvent(const nsAString& aType,
presContext->AppUnitsPerDevPixel());
nsRefPtr<Touch> t = new Touch(aIdentifiers[i],
LayoutDeviceIntPoint::ToUntyped(pt),
pt,
nsIntPoint(aRxs[i], aRys[i]),
aRotationAngles[i],
aForces[i]);

View File

@ -355,16 +355,15 @@ APZCCallbackHelper::ApplyCallbackTransform(const CSSPoint& aInput,
return input;
}
nsIntPoint
APZCCallbackHelper::ApplyCallbackTransform(const nsIntPoint& aPoint,
LayoutDeviceIntPoint
APZCCallbackHelper::ApplyCallbackTransform(const LayoutDeviceIntPoint& aPoint,
const ScrollableLayerGuid& aGuid,
const CSSToLayoutDeviceScale& aScale,
float aPresShellResolution)
{
LayoutDevicePoint point = LayoutDevicePoint(aPoint.x, aPoint.y);
point = ApplyCallbackTransform(point / aScale, aGuid, aPresShellResolution) * aScale;
LayoutDeviceIntPoint ret = gfx::RoundedToInt(point);
return nsIntPoint(ret.x, ret.y);
return gfx::RoundedToInt(point);
}
nsEventStatus

View File

@ -99,13 +99,14 @@ public:
const ScrollableLayerGuid& aGuid,
float aPresShellResolution);
/* Same as above, but operates on nsIntPoint that are assumed to be in LayoutDevice
pixel space. Requires an additonal |aScale| parameter to convert between CSS and
/* Same as above, but operates on LayoutDeviceIntPoint.
Requires an additonal |aScale| parameter to convert between CSS and
LayoutDevice space. */
static nsIntPoint ApplyCallbackTransform(const nsIntPoint& aPoint,
const ScrollableLayerGuid& aGuid,
const CSSToLayoutDeviceScale& aScale,
float aPresShellResolution);
static mozilla::LayoutDeviceIntPoint
ApplyCallbackTransform(const LayoutDeviceIntPoint& aPoint,
const ScrollableLayerGuid& aGuid,
const CSSToLayoutDeviceScale& aScale,
float aPresShellResolution);
/* Dispatch a widget event via the widget stored in the event, if any.
* In a child process, allows the TabParent event-capture mechanism to

View File

@ -161,7 +161,7 @@ SelectionCarets::HandleEvent(WidgetEvent* aEvent)
}
WidgetTouchEvent *touchEvent = aEvent->AsTouchEvent();
nsIntPoint movePoint;
LayoutDeviceIntPoint movePoint;
int32_t nowTouchId = -1;
if (touchEvent && !touchEvent->touches.IsEmpty()) {
// If touch happened, just grab event with same identifier
@ -183,7 +183,7 @@ SelectionCarets::HandleEvent(WidgetEvent* aEvent)
nowTouchId = touchEvent->touches[0]->Identifier();
}
} else if (mouseEvent) {
movePoint = LayoutDeviceIntPoint::ToUntyped(mouseEvent->AsGUIEvent()->refPoint);
movePoint = mouseEvent->AsGUIEvent()->refPoint;
}
// Get event coordinate relative to root frame

View File

@ -629,7 +629,7 @@ TouchCaret::GetEventPosition(WidgetTouchEvent* aEvent, int32_t aIdentifier)
if (aEvent->touches[i]->mIdentifier == aIdentifier) {
// Get event coordinate relative to canvas frame.
nsIFrame* canvasFrame = GetCanvasFrame();
nsIntPoint touchIntPoint = aEvent->touches[i]->mRefPoint;
LayoutDeviceIntPoint touchIntPoint = aEvent->touches[i]->mRefPoint;
return nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent,
touchIntPoint,
canvasFrame);
@ -643,8 +643,7 @@ TouchCaret::GetEventPosition(WidgetMouseEvent* aEvent)
{
// Get event coordinate relative to canvas frame.
nsIFrame* canvasFrame = GetCanvasFrame();
nsIntPoint mouseIntPoint =
LayoutDeviceIntPoint::ToUntyped(aEvent->AsGUIEvent()->refPoint);
LayoutDeviceIntPoint mouseIntPoint = aEvent->AsGUIEvent()->refPoint;
return nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent,
mouseIntPoint,
canvasFrame);

View File

@ -1912,13 +1912,13 @@ nsLayoutUtils::GetEventCoordinatesRelativeTo(const WidgetEvent* aEvent,
return nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE);
return GetEventCoordinatesRelativeTo(aEvent,
LayoutDeviceIntPoint::ToUntyped(aEvent->AsGUIEvent()->refPoint),
aEvent->AsGUIEvent()->refPoint,
aFrame);
}
nsPoint
nsLayoutUtils::GetEventCoordinatesRelativeTo(const WidgetEvent* aEvent,
const nsIntPoint aPoint,
const LayoutDeviceIntPoint& aPoint,
nsIFrame* aFrame)
{
if (!aFrame) {
@ -1935,7 +1935,7 @@ nsLayoutUtils::GetEventCoordinatesRelativeTo(const WidgetEvent* aEvent,
nsPoint
nsLayoutUtils::GetEventCoordinatesRelativeTo(nsIWidget* aWidget,
const nsIntPoint aPoint,
const LayoutDeviceIntPoint& aPoint,
nsIFrame* aFrame)
{
if (!aFrame || !aWidget) {
@ -2658,7 +2658,7 @@ static nsIntPoint WidgetToWidgetOffset(nsIWidget* aFrom, nsIWidget* aTo) {
nsPoint
nsLayoutUtils::TranslateWidgetToView(nsPresContext* aPresContext,
nsIWidget* aWidget, nsIntPoint aPt,
nsIWidget* aWidget, const LayoutDeviceIntPoint& aPt,
nsView* aView)
{
nsPoint viewOffset;
@ -2667,7 +2667,8 @@ nsLayoutUtils::TranslateWidgetToView(nsPresContext* aPresContext,
return nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE);
}
nsIntPoint widgetPoint = aPt + WidgetToWidgetOffset(aWidget, viewWidget);
LayoutDeviceIntPoint widgetPoint = aPt +
LayoutDeviceIntPoint::FromUntyped(WidgetToWidgetOffset(aWidget, viewWidget));
nsPoint widgetAppUnits(aPresContext->DevPixelsToAppUnits(widgetPoint.x),
aPresContext->DevPixelsToAppUnits(widgetPoint.y));
return widgetAppUnits - viewOffset;

View File

@ -679,7 +679,7 @@ public:
*/
static nsPoint GetEventCoordinatesRelativeTo(
const mozilla::WidgetEvent* aEvent,
const nsIntPoint aPoint,
const mozilla::LayoutDeviceIntPoint& aPoint,
nsIFrame* aFrame);
/**
@ -693,7 +693,7 @@ public:
* the event is not a GUI event).
*/
static nsPoint GetEventCoordinatesRelativeTo(nsIWidget* aWidget,
const nsIntPoint aPoint,
const mozilla::LayoutDeviceIntPoint& aPoint,
nsIFrame* aFrame);
/**
@ -716,7 +716,8 @@ public:
* @return the point in the view's coordinates
*/
static nsPoint TranslateWidgetToView(nsPresContext* aPresContext,
nsIWidget* aWidget, nsIntPoint aPt,
nsIWidget* aWidget,
const mozilla::LayoutDeviceIntPoint& aPt,
nsView* aView);
/**

View File

@ -6753,8 +6753,7 @@ PresShell::RecordMouseLocation(WidgetGUIEvent* aEvent)
if (!rootFrame) {
nsView* rootView = mViewManager->GetRootView();
mMouseLocation = nsLayoutUtils::TranslateWidgetToView(mPresContext,
aEvent->widget, LayoutDeviceIntPoint::ToUntyped(aEvent->refPoint),
rootView);
aEvent->widget, aEvent->refPoint, rootView);
} else {
mMouseLocation =
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, rootFrame);
@ -8518,12 +8517,12 @@ PresShell::AdjustContextMenuKeyEvent(WidgetMouseEvent* aEvent)
}
// see if we should use the caret position for the popup
nsIntPoint caretPoint;
LayoutDeviceIntPoint caretPoint;
// Beware! This may flush notifications via synchronous
// ScrollSelectionIntoView.
if (PrepareToUseCaretPosition(aEvent->widget, caretPoint)) {
// caret position is good
aEvent->refPoint = LayoutDeviceIntPoint::FromUntyped(caretPoint);
aEvent->refPoint = caretPoint;
return true;
}
@ -8564,7 +8563,8 @@ PresShell::AdjustContextMenuKeyEvent(WidgetMouseEvent* aEvent)
// relative to. The returned point is in device pixels realtive to the
// widget passed in.
bool
PresShell::PrepareToUseCaretPosition(nsIWidget* aEventWidget, nsIntPoint& aTargetPt)
PresShell::PrepareToUseCaretPosition(nsIWidget* aEventWidget,
LayoutDeviceIntPoint& aTargetPt)
{
nsresult rv;

View File

@ -690,7 +690,8 @@ protected:
bool AdjustContextMenuKeyEvent(mozilla::WidgetMouseEvent* aEvent);
//
bool PrepareToUseCaretPosition(nsIWidget* aEventWidget, nsIntPoint& aTargetPt);
bool PrepareToUseCaretPosition(nsIWidget* aEventWidget,
mozilla::LayoutDeviceIntPoint& aTargetPt);
// Get the selected item and coordinates in device pixels relative to root
// document's root view for element, first ensuring the element is onscreen

View File

@ -585,8 +585,7 @@ nsNumberControlFrame::GetSpinButtonForPointerEvent(WidgetGUIEvent* aEvent) const
LayoutDeviceIntPoint absPoint = aEvent->refPoint;
nsPoint point =
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent,
LayoutDeviceIntPoint::ToUntyped(absPoint),
mSpinBox->GetPrimaryFrame());
absPoint, mSpinBox->GetPrimaryFrame());
if (point != nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE)) {
if (point.y < mSpinBox->GetPrimaryFrame()->GetSize().height / 2) {
return eSpinButtonUp;

View File

@ -492,14 +492,12 @@ nsRangeFrame::GetValueAtEventPoint(WidgetGUIEvent* aEvent)
if (aEvent->mClass == eTouchEventClass) {
MOZ_ASSERT(aEvent->AsTouchEvent()->touches.Length() == 1,
"Unexpected number of touches");
absPoint = LayoutDeviceIntPoint::FromUntyped(
aEvent->AsTouchEvent()->touches[0]->mRefPoint);
absPoint = aEvent->AsTouchEvent()->touches[0]->mRefPoint;
} else {
absPoint = aEvent->refPoint;
}
nsPoint point =
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent,
LayoutDeviceIntPoint::ToUntyped(absPoint), this);
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, absPoint, this);
if (point == nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE)) {
// We don't want to change the current value for this error state.

View File

@ -2097,7 +2097,8 @@ bool
nsBoxFrame::GetEventPoint(WidgetGUIEvent* aEvent, nsPoint &aPoint) {
nsIntPoint refPoint;
bool res = GetEventPoint(aEvent, refPoint);
aPoint = nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, refPoint, this);
aPoint = nsLayoutUtils::GetEventCoordinatesRelativeTo(
aEvent, LayoutDeviceIntPoint::FromUntyped(refPoint), this);
return res;
}
@ -2117,7 +2118,7 @@ nsBoxFrame::GetEventPoint(WidgetGUIEvent* aEvent, nsIntPoint &aPoint) {
if (!touch) {
return false;
}
aPoint = touch->mRefPoint;
aPoint = LayoutDeviceIntPoint::ToUntyped(touch->mRefPoint);
} else {
aPoint = LayoutDeviceIntPoint::ToUntyped(aEvent->refPoint);
}

View File

@ -75,7 +75,9 @@ ContentHelper::GetAllowedTouchBehavior(nsIWidget* aWidget, const nsIntPoint& aPo
nsView *view = nsView::GetViewFor(aWidget);
nsIFrame *viewFrame = view->GetFrame();
nsPoint relativePoint = nsLayoutUtils::GetEventCoordinatesRelativeTo(aWidget, aPoint, viewFrame);
nsPoint relativePoint =
nsLayoutUtils::GetEventCoordinatesRelativeTo(
aWidget, LayoutDeviceIntPoint::FromUntyped(aPoint), viewFrame);
nsIFrame *target = nsLayoutUtils::GetFrameForPoint(viewFrame, relativePoint, nsLayoutUtils::IGNORE_ROOT_SCROLL_FRAME);
nsIScrollableFrame *nearestScrollableParent = nsLayoutUtils::GetNearestScrollableFrame(target, 0);

View File

@ -21,7 +21,7 @@ already_AddRefed<Touch> SingleTouchData::ToNewDOMTouch() const
NS_ABORT_IF_FALSE(NS_IsMainThread(),
"Can only create dom::Touch instances on main thread");
nsRefPtr<Touch> touch = new Touch(mIdentifier,
nsIntPoint(mScreenPoint.x, mScreenPoint.y),
LayoutDeviceIntPoint(mScreenPoint.x, mScreenPoint.y),
nsIntPoint(mRadius.width, mRadius.height),
mRotationAngle,
mForce);

View File

@ -738,7 +738,7 @@ AndroidGeckoEvent::MakeTouchEvent(nsIWidget* widget)
// and the Points() array has points in CSS pixels, which we need
// to convert.
CSSToLayoutDeviceScale scale = widget->GetDefaultScale();
nsIntPoint pt(
LayoutDeviceIntPoint pt(
(Points()[i].x * scale.scale) - offset.x,
(Points()[i].y * scale.scale) - offset.y);
nsIntPoint radii(

View File

@ -1095,7 +1095,7 @@ bool nsWindow::OnMultitouchEvent(AndroidGeckoEvent *ae)
// retargeted. The Fennec browser.js code can use this to activate the
// highlight element in case the this touchstart is the start of a tap.
WidgetMouseEvent hittest(true, NS_MOUSE_MOZHITTEST, this, WidgetMouseEvent::eReal);
hittest.refPoint = LayoutDeviceIntPoint::FromUntyped(event.touches[0]->mRefPoint);
hittest.refPoint = event.touches[0]->mRefPoint;
hittest.ignoreRootScrollFrame = true;
hittest.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
nsEventStatus status;
@ -1140,8 +1140,8 @@ bool nsWindow::OnMultitouchEvent(AndroidGeckoEvent *ae)
void
nsWindow::OnNativeGestureEvent(AndroidGeckoEvent *ae)
{
nsIntPoint pt(ae->Points()[0].x,
ae->Points()[0].y);
LayoutDeviceIntPoint pt(ae->Points()[0].x,
ae->Points()[0].y);
double delta = ae->X();
int msg = 0;
@ -1170,7 +1170,7 @@ nsWindow::OnNativeGestureEvent(AndroidGeckoEvent *ae)
void
nsWindow::DispatchGestureEvent(uint32_t msg, uint32_t direction, double delta,
const nsIntPoint &refPoint, uint64_t time)
const LayoutDeviceIntPoint &refPoint, uint64_t time)
{
WidgetSimpleGestureEvent event(true, msg, this);
@ -1178,7 +1178,7 @@ nsWindow::DispatchGestureEvent(uint32_t msg, uint32_t direction, double delta,
event.delta = delta;
event.modifiers = 0;
event.time = time;
event.refPoint = LayoutDeviceIntPoint::FromUntyped(refPoint);
event.refPoint = refPoint;
DispatchEvent(&event);
}

View File

@ -239,7 +239,7 @@ private:
mozilla::AndroidGeckoEvent& key,
ANPEvent* pluginEvent);
void DispatchGestureEvent(uint32_t msg, uint32_t direction, double delta,
const nsIntPoint &refPoint, uint64_t time);
const mozilla::LayoutDeviceIntPoint &refPoint, uint64_t time);
void HandleSpecialKey(mozilla::AndroidGeckoEvent *ae);
void CreateLayerManager(int aCompositorWidth, int aCompositorHeight);
void RedrawAll();

View File

@ -286,8 +286,7 @@ struct ParamTraits<mozilla::WidgetTouchEvent>
}
aResult->touches.AppendElement(
new mozilla::dom::Touch(
identifier, mozilla::LayoutDeviceIntPoint::ToUntyped(refPoint),
radius, rotationAngle, force));
identifier, refPoint, radius, rotationAngle, force));
}
return true;
}

View File

@ -6204,7 +6204,7 @@ bool nsWindow::OnTouch(WPARAM wParam, LPARAM lParam)
touchPoint.ScreenToClient(mWnd);
nsRefPtr<Touch> touch =
new Touch(pInputs[i].dwID,
touchPoint,
LayoutDeviceIntPoint::FromUntyped(touchPoint),
/* radius, if known */
pInputs[i].dwFlags & TOUCHINPUTMASKF_CONTACTAREA ?
nsIntPoint(