-
Notifications
You must be signed in to change notification settings - Fork 34
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
Clarify that coalesced events list contain also a clone of the parent event #436
Conversation
index.html
Outdated
@@ -966,7 +966,8 @@ <h2><dfn>Coalesced events</dfn></h2> | |||
<p>A <a>PointerEvent</a> has an associated <dfn>coalesced events list</dfn> (a list of | |||
zero or more <code>PointerEvent</code>s). For trusted <code>pointermove</code> and | |||
<code>pointerrawupdate</code> events, the list is a sequence of all <code>PointerEvent</code>s | |||
that were coalesced into this event. For all other trusted event types, it is an empty list. | |||
that were coalesced into this event, including a clone of the "parent" event itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit: since the parent event can include slight interpolation / prediction it might be better to say something like including the event represented by the parent event?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, it looks like the parent event should have the same coordinates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I don't think the new statement is fully correct. The parent event might have different movementX/Y as @smaug---- also mentioned but it could also be resampled to what the user agent believes to be best representative of the current state (e.g. location, pressure and other similar stuff) of the pointer as @flackr mentioned. On the other hand the coalesced events are meant to be raw events received from the platfrom with no modifications on them.
The current idea is to explicitly define parent event's movementX/Y to be relative to the previous parent event and the |
I think one possible way to clarify this is to just say that if the coalesced events list was otherwise empty for trusted pointermove/pointerrawupdate, then it contains a clone of the parent event. And then have totally separate definition how movementX/Y is computed for the events in the coalesced events list and for the parent events. |
so, naive idea, can the wording just say something along the lines of "the last event in the coalesced events list corresponds to the "parent" event (with the same values for the various PointerEvent properties). This means that for trusted pointer events, coalesced events list will always have at least one event." or something along those lines? and yes, then adding an informative note that other properties, such as |
@@ -966,7 +966,8 @@ <h2><dfn>Coalesced events</dfn></h2> | |||
<p>A <a>PointerEvent</a> has an associated <dfn>coalesced events list</dfn> (a list of | |||
zero or more <code>PointerEvent</code>s). For trusted <code>pointermove</code> and | |||
<code>pointerrawupdate</code> events, the list is a sequence of all <code>PointerEvent</code>s | |||
that were coalesced into this event. For all other trusted event types, it is an empty list. | |||
that were coalesced into this event, or if no events were coalesced, it contains a clone of the "parent" event itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is explicitly not talking about movement, since that seem to be separate issue altogether. Currently per specifications all the pointerevents should have movementX/Y 0 (whether or not the are in the coalesced events list). But the idea here is that this could work once movement is clarified elsewhere.
naive idea (as usual from me): how about defining that if the list does not have any events (i.e. there were no extra events that were coalesced into a parent), then the list will contain a clone of the parent event, and otherwise leaving it as is? would that cover the scenario where a developer wants to only use the coalesced events list? edit: conceptually, I could even rationalise this in terms of the coalesced list containing all events that led the browser to fire the "proper" parent event. in the case where no coalescing happened, it can kind of make sense that it contains just the pure event that is also the parent event? |
@@ -966,7 +966,8 @@ <h2><dfn>Coalesced events</dfn></h2> | |||
<p>A <a>PointerEvent</a> has an associated <dfn>coalesced events list</dfn> (a list of | |||
zero or more <code>PointerEvent</code>s). For trusted <code>pointermove</code> and | |||
<code>pointerrawupdate</code> events, the list is a sequence of all <code>PointerEvent</code>s | |||
that were coalesced into this event. For all other trusted event types, it is an empty list. | |||
that were coalesced into this event, or if no events were coalesced, it contains a clone of the "parent" event itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From call just now, idea from @flackr Right after this line, something along the lines of: the parent event is the result of all these events, with a hint that UA may resample or otherwise average/modify
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parent event is a representation of the events in the list, including resampling etc, to the point where the UA thinks the parent is the most representative of the raw coalesced event stream's position etc
This is superseded by #440 |
Since the list below talks about "parent" event, perhaps just clarifying the sentence is actually enough here..
This PR is for #409
Preview | Diff