Intent to implement and ship: PointerEvent.tangentialPressure and PointerEvent.twist

58 views
Skip to first unread message

Lan Wei

unread,
Jan 10, 2017, 1:50:15 PM1/10/17
to blin...@chromium.org, Rick Byers, Mustaq Ahmed

Contact emails

lan...@chromium.org, mus...@chromium.org, rby...@chromium.org


Spec

https://w3c.github.io/pointerevents/#dom-pointerevent-tangentialpressure

https://w3c.github.io/pointerevents/#dom-pointerevent-twist


Summary

Adding support of tangentialPressure and twist attributes in PointerEvent API on Mac.

TangentialPressure is the normalized tangential pressure (or barrel pressure), typically set by an additional control of the stylus, which has a range of [-1,1].

Twist is the clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359].


Motivation

There are requests in the W3C PointerEvents WG that suggested us to support tangentialPressure and twist attributes for pointer events. According to NSEvent spec, Mac supports them, and we saw that Wacom Intuos Pro with XYZ stylus reports both field on Mac.

https://github.com/w3c/pointerevents/issues/70

https://github.com/w3c/pointerevents/issues/25


Interoperability and Compatibility risk

No risk. These attributes are recent additions PointerEvent API and we don’t know about any other implementation.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux,

Chrome OS, Android, and Android WebView)?

Yes


Demo link

https://output.jsbin.com/pahefaz/quiet/


OWP launch tracking bug

https://crbug.com/679794


Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/5765742146355200


Requesting approval to ship

Yes

Rick Byers

unread,
Jan 10, 2017, 2:12:33 PM1/10/17
to Lan Wei, blink-dev, Mustaq Ahmed, Robert Cohn, Dave Fleck
I support shipping this now, but I'm an editor of the spec so my vote shouldn't count.

On Tue, Jan 10, 2017 at 1:50 PM, Lan Wei <lan...@chromium.org> wrote:

Contact emails

lan...@chromium.org, mus...@chromium.org, rby...@chromium.org


Spec

https://w3c.github.io/pointerevents/#dom-pointerevent-tangentialpressure

https://w3c.github.io/pointerevents/#dom-pointerevent-twist


Summary

Adding support of tangentialPressure and twist attributes in PointerEvent API on Mac.

TangentialPressure is the normalized tangential pressure (or barrel pressure), typically set by an additional control of the stylus, which has a range of [-1,1].

Twist is the clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359].


Motivation

There are requests in the W3C PointerEvents WG that suggested us to support tangentialPressure and twist attributes for pointer events. According to NSEvent spec, Mac supports them, and we saw that Wacom Intuos Pro with XYZ stylus reports both field on Mac.

https://github.com/w3c/pointerevents/issues/70

https://github.com/w3c/pointerevents/issues/25


Interoperability and Compatibility risk

No risk. These attributes are recent additions PointerEvent API and we don’t know about any other implementation.


From an interop risk perspective I'll add that nobody else has given an explicit timeframe for implementing these properties yet (I'm guessing it's not a high priority for Microsoft because their surface pen doesn't support them), but there's agreement within the working group that the properties make sense generally.  In particular (unlike more esoteric properties that have been proposed):
  • They're supported by native OS APIs in multiple OSes
  • There are mainstream devices commercially available that generate them
  • There are popular native art applications (eg. Photoshop) that leverage these properties with use cases that would make just as much sense on the web.
If Edge or Gecko doesn't implement these in the next couple months then it's likely we'll move the properties out of the Pointer Events Level 2 spec in order to get that snapshot of the spec to REC ASAP.  But they'll be preserved in the extensions spec which is the incubation doc for the next iteration of the pointer events spec (after Level 2 hits REC, we intend to merge that all back into a level 3 spec that we incubate).  Since blink focuses primarily on living specs (not versioned snapshots), I don't think any of these details matter from a blink launch perspective, but I wanted to call it out in case it causes any confusion.

Chris Harrelson

unread,
Jan 12, 2017, 1:09:53 PM1/12/17
to Rick Byers, Lan Wei, blink-dev, Mustaq Ahmed, Robert Cohn, Dave Fleck
LGTM1

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Dave Tapuska

unread,
Jan 16, 2017, 3:10:19 PM1/16/17
to Chris Harrelson, Rick Byers, Lan Wei, blink-dev, Mustaq Ahmed, Robert Cohn, Dave Fleck
Do any other owners want to chime in on this?

dave.

TAMURA, Kent

unread,
Jan 16, 2017, 6:31:03 PM1/16/17
to Dave Tapuska, Chris Harrelson, Rick Byers, Lan Wei, blink-dev, Mustaq Ahmed, Robert Cohn, Dave Fleck

chromestatus says
> Firefox: In development
> Edge: Shipped
> Safari: Opposed
> Web Developers: Positive

Rick says:
> If Edge or Gecko doesn't implement these in the next couple months, ...

