Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 103ad17fab7bb625a285a8f785e7a1bc709ccb6d
https://github.com/WebKit/WebKit/commit/103ad17fab7bb625a285a8f785e7a1bc709ccb6d
Author: Fujii Hironori <[email protected]>
Date: 2026-07-27 (Mon, 27 Jul 2026)
Changed paths:
M LayoutTests/platform/wpe/TestExpectations
M Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp
M Source/WebKit/WPEPlatform/wpe/WPEEvent.cpp
A Source/WebKit/WPEPlatform/wpe/WPEEventInternal.h
M Tools/WebKitTestRunner/wpe/EventSenderProxyClientWPE.cpp
M Tools/WebKitTestRunner/wpe/EventSenderProxyClientWPE.h
Log Message:
-----------
[WPE Platform] New internal API to create a touch event with multiple touch
points
https://bugs.webkit.org/show_bug.cgi?id=319941
Reviewed by Carlos Garcia Campos.
WPE Platform API wpe_event_touch_new takes only a single touch point. This is
not a problem for normal usecases. If two fingers touch the screen, the
application calls wpe_event_touch_new twice with a single touch point each
time. WPEWebViewPlatform class memorizes all touch points in m_touchEvents
member variable.
However, this causes two problems for layout tests. Some layout tests expect a
touch event with multiple touch points at a time. For example,
fast/events/touch/touch-target.html has this code.
> eventSender.clearTouchPoints();
> eventSender.addTouchPoint(50, 150);
> eventSender.addTouchPoint(50, 250);
> eventSender.touchStart();
This should dispatch a touchstart event with two touch points at a time.
However, WPE WebKitTestRunner dispatched two touchstart events because
wpe_event_touch_new accepts only a single touch point at a time.
The second problem is that some layout tests don't release all touch points.
For example, fast/events/touch/touch-target.html has this code at the end of
the test.
> eventSender.releaseTouchPoint(1);
> eventSender.touchEnd();
Only the 1st touch point is released. The 0th touch point isn't released. This
caused a problme for the next test because WPEWebViewPlatform memorizes touch
points in m_touchEvents.
Added new internal API wpeEventTouchCreateForTesting, wpeEventIsTouchForTesting
and wpeEventTouchTouchPoints.
* Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp:
(WKWPE::platformTouchPoints):
(WKWPE::ViewPlatform::handleEvent):
* Source/WebKit/WPEPlatform/wpe/WPEEvent.cpp:
(wpe_event_get_modifiers):
(wpe_event_touch_get_sequence_id):
(wpeEventTouchCreateForTesting):
(wpeEventTouchTouchPoints):
(wpeEventTouchPointsForTesting):
(wpeEventIsTouchForTesting):
* Tools/WebKitTestRunner/wpe/EventSenderProxyClientWPE.cpp:
(WTR::EventSenderProxyClientWPE::sendTouchEvent):
(WTR::EventSenderProxyClientWPE::touchStart):
(WTR::EventSenderProxyClientWPE::touchMove):
(WTR::EventSenderProxyClientWPE::touchEnd):
(WTR::EventSenderProxyClientWPE::touchCancel):
(WTR::std::function<bool): Deleted.
* Tools/WebKitTestRunner/wpe/EventSenderProxyClientWPE.h:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WebKit/WPEPlatform/wpe/WPEEventInternal.h: Added.
Canonical link: https://commits.webkit.org/318003@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications