Intent to Implement: Unified Touch adjustment

70 views
Skip to first unread message

Ella Ge

unread,
Dec 15, 2017, 4:12:38 PM12/15/17
to blink-dev

Contact emails

eir...@chromium.org


Design doc

Unified Touch adjustment plan


Summary

Do touch adjustment on “touchstart” event, use this adjusted target for the following touch events and preserve original X/Y of touch events. Apply the adjusted point to corresponding gesture event, so that  touch events and subsequent mouse events will have the same target. This will be implemented behind a experimental flag “UnifiiedTouchAdjustment”.


Motivation

Currently, we do touch adjustment for gesture events, but not for touch events. However, this will cause pointer and touch events to have different targets from subsequent mouse events, which is extremely confusing. For example, touchend event and click event from one touch might trigger two different targets. (e.g. crbug/595112)

We’d like to adjust target for all related events but preserve original X/Y of raw touch events. Therefore, there is less confusion about the touch target. And developers who want the original touch target (without adjustment) can use the coordinates to do hit test.

A UMA metric will be added to measure distance between tap point and adjusted point (0 if not adjusted). This metric is to prove 1. Most use cases are not affected. 2. We are using the appropriate maximum adjust distance.


Risks

Interoperability and Compatibility

Touch adjustment is not spec’ed feature. Each browser has different implementation.

Edge:  Adjust both coordinates and targets for touch events & click events

Firefox: no touch adjustment

Safari: Adjusts ‘click’ target and coordinates, no adjustment on touch events (similar to chrome current behavior)

Web developers: No signals


Compatibility risk should be low. This is a minor change on touch event target.Touch event coordinates will not be change. And it shouldn’t change those mouse events which generated by touch. Likely none will notice the change.



Debuggability

Yes, touch adjustment is supported by DevTools emulator.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Link to entry on the feature dashboard

https://www.chromestatus.com/feature/4895751150764032


Requesting approval to ship?

No


--
Ella

Chris Harrelson

unread,
Dec 18, 2017, 5:38:31 PM12/18/17
to Ella Ge, blink-dev
Hi Ella,

I left some comments and questions on the document you linked to.

In addition, regarding specs and interop, so far I can see two aspects to this: (a) the exact algorithm used for adjustment, and (b) what happens to the events generated as result of those adjustments. I can see leaving (a) as a user-agent-specific behavior, because it could depend on device, accessibility concerns, etc. However, I think (b) could be spec'd somewhere, and we could also move to interop on Edge regarding this spec.


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGbAJuF8MW0K9Y1oO0yfRB834tBsX0v8s4%3DwxEEV0OMHhUMfow%40mail.gmail.com.

eir...@chromium.org

unread,
Dec 18, 2017, 11:59:02 PM12/18/17
to blink-dev, eir...@chromium.org, chri...@chromium.org
Thanks for the questions! 

As for spec, Rick has opened a github issue  a while ago about this. I'll continue the discussion after finch trial.
Reply all
Reply to author
Forward
0 new messages