mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 15:43:10 -10:00
Bug 1284837 - Disallow implicit conversions from float to integer when creating IntPoint and IntSize objects. r=botond
This commit is contained in:
1 parent
c99f68073c
commit
3766bcc94a
35 files changed
+139
-83
No files matched your search
@@ -507,10 +507,10 @@ AndroidGeckoEvent::MakeTouchEvent(nsIWidget* widget)
|
||||
// and the Points() array has points in CSS pixels, which we need
|
||||
// to convert.
|
||||
CSSToLayoutDeviceScale scale = widget->GetDefaultScale();
|
||||
LayoutDeviceIntPoint pt(
|
||||
auto pt = LayoutDeviceIntPoint::Truncate(
|
||||
(Points()[i].x * scale.scale) - offset.x,
|
||||
(Points()[i].y * scale.scale) - offset.y);
|
||||
LayoutDeviceIntPoint radius(
|
||||
auto radius = LayoutDeviceIntPoint::Truncate(
|
||||
PointRadii()[i].x * scale.scale,
|
||||
PointRadii()[i].y * scale.scale);
|
||||
RefPtr<Touch> t = new Touch(PointIndicies()[i],
|
||||
@@ -625,8 +625,8 @@ AndroidGeckoEvent::MakeMouseEvent(nsIWidget* widget)
|
||||
const LayoutDeviceIntPoint& offset = widget->WidgetToScreenOffset();
|
||||
CSSToLayoutDeviceScale scale = widget->GetDefaultScale();
|
||||
event.mRefPoint =
|
||||
LayoutDeviceIntPoint((Points()[0].x * scale.scale) - offset.x,
|
||||
(Points()[0].y * scale.scale) - offset.y);
|
||||
LayoutDeviceIntPoint::Truncate((Points()[0].x * scale.scale) - offset.x,
|
||||
(Points()[0].y * scale.scale) - offset.y);
|
||||
return event;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user