-
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
Add note about rounding coordinates for click, auxclick, contextmenu #404
Add note about rounding coordinates for click, auxclick, contextmenu #404
Conversation
Currently set this as a note, as I'm not sure if we want to set this in stone as a requirement (though I guess then that invalidates the |
Related: should we also mention anything related to this explicitly in the mouse compatibility section? So user agents know that they should also round/convert to |
Last tangential point: currently, the definition for |
And last additional point, I promise: wondering if the current note in 4.1
should actually be expanded to make clear what that last bit means ... fractional coordinates. took me a while to work out that nowhere in the PE spec we actually explicitly say anything about fractional coordinates/that they're |
…oordinates normative
… it more obvious/easily scannable
Made the changes discussed in today's meeting:
While I was in 4.2.12, also cleaned up the structure of the prose there to make the distinction between events that came from pointing devices and those that didn't more obvious when scanning over the section. |
Just adding here, now that I thought it through some more: so the compat problems/issues would come about in user agents where PointerEvents have been implemented already using fractional coordinates, but the same implementation hasn't been extended to regular MouseEvents, right? If a browser decided to already implement fractional coordinates for MouseEvents, this would actually lead to problems again (essentially, the opposite type of problem this tries to address), right? In short, the problem only appeared because Chrome (and others?) didn't apply the CSSOM approach for MouseEvents, but just for PointerEvents, right? So my proposed sentence
should probably more specifically be about
likewise, in
it should probably read more along the lines of
i.e. if the user agent hasn't implemented fractional coordinates anywhere (not in MouseEvents, not in PointerEvents), it's a non-issue. and it's also a non-issue if the user agent has applied this change to both MouseEvents and PointerEvents. it's only a problem when it's only implemented in one and not the other, right? |
Just pushed a change to this PR to clarify this further. I think this now more accurately explains where the problem lies, and when this requirement needs to be implemented. |
I am afraid it was more accurate before this last commit! Let me add a few points to focus on, in case they call for more discussion:
[EDIT: I mentioned these points only for discussion. Most likely they don't deserve to be included in the PR here.] |
we don't normatively, explicitly, actually say this in our spec at the moment, right? A UA could implement PEs but with
but IF a user agent decided to apply the CSSOM fractional coordinates to their regular MouseEvent as well, then rounding click/auxclick/contextmenu to
yes and my PR doesn't mention compat events. when I talk about MouseEvent, I mean the actual ones. |
I ruled out this consideration because this is known to be impractical, therefore presumed all UAs ignore CSSOM extension for MouseEvents. After seeing (again!) that this can't be normative in the PE spec, I am finally able to see the motivation of your last patch. Phew!
Looks like I misinterpreted "regular MouseEvent" as "compat MouseEvent", for no good reason! I am taking back my compat event points. |
it's a tangled web that we weave...this CSSOM thing stretched my brain even more than that target discussion a few months ago... |
per the discussion at last week's meeting https://www.w3.org/2021/08/18-pointerevents-minutes.html changed the "round" to reference |
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.
Two super picky comments!
I am looking into a WPT for this! |
Here I was modifying |
oops, I posted the link to wrong issue. |
No worries, I updated the issue you meant: #456 |
This will resolve the "needs-wpt" label in w3c/pointerevents#404 Change-Id: I06e27cd6e3adb790dbf1355c9f8cc856335bebb7
This will resolve the "needs-wpt" label in w3c/pointerevents#404 Change-Id: I06e27cd6e3adb790dbf1355c9f8cc856335bebb7
This will resolve the "needs-wpt" label in w3c/pointerevents#404 Change-Id: I06e27cd6e3adb790dbf1355c9f8cc856335bebb7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4797838 Reviewed-by: Kevin Ellis <[email protected]> Auto-Submit: Mustaq Ahmed <[email protected]> Commit-Queue: Kevin Ellis <[email protected]> Cr-Commit-Position: refs/heads/main@{#1187412}
This will resolve the "needs-wpt" label in w3c/pointerevents#404 Change-Id: I06e27cd6e3adb790dbf1355c9f8cc856335bebb7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4797838 Reviewed-by: Kevin Ellis <[email protected]> Auto-Submit: Mustaq Ahmed <[email protected]> Commit-Queue: Kevin Ellis <[email protected]> Cr-Commit-Position: refs/heads/main@{#1187412}
This will resolve the "needs-wpt" label in w3c/pointerevents#404 Change-Id: I06e27cd6e3adb790dbf1355c9f8cc856335bebb7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4797838 Reviewed-by: Kevin Ellis <[email protected]> Auto-Submit: Mustaq Ahmed <[email protected]> Commit-Queue: Kevin Ellis <[email protected]> Cr-Commit-Position: refs/heads/main@{#1187412}
A WPT has been added. |
…tional coordinates., a=testonly Automatic update from web-platform-tests Add "click" to the existing WPT for fractional coordinates. This will resolve the "needs-wpt" label in w3c/pointerevents#404 Change-Id: I06e27cd6e3adb790dbf1355c9f8cc856335bebb7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4797838 Reviewed-by: Kevin Ellis <[email protected]> Auto-Submit: Mustaq Ahmed <[email protected]> Commit-Queue: Kevin Ellis <[email protected]> Cr-Commit-Position: refs/heads/main@{#1187412} -- wpt-commits: bea5b03a40531e0beadde1a05228beaec5a98c33 wpt-pr: 41582
…tional coordinates., a=testonly Automatic update from web-platform-tests Add "click" to the existing WPT for fractional coordinates. This will resolve the "needs-wpt" label in w3c/pointerevents#404 Change-Id: I06e27cd6e3adb790dbf1355c9f8cc856335bebb7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4797838 Reviewed-by: Kevin Ellis <[email protected]> Auto-Submit: Mustaq Ahmed <[email protected]> Commit-Queue: Kevin Ellis <[email protected]> Cr-Commit-Position: refs/heads/main@{#1187412} -- wpt-commits: bea5b03a40531e0beadde1a05228beaec5a98c33 wpt-pr: 41582
This will resolve the "needs-wpt" label in w3c/pointerevents#404 Change-Id: I06e27cd6e3adb790dbf1355c9f8cc856335bebb7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4797838 Reviewed-by: Kevin Ellis <[email protected]> Auto-Submit: Mustaq Ahmed <[email protected]> Commit-Queue: Kevin Ellis <[email protected]> Cr-Commit-Position: refs/heads/main@{#1187412}
See the comment about web compat issues with the "upgraded" click/auxclick/contextmenu as pointer events #100 (comment)
Closes #100
Preview | Diff