Bug 202789 - [GTK][WPE] Support Pointer Events
Summary: [GTK][WPE] Support Pointer Events
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords:
Depends on: 203996
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-10 03:12 PDT by Carlos Alberto Lopez Perez
Modified: 2020-09-30 19:16 PDT (History)
13 users (show)

See Also:


Attachments
Patch (16.22 KB, patch)
2019-11-08 08:57 PST, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff
Patch (16.54 KB, patch)
2019-11-12 07:51 PST, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.