What's the correct status of other browser vendors?  Safari:Opposed sounds very dangerous for interoperability.


--
TAMURA Kent
Software Engineer, Google


Dave Tapuska

unread,
Jan 16, 2017, 7:17:20 PM1/16/17
to Kent Tamura, Lan Wei, Mustaq Ahmed, Rick Byers, Chris Harrelson, Dave Fleck, Robert Cohn, blink-dev
Safari is opposed because they aren't participating in the pointer events spec/working group. And this feature is driven out of that working group. 

Dave

Dimitri Glazkov

unread,
Jan 17, 2017, 11:33:39 AM1/17/17
to Lan Wei, blin...@chromium.org, Rick Byers, Mustaq Ahmed
LGTM2

PhistucK

unread,
Jan 17, 2017, 11:54:44 AM1/17/17
to Lan Wei, blink-dev
On one hand, you mention "Mac" quite a lot, but on the other hand, you mention that the features will be supported in all of the Blink platforms - will they only be supported on macOS in practice?
Will non-supporting platforms/devices still expose the properties with null values?


PhistucK

On Tue, Jan 17, 2017 at 6:33 PM, Dimitri Glazkov <dgla...@chromium.org> wrote:
LGTM2

Dave Tapuska

unread,
Jan 17, 2017, 12:13:00 PM1/17/17
to PhistucK, Lan Wei, blink-dev
I believe Lan's email is a little biased towards OSX because that is where she is starting the development. Windows supports the fields via: https://msdn.microsoft.com/en-us/library/windows/desktop/hh454909(v=vs.85).aspx Each platform will be filled out in due course.

dave.

Lan Wei

unread,
Jan 17, 2017, 12:17:11 PM1/17/17
to PhistucK, Lan Wei, blink-dev
Sorry for the confusion, we are shipping these two attributes on all platforms, but now we have a CL which only supports them on Mac, https://codereview.chromium.org/2587393004/.
We are planning support them on Windows and ChromOS next. You will see value 0 if the platforms do not support them.

LGTM2
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Rick Byers

unread,
Jan 18, 2017, 3:14:07 PM1/18/17
to Lan Wei, PhistucK, Lan Wei, blink-dev
Right, and my guidance (up for debate here of course) was that we should ship the new properties once they were wired up on at least one platform.  Most hardware is going to report 0 anyway, so there's no real benefit in holding back shipping the API until it's wired up on all platforms IMHO, but we should work to get all platforms wired up ASAP.

On Tue, Jan 17, 2017 at 12:16 PM, 'Lan Wei' via blink-dev <blin...@chromium.org> wrote:
Sorry for the confusion, we are shipping these two attributes on all platforms, but now we have a CL which only supports them on Mac, https://codereview.chromium.org/2587393004/.
We are planning support them on Windows and ChromOS next. You will see value 0 if the platforms do not support them.
On Tue, Jan 17, 2017 at 11:54 AM PhistucK <phis...@gmail.com> wrote:
On one hand, you mention "Mac" quite a lot, but on the other hand, you mention that the features will be supported in all of the Blink platforms - will they only be supported on macOS in practice?
Will non-supporting platforms/devices still expose the properties with null values?


PhistucK
On Tue, Jan 17, 2017 at 6:33 PM, Dimitri Glazkov <dgla...@chromium.org> wrote:
LGTM2

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Philip Jägenstedt

unread,
Jan 19, 2017, 9:44:00 AM1/19/17
to Rick Byers, Lan Wei, PhistucK, Lan Wei, blink-dev
LGTM3

On Wed, Jan 18, 2017 at 9:14 PM Rick Byers <rby...@chromium.org> wrote:
Right, and my guidance (up for debate here of course) was that we should ship the new properties once they were wired up on at least one platform.  Most hardware is going to report 0 anyway, so there's no real benefit in holding back shipping the API until it's wired up on all platforms IMHO, but we should work to get all platforms wired up ASAP.
On Tue, Jan 17, 2017 at 12:16 PM, 'Lan Wei' via blink-dev <blin...@chromium.org> wrote:
Sorry for the confusion, we are shipping these two attributes on all platforms, but now we have a CL which only supports them on Mac, https://codereview.chromium.org/2587393004/.
We are planning support them on Windows and ChromOS next. You will see value 0 if the platforms do not support them.
On Tue, Jan 17, 2017 at 11:54 AM PhistucK <phis...@gmail.com> wrote:
On one hand, you mention "Mac" quite a lot, but on the other hand, you mention that the features will be supported in all of the Blink platforms - will they only be supported on macOS in practice?
Will non-supporting platforms/devices still expose the properties with null values?


PhistucK
On Tue, Jan 17, 2017 at 6:33 PM, Dimitri Glazkov <dgla...@chromium.org> wrote:
LGTM2

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Reply all
Reply to author
Forward
0 new messages