Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 363198dfec40635119410647bea002f82524e4af
https://github.com/WebKit/WebKit/commit/363198dfec40635119410647bea002f82524e4af
Author: Carlos Alberto Lopez Perez <[email protected]>
Date: 2024-11-25 (Mon, 25 Nov 2024)
Changed paths:
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/gtk/TestExpectations
M LayoutTests/platform/wpe/TestExpectations
M Source/WebCore/dom/wpe/PointerEventWPE.cpp
M Source/WebKit/Shared/libwpe/WebEventFactory.cpp
M Tools/PlatformWPE.cmake
M Tools/wpe/backends/fdo/WindowViewBackend.cpp
M Tools/wpe/backends/fdo/WindowViewBackend.h
Log Message:
-----------
REGRESSION(263237@main): [WPE] Identifiers for touch points are not constant
in multi touch
https://bugs.webkit.org/show_bug.cgi?id=270516
Reviewed by Adrian Perez de Castro.
263237@main implemented tracking of touchstart/touchend events in order to
guess when a new touchpoint was pressed and assign a unique ID to each.
The issue here is that doesn't work well in practice.
I'm not sure if is because of buggy drivers or buggy devices, but it happens
that sometimes when we start a new touch event (put a new finger on the screen)
without removing the previous ones we can receive more than one touchstart event
(one for the ongoing gesture and one for the new).
There are also issues when trying to use several fingers at the same time on
some
touchscreens that do not properly support that like dual-touch devices, in that
case we may receive several touchstart events (more than two) and perhaps some
fake
touchend events (or missing touchend events) and that will end confusing the
logic.
So instead of trying to implement in WebKit code the tracking of the touchpoints
is better that we rely on the system (the driver, libinput and the
wayland-protocol)
to track the touchpoints for us.
The touch IDs that we receive from the system are already unique from the other
ones active at that moment, each active touchpoint should have a different ID.
So, there isn't really a need to assign random IDs by ourselves.
However, the IDs that we receive from the system for the touchpoints start
at 0, but IDs 0 and 1 are already reserved for the mouse and the stylus
pointer devices. So to ensure that the ID of the touchpoint will be unique
we can simply add 2 to the value from the system.
Note also what the PointerEvents spec says
<https://www.w3.org/TR/pointerevents/>:
> pointerId is a unique identifier for the pointer causing the event.
> This identifier MUST be unique from all other active pointers in the top-level
> browsing context (as defined by [HTML5]) at the time.
> A user agent MAY recycle previously retired values for pointerId from previous
> active pointers, if necessary.
So the ID has to be unique only between the active ones, and that is what
we get from the system.
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WebCore/dom/wpe/PointerEventWPE.cpp:
* Source/WebKit/Shared/libwpe/WebEventFactory.cpp:
(WebKit::WebEventFactory::createWebTouchEvent):
* Tools/PlatformWPE.cmake:
* Tools/wpe/backends/fdo/WindowViewBackend.cpp:
* Tools/wpe/backends/fdo/WindowViewBackend.h:
Canonical link: https://commits.webkit.org/287077@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes