Bug 91799 - Touch force values can be outside the valid range on Android
Summary: Touch force values can be outside the valid range on Android
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Android Android
: P2 Normal
Assignee: Ben Murdoch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-19 16:54 PDT by Rick Byers
Modified: 2019-02-06 09:19 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Byers 2012-07-19 16:54:49 PDT
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.
Comment 1 Rick Byers 2012-12-04 09:13:45 PST
+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?
Comment 2 Rick Byers 2014-10-28 14:54:45 PDT
Obsolete.  Fixed in chromium.
Comment 3 Lucas Forschler 2019-02-06 09:19:08 PST
Mass move bugs into the DOM component.