Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: components/exo/touch.cc

Issue 2648583003: Handle floating point coordinates from ozone to exosphere (Closed)
Patch Set: added F variant to screen position client. fixed exo tests. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/exo/touch.cc
diff --git a/components/exo/touch.cc b/components/exo/touch.cc
index 7d06d80aad6aa699b200b2192d892429ada5317b..5394b67e071b771101a0ccf6ca72f27b2815647f 100644
--- a/components/exo/touch.cc
+++ b/components/exo/touch.cc
@@ -77,9 +77,9 @@ void Touch::OnTouchEvent(ui::TouchEvent* event) {
// Convert location to focus surface coordinate space.
DCHECK(focus_);
- gfx::Point location = event->location();
- aura::Window::ConvertPointToTarget(target->window(), focus_->window(),
- &location);
+ gfx::PointF location = event->location_f();
+ aura::Window::ConvertPointToTargetF(target->window(), focus_->window(),
+ &location);
oshima 2017/01/20 22:11:54 If event system can pass through root_location_f,
sadrul 2017/01/20 22:35:18 |event| should have the correct root-location here
denniskempin 2017/01/20 23:22:19 I am trying that right now, it would be great if t
// Generate a touch down event for the focus surface. Note that this can
// be different from the target surface.
@@ -115,13 +115,12 @@ void Touch::OnTouchEvent(ui::TouchEvent* event) {
DCHECK(focus_);
// Convert location to focus surface coordinate space.
- gfx::Point location = event->location();
- aura::Window::ConvertPointToTarget(
+ gfx::PointF location = event->location_f();
+ aura::Window::ConvertPointToTargetF(
static_cast<aura::Window*>(event->target()), focus_->window(),
&location);
-
delegate_->OnTouchMotion(event->time_stamp(), event->touch_id(),
- location);
+ event->location_f());
send_details = true;
} break;
case ui::ET_TOUCH_CANCELLED: {

Powered by Google App Engine
This is Rietveld 408576698