Bug 895417 - Fix refpoint coordinates sent to child processes, r=kats

This commit is contained in:
Michael Wu 2013-07-24 21:49:49 -04:00
parent c46dfcde0a
commit 82968a36ed

View File

@ -272,20 +272,22 @@ AsyncPanZoomController::ReceiveInputEvent(const nsInputEvent& aEvent,
for (uint32_t i = 0; i < touches.Length(); ++i) {
nsIDOMTouch* touch = touches[i];
if (touch) {
CSSPoint refPoint = WidgetSpaceToCompensatedViewportSpace(
CSSPoint refCSSPoint = WidgetSpaceToCompensatedViewportSpace(
ScreenPoint::FromUnknownPoint(gfx::Point(
touch->mRefPoint.x, touch->mRefPoint.y)),
currentResolution);
LayoutDevicePoint refPoint = refCSSPoint * mFrameMetrics.mDevPixelsPerCSSPixel;
touch->mRefPoint = nsIntPoint(refPoint.x, refPoint.y);
}
}
break;
}
default: {
CSSPoint refPoint = WidgetSpaceToCompensatedViewportSpace(
CSSPoint refCSSPoint = WidgetSpaceToCompensatedViewportSpace(
ScreenPoint::FromUnknownPoint(gfx::Point(
aOutEvent->refPoint.x, aOutEvent->refPoint.y)),
currentResolution);
LayoutDevicePoint refPoint = refCSSPoint * mFrameMetrics.mDevPixelsPerCSSPixel;
aOutEvent->refPoint = nsIntPoint(refPoint.x, refPoint.y);
break;
}