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

Unified Diff: content/browser/renderer_host/web_input_event_aurax11.cc

Issue 10383249: touch: Make sure the correct radius values are used for touch events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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/aura/event.h » ('j') | ui/aura/event.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/web_input_event_aurax11.cc
diff --git a/content/browser/renderer_host/web_input_event_aurax11.cc b/content/browser/renderer_host/web_input_event_aurax11.cc
index 8b20ea224089fe918e87b201b063710b53474968..905a52e5dfc297ca5c1a1c566fe00b1708a3cc50 100644
--- a/content/browser/renderer_host/web_input_event_aurax11.cc
+++ b/content/browser/renderer_host/web_input_event_aurax11.cc
@@ -410,8 +410,9 @@ WebKit::WebTouchPoint* UpdateWebTouchEventFromAuraEvent(
if (!point)
return NULL;
- point->radiusX = event->radius_x();
- point->radiusY = event->radius_y();
+ // The spec requires the radii values to be positive (and 1 when unknown).
+ point->radiusX = std::max(1.f, event->radius_x());
+ point->radiusY = std::max(1.f, event->radius_y());
point->rotationAngle = event->rotation_angle();
point->force = event->force();
« no previous file with comments | « no previous file | ui/aura/event.h » ('j') | ui/aura/event.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698