summaryrefslogtreecommitdiffstats
path: root/ui/base
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-19 01:36:29 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-19 01:36:29 +0000
commitc5fb6520d76ffd57cf453b0b9e54c1bcd8aed922 (patch)
tree40f8dc37f7f73d35bb721a399dcfb164833f8005 /ui/base
parent3c1c0bee1791d9884196df6616a14811808a5c90 (diff)
downloadchromium_src-c5fb6520d76ffd57cf453b0b9e54c1bcd8aed922.zip
chromium_src-c5fb6520d76ffd57cf453b0b9e54c1bcd8aed922.tar.gz
chromium_src-c5fb6520d76ffd57cf453b0b9e54c1bcd8aed922.tar.bz2
touch: Make sure the correct radius values are used for touch events.
The device may not always report the radii values for a touch event. In such cases, instead of making up a default value, always use 0 so that it is easy to determine if the radius is the real radius reported by the device or not. Also, at the same time, make sure that the radius value sent to webkit follows the spec. Also fix the radii adjustment for device-scale-factor. BUG=128553 TEST=manually with test-pages Review URL: https://chromiumcodereview.appspot.com/10383249 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-rw-r--r--ui/base/x/events_x.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/base/x/events_x.cc b/ui/base/x/events_x.cc
index 47cb746..4d822e4 100644
--- a/ui/base/x/events_x.cc
+++ b/ui/base/x/events_x.cc
@@ -834,12 +834,12 @@ int GetTouchId(const base::NativeEvent& xev) {
float GetTouchRadiusX(const base::NativeEvent& native_event) {
return GetTouchParamFromXEvent(native_event,
- ui::TouchFactory::TP_TOUCH_MAJOR, 2.0) / 2.0;
+ ui::TouchFactory::TP_TOUCH_MAJOR, 0.0) / 2.0;
}
float GetTouchRadiusY(const base::NativeEvent& native_event) {
return GetTouchParamFromXEvent(native_event,
- ui::TouchFactory::TP_TOUCH_MINOR, 2.0) / 2.0;
+ ui::TouchFactory::TP_TOUCH_MINOR, 0.0) / 2.0;
}
float GetTouchAngle(const base::NativeEvent& native_event) {