Bug 912166 - Make nsIWidget::GetDefaultScale return a typed scale value. r=roc
This commit is contained in:
@@ -757,12 +757,13 @@ AndroidGeckoEvent::MakeTouchEvent(nsIWidget* widget)
|
||||
// into Gecko (as opposed to going through the AsyncPanZoomController),
|
||||
// and the Points() array has points in CSS pixels, which we need
|
||||
// to convert.
|
||||
CSSToLayoutDeviceScale scale = widget->GetDefaultScale();
|
||||
nsIntPoint pt(
|
||||
(Points()[i].x * widget->GetDefaultScale()) - offset.x,
|
||||
(Points()[i].y * widget->GetDefaultScale()) - offset.y);
|
||||
(Points()[i].x * scale.scale) - offset.x,
|
||||
(Points()[i].y * scale.scale) - offset.y);
|
||||
nsIntPoint radii(
|
||||
PointRadii()[i].x * widget->GetDefaultScale(),
|
||||
PointRadii()[i].y * widget->GetDefaultScale());
|
||||
PointRadii()[i].x * scale.scale,
|
||||
PointRadii()[i].y * scale.scale);
|
||||
nsRefPtr<Touch> t = new Touch(PointIndicies()[i],
|
||||
pt,
|
||||
radii,
|
||||
|
||||
Reference in New Issue
Block a user