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

Unified Diff: ui/aura/event.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 | « ui/aura/event.h ('k') | ui/base/x/events_x.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/event.cc
diff --git a/ui/aura/event.cc b/ui/aura/event.cc
index 8a3bab0f7842004b6908a5f81e18ead4fa3dfa8f..2d148d1d442fef3faca35c110ecb6c726bcad987 100644
--- a/ui/aura/event.cc
+++ b/ui/aura/event.cc
@@ -271,8 +271,8 @@ TouchEvent::TouchEvent(ui::EventType type,
base::TimeDelta time_stamp)
: LocatedEvent(type, location, location, 0),
touch_id_(touch_id),
- radius_x_(1.0f),
- radius_y_(1.0f),
+ radius_x_(0.0f),
+ radius_y_(0.0f),
rotation_angle_(0.0f),
force_(0.0f) {
set_time_stamp(time_stamp);
@@ -285,8 +285,8 @@ void TouchEvent::UpdateForRootTransform(const ui::Transform& root_transform) {
LocatedEvent::UpdateForRootTransform(root_transform);
gfx::Point3f scale;
ui::InterpolatedTransform::FactorTRS(root_transform, NULL, NULL, &scale);
- radius_x_ *= scale.x();
- radius_y_ *= scale.y();
+ radius_x_ /= scale.x();
sky 2012/05/18 19:57:37 Are we sure these are non-zero?
sadrul 2012/05/18 20:07:32 Ah, good point. I think in normal cases, the scale
+ radius_y_ /= scale.y();
}
ui::EventType TouchEvent::GetEventType() const {
« no previous file with comments | « ui/aura/event.h ('k') | ui/base/x/events_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698