Bug 91799
Summary: | Touch force values can be outside the valid range on Android | ||
---|---|---|---|
Product: | WebKit | Reporter: | Rick Byers <rbyers> |
Component: | DOM | Assignee: | Ben Murdoch <benm> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | peter |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Android | ||
OS: | Android |
Rick Byers
The TouchEvent v2 spec says that force should be between 0 and 1: http://dvcs.w3.org/hg/webevents/raw-file/default/touchevents.html#widl-Touch-force
On Android I can easily get values greater than 1. We should probably try to infer the maximum value (maybe by keeping track) and scale appropriately. Alternately we should consider not reporting force at all (in order to avoid a compatibility burden later).
Test pages I used are:
http://www.rbyers.net/paint.html
http://www.rbyers.net/eventTest.html (with 'simple' turned off to get force/radius info)
Ben, please reassign as appropriate.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Rick Byers
+peter who said he could look into this.
benm said:
Force correlates to the Android MotionEvent.getPressure API, which the documentation states that the value "generally ranges from 0 (no pressure at all) to 1 (normal pressure), however values higher than 1 may be generated depending on the calibration of the input device."
Would it be reasonable to just trunacte the values we get out of the Android API at 1 in order to be compliant?
Rick Byers
Obsolete. Fixed in chromium.
Lucas Forschler
Mass move bugs into the DOM component.