pointerup pressure should always be 0 |
|||||||||
Issue description
"pointerup" is defined to be when a {finger,stylus} loses contact with the screen or when mouse buttons are no longer being pushed. Therefore, I'd expect the pressure value of every pointerup event to be 0. Moreover, the spec requires pressure to be 0 if the hardware doesn't support it and no buttons are active (that is, the pointer is up).
Maddeningly, its actual value is different across implementations. Here's the current breakdown:
| Platform | Browser | Pointer | pointerup pressure: 0 | pointerup pressure same as last pointermove |
| ------------- | -------------- | ------------ | --------------------- | ------------------------------------------- |
| Android | Chrome | touch | | X |
| iOS | Safari via PEP | touch | | X |
| Mac | Chrome | trackpad | X | |
| Mac | Chrome | Wacom stylus | X | |
| Mac | Chrome | Wacom touch | | X (always 1, spec says it should be .5) |
| Mac | Firefox | trackpad | X | |
| Mac | Firefox | Wacom stylus | X | |
| Mac | Firefox | Wacom touch | X | |
| Mac | Safari via PEP | trackpad | X | |
| Mac | Safari via PEP | Wacom stylus | X | |
| Mac | Safari via PEP | Wacom touch | X | |
| ChromeOS | Chrome | touch | | X |
| ChromeOS | Chrome | trackpad | X | |
| Windows | Chrome or Edge | touch | | X |
| Windows | Chrome or Edge | trackpad | X | |
| Windows | Chrome or Edge | stylus | X | |
| Windows | Firefox | touch | X | |
| Windows | Firefox | trackpad | X | |
| Windows | Firefox | stylus | X | |
tl;dr:
- Firefox always sets pressure to 0 in pointerup.
- The other desktop browsers use 0 for stylus and trackpad, but the last pointermove value for touch.
- iOS and Android both use the last pressure value from pointermove.
Can we please match Firefox's behavior (and what's already specified for pointers that don't support pressure) and enforce that pressure is always 0 in pointerup?
,
Sep 20 2016
Here are the relevant bugs against the spec and PEP: https://github.com/w3c/pointerevents/issues/146/ https://github.com/jquery/PEP/issues/180/
,
Sep 20 2016
,
Sep 20 2016
,
Sep 20 2016
,
Sep 21 2016
,
Sep 21 2016
Lan can you take a look at this one? We can either just set the pressure of pointerup to 0 always in PointerEventFactory https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/events/PointerEventFactory.cpp?q=PointerEventFactory&sq=package:chromium&dr=CSs&l=86 or maybe more ideally just set the force to nan for touchup in the lower levels for so that the code in blink follows the correct path in getPointerEventPressure.
,
Sep 21 2016
,
Sep 22 2016
,
Feb 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e1fcfcddcd90de5017009feefa7e18716c450f4e commit e1fcfcddcd90de5017009feefa7e18716c450f4e Author: lanwei <lanwei@chromium.org> Date: Wed Feb 22 16:39:17 2017 Make sure that the pressure is always 0 for pointerup events The pressure value is correct on Mac and Windows. We correct them on on Android and linux. Also, for synthetic touch events and touch events from touch emulator, make the pressure 0 for all the touch release events. BUG= 648777 Review-Url: https://codereview.chromium.org/2700623003 Cr-Commit-Position: refs/heads/master@{#452081} [modify] https://crrev.com/e1fcfcddcd90de5017009feefa7e18716c450f4e/content/browser/renderer_host/input/touch_emulator.cc [modify] https://crrev.com/e1fcfcddcd90de5017009feefa7e18716c450f4e/content/common/input/synthetic_web_input_event_builders.cc [delete] https://crrev.com/baff1b62a218ccb26e1fd06f6a192bbabc937ee1/third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerevent_attributes_nohover_pointers-manual-expected.txt [modify] https://crrev.com/e1fcfcddcd90de5017009feefa7e18716c450f4e/ui/events/android/motion_event_android.cc [modify] https://crrev.com/e1fcfcddcd90de5017009feefa7e18716c450f4e/ui/events/x/events_x_unittest.cc [modify] https://crrev.com/e1fcfcddcd90de5017009feefa7e18716c450f4e/ui/events/x/events_x_utils.cc
,
Feb 25 2017
|
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by brentons@google.com
, Sep 20 2016