PointerEvent should have fractional coordinates |
||||||||||||
Issue descriptionLooks like we would want this sooner: Edge fires PEs with fractional coordinates but MEs still with integers. There might be some compat implications with MEs, but not for PEs. We should follow Edge at least. Implementation wise, fixing Issue 456625 first makes sense, although hiding ME fractional coordinates from JS is a possibility if there is a compat issue.
,
Jun 29 2016
,
Jul 5 2016
We're reporting integer co-ordinate for both touch and mouse, right? Touch is probably the high-priority case (don't want switching from TE to PE to regress behavior at all). So I suggest inverting the blocking relationship with issue 456625 . I.e. first upgrade MouseEvent (and hence PointerEvent) co-ordinates to be capable of including fractions, but continue to report integers for the WebMouseEvent case. That should be pretty easy to do and get most of the value (but probably requires an intent since the behavior is web exposed due to events synthesized in JS). Later (perhaps post PE-ship) you can upgrade all the WebMouseEvent plumbing to also support fractional co-ordinates for mouse devices ( issue 456625 ). WDYT?
,
Jul 7 2016
Right, a partial fix for crbug.com/456625 unblocks this bug. Since the bigger fix for crbug.com/456625 (WebMouseEvent plumbing) should follow this bug, I have inverted the blocking dependency.
,
Sep 22 2016
Issue 649221 has been merged into this issue.
,
Sep 26 2016
The PEWG had reached consensus a while back: https://github.com/w3c/pointerevents/issues/107
,
Sep 29 2016
As discussed in #3, exposing fractional values for touch is probably urgent. Otherwise switching from touch events to pointer events can be a regression in user experience (smooth dragging, line writing, etc.)
,
Oct 6 2016
,
Oct 7 2016
,
Oct 13 2016
Observed one weirdness in Edge: even though it emits fractional clientX/Y for touches, the console seems to truncate clientX/Y to int even with a pointerType="touch" property.
new PointerEvent('eventType', { clientX: 123.45 }).clientX; => 123
,
Oct 13 2016
Fascinating. Even a more realistic event like:
var e = new PointerEvent('pointerdown', {
pointerType:"touch",
clientX:10.5,
clientY:10.5
});
Doesn't get fractional co-ordinates. Can you reach out to Ted to see if he can explain when you will and will not see fractional co-ordinates? I don't think this needs to block us though.
,
Oct 13 2016
I do see some fractional values for pageX/pageY though but not the ones I input (maybe they're getting computed from the clientX/clientY values)! See http://jsbin.com/hiraqow/1
,
Oct 19 2016
Since shipping fractional PE coordinates w/o affecting ME coordinates seems hard, and my patch to even minimally change ME calls for an intent to ship (see https://codereview.chromium.org/2406263003/#ps160001), we will fix it in M56 instead.
,
Oct 31 2016
,
Nov 14 2016
,
Nov 16 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/48a106897274196b5897f1b0967d28c49e4ec696 commit 48a106897274196b5897f1b0967d28c49e4ec696 Author: mustaq <mustaq@chromium.org> Date: Wed Nov 16 13:45:45 2016 Make PointerEvent coordinates fractional for touch The current PointerEvent spec doesn't override the UI MouseEvent spec definition of (clientX, clientY) and (screenX, screenY) coordinates: all of them are integers. This is not great for the sites that currently use Touch Events & trying to switch to Pointer Events for touch: specially on high DPI devices Pointer Event coordinates would feel less precise than fractional Touch Event coodinates. The PEWG has already reached consensus that all coordinates in Pointer Events should be floating point values: https://github.com/w3c/pointerevents/issues/107 Edge already reports fractional client coordinates for PointerEvents (and not MouseEvents). This CL exposes fractional Pointer Event coordinates for touch input. Although the CL changes the client & screen coordinates in Mouse Event idl to floating points, the integer plumbing for mouse is kept intact so that mouse coordinates still appear unchanged to JS. Pointer Events that are fired for touches propagate appropriate fractional coordinates to JS. Intent to Implement and Ship: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/1kroHAnh3BU/uYZb6uZRBwAJ BUG= 607948 Review-Url: https://codereview.chromium.org/2406263003 Cr-Commit-Position: refs/heads/master@{#432473} [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/LayoutTests/fast/events/constructors/mouse-event-constructor-expected.txt [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/LayoutTests/fast/events/constructors/mouse-event-constructor.html [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/LayoutTests/fast/events/constructors/pointer-event-constructor-expected.txt [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/LayoutTests/fast/events/constructors/pointer-event-constructor.html [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/LayoutTests/fast/events/constructors/wheel-event-constructor-expected.txt [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/LayoutTests/fast/events/constructors/wheel-event-constructor.html [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/LayoutTests/fast/events/pointerevents/touch-pointer-events-expected.txt [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/LayoutTests/fast/events/pointerevents/touch-pointer-events.html [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/Source/core/events/MouseEvent.cpp [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/Source/core/events/MouseEvent.idl [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/Source/core/events/MouseEventInit.idl [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/Source/core/events/MouseRelatedEvent.cpp [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/Source/core/events/MouseRelatedEvent.h [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/Source/core/html/shadow/SliderThumbElement.cpp [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/Source/core/page/ContextMenuController.cpp [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/Source/web/WebInputEventConversion.cpp [modify] https://crrev.com/48a106897274196b5897f1b0967d28c49e4ec696/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
,
Nov 16 2016
,
Jan 11 2017
|
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by mustaq@chromium.org
, Apr 29 2016Labels: -OS-Linux Hotlist-Input-Dev OS-All