Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do user agents only coalesce pointermove events relating to changes in position? #375

Closed
patrickhlauke opened this issue May 13, 2021 · 5 comments · Fixed by #379
Closed
Labels

Comments

@patrickhlauke
Copy link
Member

https://w3c.github.io/pointerevents/#coalesced-events states that

For performance reasons, user agents may choose not to send a pointermove event every time the position of a pointer is updated.

Does this really only apply to position updates? Or do changes in other attributes ("i.e. button state, coordinates, pressure, tangential pressure, tilt, twist, or contact geometry", to borrow from the pointerrawupdate description) also get coalesced (and the non-coalesced events would have the more granular changes from those attributes)?

patrickhlauke added a commit that referenced this issue May 23, 2021
- auser agents may coalesce events not just if the position is updated, but any of the attributes (as it's not just position changes that can result in an overwhelmingly large number of events)
- tweaked the matching sentence in the `pointerrawupdate` slightly, to use `pointer's attributes` rather than the awkward sounding `pointing device attributes`

Closes #375
patrickhlauke added a commit that referenced this issue May 23, 2021
- a user agents may coalesce events not just if the position is updated, but any of the attributes (as it's not just position changes that can result in an overwhelmingly large number of events)
- tweaked the matching sentence in the `pointerrawupdate` slightly, to use `pointer's attributes` rather than the awkward sounding `pointing device attributes`

Closes #375
@smaug----
Copy link
Contributor

Just looking at the implementation, Gecko may coalesce also when things like tilt or twist or pressure changes.

@flackr
Copy link
Contributor

flackr commented May 26, 2021

I would expect that every non-discrete field could /should be coalesced. I.e. in your original post the only thing I wouldn't expect to get coalesced would be the button state since that changes discretely. I believe blink does this by virtue of the button state change also causing discrete events to fire which forces us to flush the current coalesced event out first.

@patrickhlauke
Copy link
Member Author

Discussed today to update to not to send a pointermove event every time a non-discrete property (such as coordinates, pressure, tangential pressure, tilt, twist, or contact geometry) of a pointer is updated.

@patrickhlauke
Copy link
Member Author

may need glossary entry as well for discrete/non-discrete properties (in former also include metaKey etc inherited from mouse events)

@patrickhlauke
Copy link
Member Author

Added the proposed update to the wording, plus a glossary definition for "discrete and coalesced properties", to #379

patrickhlauke added a commit that referenced this issue Jul 7, 2021
* Expand explanation for non-coalesced events

- a user agents may coalesce events not just if the position is updated, but any of the attributes (as it's not just position changes that can result in an overwhelmingly large number of events)
- tweaked the matching sentence in the `pointerrawupdate` slightly, to use `pointer's attributes` rather than the awkward sounding `pointing device attributes`

Closes #375

* Tweak following sentence of the coalesced events description as well.

* Further expand as this also applies to `pointerrawupdate` events

* Explain which properties usually get coalesced

- includes glossary definition for discrete and coalesced properties

* Exclude discrete keyboard modifier properties from needing to fire pointermove

* Replace the discrete/continuous concept with "measuable properties" instead

due to the fact that `tiltX`, `tiltY`, `twist` being `long` properties would count as discrete under the general definition.

* Remove mention of *key properties in the coalesced events section altogether

no need to mention them, as they don't lead to pointer events firing anyway

* Missing space

* Change "will" to "may"

* Add "continuous" to further clarify the measurable properties concept
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants