Bug 202789

Summary: [GTK][WPE] Support Pointer Events
Product: WebKit Reporter: Carlos Alberto Lopez Perez <clopez>
Component: WebKitGTKAssignee: Carlos Alberto Lopez Perez <clopez>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, bugs-noreply, cdumez, cgarcia, clopez, commit-queue, dino, ews-watchlist, ggaren, graouts, gyuyoung.kim, ryuan.choi, sergio
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=195008
https://bugs.webkit.org/show_bug.cgi?id=204115
https://bugs.webkit.org/show_bug.cgi?id=204157
https://bugs.webkit.org/show_bug.cgi?id=207701
https://bugs.webkit.org/show_bug.cgi?id=214870
Bug Depends on: 203996    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Description Carlos Alberto Lopez Perez 2019-10-10 03:12:29 PDT
Pointer events is a W3C/HTML5 API:

https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events
https://w3c.github.io/pointerevents/

Support for it on WebKit is currently on development. It has been enabled for Mac in bug 195008

It would be a good idea to enable it as well for GTK/WPE.
Comment 1 Carlos Alberto Lopez Perez 2019-11-08 07:14:19 PST
I have put here some basic demos about this API: https://people.igalia.com/clopez/wkbug/pointer-events/

Support for it can be enabled for GTK and WPE and it works, but currently it only works with pointerType=mouse. If a touch device is present, it doesn't work as expected (no pressure report,etc) and it reports the pointerType as mouse.

I think we can enable this as an experimental feature for the meantime. It should not be promoted to be enabled by default until it can fully replace the alternative API (MouseEvent+TouchEvent)
Comment 2 Carlos Alberto Lopez Perez 2019-11-08 08:57:33 PST
Created attachment 383129 [details]
Patch
Comment 3 Carlos Garcia Campos 2019-11-11 01:14:48 PST
Comment on attachment 383129 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=383129&action=review

> LayoutTests/platform/gtk/TestExpectations:4016
> +# PointerEvents currently only supports mouse on WTK (no Touch/Pen support)

WTK -> WTR

> LayoutTests/platform/gtk/TestExpectations:4025
> +imported/w3c/web-platform-tests/pointerevents/pointerevent_change-touch-action-onpointerdown_touch.html [ Skip ]
> +imported/w3c/web-platform-tests/pointerevents/pointerevent_pointercancel_touch.html [ Skip ]
> +imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerleave_after_pointercancel_touch.html [ Skip ]
> +imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerout_after_pointercancel_touch.html [ Skip ]
> +imported/w3c/web-platform-tests/pointerevents/pointerevent_releasepointercapture_onpointercancel_touch.html [ Skip ]
> +imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-auto-css_touch.html [ Skip ]
> +imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-inherit_highest-parent-none_touch.html [ Skip ]
> +imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-pan-x-pan-y_touch.html [ Skip ]
> +imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerout_pen.html [ Skip ]

Should we open a bug?
Comment 4 Carlos Alberto Lopez Perez 2019-11-12 07:38:53 PST
(In reply to Carlos Garcia Campos from comment #3)
> Comment on attachment 383129 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=383129&action=review
> 
> > LayoutTests/platform/gtk/TestExpectations:4016
> > +# PointerEvents currently only supports mouse on WTK (no Touch/Pen support)
> 
> WTK -> WTR
> 
> > LayoutTests/platform/gtk/TestExpectations:4025
> > +imported/w3c/web-platform-tests/pointerevents/pointerevent_change-touch-action-onpointerdown_touch.html [ Skip ]
> > +imported/w3c/web-platform-tests/pointerevents/pointerevent_pointercancel_touch.html [ Skip ]
> > +imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerleave_after_pointercancel_touch.html [ Skip ]
> > +imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerout_after_pointercancel_touch.html [ Skip ]
> > +imported/w3c/web-platform-tests/pointerevents/pointerevent_releasepointercapture_onpointercancel_touch.html [ Skip ]
> > +imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-auto-css_touch.html [ Skip ]
> > +imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-inherit_highest-parent-none_touch.html [ Skip ]
> > +imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-pan-x-pan-y_touch.html [ Skip ]
> > +imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerout_pen.html [ Skip ]
> 
> Should we open a bug?

Right, opened bug 204115
Comment 5 Carlos Alberto Lopez Perez 2019-11-12 07:51:45 PST
Created attachment 383355 [details]
Patch

patch for landing
Comment 6 WebKit Commit Bot 2019-11-12 08:36:03 PST
Comment on attachment 383355 [details]
Patch

Clearing flags on attachment: 383355

Committed r252366: <https://trac.webkit.org/changeset/252366>
Comment 7 WebKit Commit Bot 2019-11-12 08:36:05 PST
All reviewed patches have been landed.  Closing bug.