summaryrefslogtreecommitdiffstats
path: root/ui/base/events/event.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/base/events/event.cc')
-rw-r--r--ui/base/events/event.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/base/events/event.cc b/ui/base/events/event.cc
index b593259..dd0cb47 100644
--- a/ui/base/events/event.cc
+++ b/ui/base/events/event.cc
@@ -272,8 +272,11 @@ void LocatedEvent::UpdateForRootTransform(
// Transform has to be done at root level.
gfx::Point3F p(location_);
root_transform.TransformPointReverse(p);
- // Use ToRoundedPoint so that the value -0.00001 becomes 0.
- root_location_ = location_ = gfx::ToRoundedPoint(p.AsPointF());
+ // TODO(oshima): Translating a point using reversed matrix can
+ // results in small error like 0 -> -0.01, whose floored value
+ // is -1 instead of 0. Investigate the best way to handle this,
+ // instead of just rounding it.
+ root_location_ = location_ = gfx::ToFlooredPoint(p.AsPointF());
}
////////////////////////////////////////////////////////////////////////////////