Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6303013b4c9cb1e0543063d2acc386b7eb1d4a1d
https://github.com/WebKit/WebKit/commit/6303013b4c9cb1e0543063d2acc386b7eb1d4a1d
Author: Lily Spiniolas <[email protected]>
Date: 2025-12-04 (Thu, 04 Dec 2025)
Changed paths:
M Source/WebCore/rendering/EventRegion.cpp
M Source/WebCore/rendering/RenderLayerBacking.cpp
M Source/WebCore/rendering/style/RenderStyleConstants.cpp
M Source/WebCore/rendering/style/RenderStyleConstants.h
M Source/WebCore/style/StyleAdjuster.cpp
Log Message:
-----------
[Touch event regions] are not generated for `touchforcechange`, all touch
events are synchronous for elements with `touchcancel` listener
https://bugs.webkit.org/show_bug.cgi?id=303403
rdar://165708004
Reviewed by Abrar Rahman Protyasha.
In `eventTypeForEventListenerType(...)`, we previously mapped
`EventListenerRegionType::NonPassiveTouchCancel`
to `EventTrackingRegionsEventType::Touchforcechange`, causing cascading
effects which eventually lead to
`internals().touchEventTracking.touchForceChangedTracking` getting set
to synchronous. Then, in `WebPageProxy::touchEventTrackingType`, the global
tracking type is unconditionally merged with `touchForceChangedTracking`,
causing all touch events to be synchronous.
Fix this bug by removing the bad mapping. Remove
`EventListenerRegionType::NonPassiveTouchCancel` because we don't
need to generate synchronous touch cancel regions in the first place.
`touchcancel` is never cancelable since it is a notification that the
touch event has already been canceled. This matches the behavior when
touch event regions are disabled.
Add support for new EventListenerRegionType
`EventListenerRegionType::NonPassiveTouchForceChange` and
`EventListenerRegionType::TouchForceChange` so that we can properly
track touch event regions for elements with `touchforcechange`
listeners.
* Source/WebCore/rendering/EventRegion.cpp:
(WebCore::eventTypeForEventListenerType):
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::patternForEventListenerRegionType):
(WebCore::RenderLayerBacking::paintDebugOverlays):
* Source/WebCore/rendering/style/RenderStyleConstants.cpp:
(WebCore::operator<<):
* Source/WebCore/rendering/style/RenderStyleConstants.h:
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::computeEventListenerRegionTypes):
Canonical link: https://commits.webkit.org/303895@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications