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

Unified Diff: ui/events/events_default.cc

Issue 2648583003: Handle floating point coordinates from ozone to exosphere (Closed)
Patch Set: fixed wayland unittest 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
« no previous file with comments | « ui/events/event_utils.h ('k') | ui/events/events_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/events_default.cc
diff --git a/ui/events/events_default.cc b/ui/events/events_default.cc
index 6b0f95eaefc03ce56b7b56ea5cfae70879897be6..2d2b682ef2c4acfa6c07ce46cb1e910979041486 100644
--- a/ui/events/events_default.cc
+++ b/ui/events/events_default.cc
@@ -36,6 +36,14 @@ gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) {
return EventSystemLocationFromNative(native_event);
}
+gfx::PointF EventLocationFromNativeF(const base::NativeEvent& native_event) {
+ const ui::LocatedEvent* e =
+ static_cast<const ui::LocatedEvent*>(native_event);
+ DCHECK(e->IsMouseEvent() || e->IsTouchEvent() || e->IsGestureEvent() ||
+ e->IsScrollEvent());
+ return e->location_f();
+}
+
int GetChangedMouseButtonFlagsFromNative(
const base::NativeEvent& native_event) {
const ui::MouseEvent* event =
« no previous file with comments | « ui/events/event_utils.h ('k') | ui/events/events_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698