Skip to content

Should pointer events and compatibility mouse events have the same timestamp? #284

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

Closed
graouts opened this issue May 26, 2019 · 5 comments
Closed

Comments

@graouts
Copy link

graouts commented May 26, 2019

I'm asking this because one of the WPT tests (pointerevent_suppress_compat_events_on_drag_mouse.html) expects it to be the case but I can't find anything in the spec to back that up. Either this should be made clear in the spec or that assertion should be removed. I've raised an issue on wpt about that at web-platform-tests/wpt#17016.

@NavidZ
Copy link
Member

NavidZ commented May 27, 2019

I believe compatibility mouse events are the non-normative part of the spec. So in that sense we shouldn't even need to have the test for it. Having said that, there are some tests that just check the current common behaviors of the implementors without having the exact specification for it. Like the one you mentioned.
I would love to ask your opinion about the behavior first. Do you think that is a reasonable expectation or have you faced scenarios that you might want to send compat mouse events and this timestamp assertion didn't make sense?
If you also think this is reasonable and you are planning to follow the same pattern in Webkit this might be the time to explicitly call this out in the spec as well. But again that whole section is non-normative.

@graouts
Copy link
Author

graouts commented May 27, 2019

I don't really see the value in ensuring that the timestamp is the exact same value, at least it doesn't seem like a good idea to me for an author to rely on this kind of data to make any kind of assumption. I might also be biased by the extra work required to make this work in WebKit :) So I would advocate that we remove the specific part of the test about equal timestamps.

@NavidZ
Copy link
Member

NavidZ commented May 27, 2019

I don't mind removing that from the tests. @smaug---- WDYT?

@graouts
Copy link
Author

graouts commented May 28, 2019

If we're in agreement, I have a PR to change the test at web-platform-tests/wpt#17041.

@RByers
Copy link
Contributor

RByers commented May 28, 2019

I agree the spec doesn't require this, so relaxing the tests seems fine.

That said, a couple years ago I believe we did get agreement that Event.timeStamp was the right way to measure input latency. So it would seem confusing to me for a pointerdown to have a different start time from it's equivalent mousedown - it would suggest that one or the other doesn't really reflect the real input latency. Isn't there a risk that this could break sites own measurements of their input latency? It looks like the FID polyfill just pays attention to the first event it sees and listens for both pointerdown and mousedown so as long as WebKit uses the real original timeStamp for pointerdown it should be OK. But others may not be.

graouts added a commit to web-platform-tests/wpt that referenced this issue May 28, 2019
…se events have the same timestamp. There is no requirement by the specification to do this as per the discussion in w3c/pointerevents#284. This addresses #17016. (#17041)
@graouts graouts closed this as completed May 28, 2019
caiolima pushed a commit to caiolima/webkit that referenced this issue May 29, 2019
…vents/pointerevent_suppress_compat_events_on_drag_mouse.html

https://bugs.webkit.org/show_bug.cgi?id=197008

Patch by Antoine Quint <[email protected]> on 2019-05-28
Reviewed by Jon Lee.

We raised an issue on the WPT test which was testing the event timestamp in an invalid manner (see w3c/pointerevents#284
and https://github.com/web-platform-tests/wpt/issues/170160). As a result this test now passes reliably, so we can update the expected out and
the TestExpectations.

LayoutTests/imported/w3c:

* web-platform-tests/pointerevents/pointerevent_suppress_compat_events_on_drag_mouse-expected.txt:
* web-platform-tests/pointerevents/pointerevent_suppress_compat_events_on_drag_mouse.html:

LayoutTests:

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@245820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jun 19, 2019
… events and compatibility mouse events have the same timestamp, a=testonly

Automatic update from web-platform-tests
Remove the test that checks that pointer events and compatibility mouse events have the same timestamp. There is no requirement by the specification to do this as per the discussion in w3c/pointerevents#284. This addresses web-platform-tests/wpt#17016. (#17041)

--

wp5At-commits: b89470bffd7c2fea14d7822fc18862cf5d8b57b4
wpt-pr: 17041
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Jun 19, 2019
… events and compatibility mouse events have the same timestamp, a=testonly

Automatic update from web-platform-tests
Remove the test that checks that pointer events and compatibility mouse events have the same timestamp. There is no requirement by the specification to do this as per the discussion in w3c/pointerevents#284. This addresses web-platform-tests/wpt#17016. (#17041)

--

wp5At-commits: b89470bffd7c2fea14d7822fc18862cf5d8b57b4
wpt-pr: 17041
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this issue Jul 23, 2019
…se events have the same timestamp. There is no requirement by the specification to do this as per the discussion in w3c/pointerevents#284. This addresses #17016. (#17041)
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 4, 2019
… events and compatibility mouse events have the same timestamp, a=testonly

Automatic update from web-platform-tests
Remove the test that checks that pointer events and compatibility mouse events have the same timestamp. There is no requirement by the specification to do this as per the discussion in w3c/pointerevents#284. This addresses web-platform-tests/wpt#17016. (#17041)

--

wp5At-commits: b89470bffd7c2fea14d7822fc18862cf5d8b57b4
wpt-pr: 17041

UltraBlame original commit: 48ef3551127afc3366932e147ead62fe9aeb5a6a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 4, 2019
… events and compatibility mouse events have the same timestamp, a=testonly

Automatic update from web-platform-tests
Remove the test that checks that pointer events and compatibility mouse events have the same timestamp. There is no requirement by the specification to do this as per the discussion in w3c/pointerevents#284. This addresses web-platform-tests/wpt#17016. (#17041)

--

wp5At-commits: b89470bffd7c2fea14d7822fc18862cf5d8b57b4
wpt-pr: 17041

UltraBlame original commit: 48ef3551127afc3366932e147ead62fe9aeb5a6a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
… events and compatibility mouse events have the same timestamp, a=testonly

Automatic update from web-platform-tests
Remove the test that checks that pointer events and compatibility mouse events have the same timestamp. There is no requirement by the specification to do this as per the discussion in w3c/pointerevents#284. This addresses web-platform-tests/wpt#17016. (#17041)

--

wp5At-commits: b89470bffd7c2fea14d7822fc18862cf5d8b57b4
wpt-pr: 17041

UltraBlame original commit: 48ef3551127afc3366932e147ead62fe9aeb5a6a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants