Bug 896251 - Make nsEvent::{refPoint, lastRefPoint} LayoutDeviceIntPoints; r=smaug+kats

This commit is contained in:
Ms2ger
2013-08-02 09:05:16 +02:00
parent 4dd7fdb52a
commit 71e84fb181
35 changed files with 202 additions and 166 deletions

View File

@@ -476,16 +476,18 @@ nsRangeFrame::GetValueAtEventPoint(nsGUIEvent* aEvent)
}
Decimal range = maximum - minimum;
nsIntPoint absPoint;
LayoutDeviceIntPoint absPoint;
if (aEvent->eventStructType == NS_TOUCH_EVENT) {
MOZ_ASSERT(static_cast<nsTouchEvent*>(aEvent)->touches.Length() == 1,
"Unexpected number of touches");
absPoint = static_cast<nsTouchEvent*>(aEvent)->touches[0]->mRefPoint;
absPoint = LayoutDeviceIntPoint::FromUntyped(
static_cast<nsTouchEvent*>(aEvent)->touches[0]->mRefPoint);
} else {
absPoint = aEvent->refPoint;
}
nsPoint point =
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, absPoint, this);
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent,
LayoutDeviceIntPoint::ToUntyped(absPoint), this);
if (point == nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE)) {
// We don't want to change the current value for this error state.