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

Unified Diff: content/browser/renderer_host/input/web_input_event_util.cc

Issue 822803005: Correct missing radius in ui::TouchEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix DCHECK. Created 5 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 | « no previous file | ui/events/event.h » ('j') | ui/events/event_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/web_input_event_util.cc
diff --git a/content/browser/renderer_host/input/web_input_event_util.cc b/content/browser/renderer_host/input/web_input_event_util.cc
index bfba064bdf6889c5778526f601429c194affc65e..04d6372c7d2bdf5f06f1324c9e39b019966bae30 100644
--- a/content/browser/renderer_host/input/web_input_event_util.cc
+++ b/content/browser/renderer_host/input/web_input_event_util.cc
@@ -210,6 +210,10 @@ WebTouchPoint CreateWebTouchPoint(const MotionEvent& event,
float major_radius = event.GetTouchMajor(pointer_index) / 2.f;
float minor_radius = event.GetTouchMinor(pointer_index) / 2.f;
+
+ DCHECK_LE(minor_radius, major_radius);
+ DCHECK_IMPLIES(major_radius, minor_radius);
+
float orientation_deg = event.GetOrientation(pointer_index) * 180.f / M_PI;
DCHECK_GE(major_radius, 0);
DCHECK_GE(minor_radius, 0);
« no previous file with comments | « no previous file | ui/events/event.h » ('j') | ui/events/event_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698