WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
322698
[GTK][WPE] touchmove is dropped when it arrives while touchstart is still in flight
https://bugs.webkit.org/show_bug.cgi?id=322698
Summary
[GTK][WPE] touchmove is dropped when it arrives while touchstart is still in ...
Pablo Saavedra
Reported
2026-08-27 00:01:53 PDT
[GTK][WPE] touchmove is dropped when it arrives while touchstart is still in flight
Attachments
Add attachment
proposed patch, testcase, etc.
Pablo Saavedra
Comment 1
2026-08-27 00:16:53 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/72574
Pablo Saavedra
Comment 2
2026-08-27 00:31:19 PDT
Regression due to `2dce2395a46b` *[GTK][WPE] Support touch event asynchronous scrolling* (
bug 318938
, `
319347@main
`, Fujii Hironori, 2026-08-17) in a downstream webdriver test: Test Code excerpt: ``` python # Check touch move expected_scroll_position = 300 pointer_action = action.pointer_action pointer_action.pointer_down() pointer_action.move_by(10, -expected_scroll_position) pointer_action.pointer_up() action.perform() logged_events = driver.execute_script("return window.loggedEvents;") expected_events = ['touchstart', 'touchend', 'mouseover', 'mousemove', 'mousedown', 'mouseup', 'click', 'touchstart', 'touchmove', 'mouseout', 'mouseover', 'mousemove', 'touchend'] assert logged_events == expected_events, \ f"Expectations not satisfied {logged_events} " \ f"!= {expected_events}" scroll_position = driver.execute_script("return window.pageYOffset;") assert scroll_position == expected_scroll_position, \ f"Expectations not satisfied. Y-Scroll {scroll_position} " \ f"!= {expected_scroll_position} (expected)" ``` ## Failure Assertion failed: Expectations not satisfied: * Expected: ['touchstart', 'touchend', 'mouseover', 'mousemove', 'mousedown', 'mouseup', 'click', 'touchstart', 'touchmove', 'mouseout', 'mouseover', 'mousemove', 'touchend'] * Actual result: ['touchstart', 'touchend', 'mouseover', 'mousemove', 'mousedown', 'mouseup', 'click', 'touchstart', 'touchend', 'mousemove', 'mousedown', 'mouseup', 'click'] The first tap matches expectations; the divergence starts at the 8th event, where `touchmove` is missing and the sequence degenerates into a duplicated tap. ## Cause The commit added a serialized UI-process touch queue for the new `ENABLE(COORDINATED_TOUCH_EVENTS)` path but the wrong mechanism (async-scrolling/event-region coalescing). The real cause is a plain missing `else`: in the code at `Source/WebKit/UIProcess/WebPageProxy.cpp:5566`: ```cpp if (event.type() == WebEventType::TouchMove && !internals().touchEventQueue.isEmpty()) { QueuedTouchEvents& lastEvent = internals().touchEventQueue.last(); if (lastEvent.forwardedEvent.type() == WebEventType::TouchMove) lastEvent.deferredTouchEvents.append(event); // <-- no else: event is silently discarded } else { internals().touchEventQueue.append(event); if (internals().touchEventQueue.size() == 1) processNextQueuedTouchEvent(); } ``` When a `TouchMove` arrives while the queue is non-empty **but the last queued event is not itself a `TouchMove`**; i.e. while the `TouchStart` is still awaiting its async reply from the web process — neither branch runs. The event is neither forwarded to the web process nor appended to `deferredTouchEvents`. It is dropped. Because `PageClientImpl::doneWithTouchEvent()` is only reached for events that made it into the queue, a dropped `TouchMove` is lost twice: the DOM never sees `touchmove`, and the WPE gesture controller never sees the motion either. The gesture controller then classifies down+up-with-no-motion as a tap and synthesizes `mousemove`/`mousedown`/`mouseup`/`click`. Nothing scrolls, so the test's second assertion (`pageYOffset == 300`) would also have failed. `WebAutomationSession::platformSimulateTouchInteraction()` (`Source/WebKit/UIProcess/Automation/libwpe/WebAutomationSessionWPE.cpp:527`) emits exactly **one** `WPE_EVENT_TOUCH_MOVE` per move action, with no interpolation and no wait — there is an explicit TODO for this (
https://bugs.webkit.org/show_bug.cgi?id=275031
). So the sequence is: 1. `TOUCH_DOWN`-> queue empty -> appended, size 1 -> sent to web process, reply pending. 2. `TOUCH_MOVE` -> queue non-empty, last is `TouchStart` -> **dropped**. 3. `TOUCH_UP` -> not a move -> appended normally.
EWS
Comment 3
2026-08-27 08:20:33 PDT
Committed
319960@main
(f0c538173039): <
https://commits.webkit.org/319960@main
> Reviewed commits have been landed. Closing PR #72574 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug