New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 802067 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 805007
issue 919921



Sign in to add a comment

Support fractional movementX/Y for pointerevents

Project Member Reported by eirage@chromium.org, Jan 15 2018

Issue description

Currently, screenX/Y for MouseEvent and PointerEvent is type to double, but we still have movementX/Y type long. There is discussion here https://github.com/w3c/pointerlock/issues/24 about whether we should change movementX/Y to double as well.

There are a few issues:
1) movementX/Y are not scaled, so it might be ok to keeping it as integer.
2) We do not expose fractions of MouseEvent coordinates, but we expose fractions of PointerEvent coordinates. movementX/Y type should be consist with the type of event coords.
However, we can't just store float movement and cast it into int as what we are doing for ME coords, or we will lose fraction part movements.
 

Comment 1 Deleted

Cc: metapyz...@gmail.com zeldamas...@gmail.com lama12...@gmail.com intodesp...@googlemail.com cthulh...@gmail.com har...@iedema.me aire...@gmail.com james...@gmail.com
cc'ing some folks who seem to be interested in these properties and may have some opinion.

Here are the related github issues against the spec:
https://github.com/w3c/pointerlock/issues/24
https://github.com/w3c/pointerlock/issues/23
Blocking: 805007
Labels: Hotlist-Input-Dev PointerEvent
This wpt test is also failing as the result of screenX/Y being double and movementx/y not being double:
w3c-test.org/pointerevents/pointerlock/pointerevent_movementxy-manual.html

Cc: mustaq@chromium.org
Let's switch the idl type to |double| and expose non-rounded values in PointerEvents in M72.  We can round the values MouseEvents until we have the confirmation that the compat risk is negligible.

Project Member

Comment 5 by bugdroid1@chromium.org, Nov 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a6c1687b03092871b0486030ccc18f2fbb27dad0

commit a6c1687b03092871b0486030ccc18f2fbb27dad0
Author: Ella Ge <eirage@chromium.org>
Date: Wed Nov 21 19:26:15 2018

move unlocked state movementX/Y calculation to blink

This change is under a blink flag MovementXYInBlink.
With the flag on, MouseEvent and PointerEvent's movement_x/y is
calculated in blink instead of in browser.

The movement_x/y for pointerrawmove event is not set yet. And also this
CL does not handle the calculation when pointer is locked. These is
going to be done in the following changes. See the design doc:
https://docs.google.com/document/d/1jL93PMbNHLhr6jYd4AWkjB8wgS73C5EDUa_2kYOjOn4/

With the flag, movement_x/y is in dip (same scale with screenX/Y),
which is different the current behavior(physical pixel). The coordinate
space is discuss in this doc:
https://docs.google.com/document/d/1mYk4qMxBVsFweqFOku2FZvMajejp2Q7XWGIld9ivlXE/
It needs to be changed or clarified before we enable the flag.

Bug: 802067
Change-Id: I5abb71181702c3b5265985f6ff8d2537116c5e18
Reviewed-on: https://chromium-review.googlesource.com/c/1297744
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610148}
[modify] https://crrev.com/a6c1687b03092871b0486030ccc18f2fbb27dad0/third_party/blink/renderer/core/events/mouse_event.cc
[modify] https://crrev.com/a6c1687b03092871b0486030ccc18f2fbb27dad0/third_party/blink/renderer/core/events/mouse_event.h
[modify] https://crrev.com/a6c1687b03092871b0486030ccc18f2fbb27dad0/third_party/blink/renderer/core/events/pointer_event_factory.cc
[modify] https://crrev.com/a6c1687b03092871b0486030ccc18f2fbb27dad0/third_party/blink/renderer/core/events/pointer_event_factory.h
[modify] https://crrev.com/a6c1687b03092871b0486030ccc18f2fbb27dad0/third_party/blink/renderer/core/input/event_handler.cc
[modify] https://crrev.com/a6c1687b03092871b0486030ccc18f2fbb27dad0/third_party/blink/renderer/core/input/mouse_event_manager.cc
[modify] https://crrev.com/a6c1687b03092871b0486030ccc18f2fbb27dad0/third_party/blink/renderer/core/input/mouse_event_manager.h
[modify] https://crrev.com/a6c1687b03092871b0486030ccc18f2fbb27dad0/third_party/blink/renderer/core/input/pointer_event_manager.cc
[modify] https://crrev.com/a6c1687b03092871b0486030ccc18f2fbb27dad0/third_party/blink/renderer/core/input/pointer_event_manager.h
[modify] https://crrev.com/a6c1687b03092871b0486030ccc18f2fbb27dad0/third_party/blink/renderer/core/input/pointer_event_manager_test.cc
[modify] https://crrev.com/a6c1687b03092871b0486030ccc18f2fbb27dad0/third_party/blink/renderer/platform/runtime_enabled_features.json5

Summary: Support fractional movementX/Y for pointerevents (was: Should movementX/Y be double instead of long)
Blocking: 919921

Sign in to add a comment