[webkit-changes] [WebKit/WebKit] dfb397: Haptic feedback for <input type=checkbox switch> s...
Aditya Keerthi
noreply at github.com
Fri Jan 3 08:50:34 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dfb3971bb0d9ef84f41784e277404aa10a5ad5f3
https://github.com/WebKit/WebKit/commit/dfb3971bb0d9ef84f41784e277404aa10a5ad5f3
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2025-01-03 (Fri, 03 Jan 2025)
Changed paths:
M Source/WebCore/html/CheckboxInputType.cpp
M Tools/TestWebKitAPI/SourcesCocoa.txt
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/WebKitCocoa/SwitchInputTests.mm
Log Message:
-----------
Haptic feedback for <input type=checkbox switch> should require user activation
https://bugs.webkit.org/show_bug.cgi?id=285120
rdar://142190653
Reviewed by Wenson Hsieh.
It should not be possible to generate haptic feedback from script alone.
Check that a user gesture is being processed if the haptic feedback is triggered
due to a click.
* Source/WebCore/html/CheckboxInputType.cpp:
(WebCore::CheckboxInputType::performSwitchVisuallyOnAnimation):
`SwitchTrigger::PointerTracking` is not checked since it is only generated by
trusted mouse move events, and `processingUserGesture` is not true for mouse
moves.
* Tools/TestWebKitAPI/SourcesCocoa.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SwitchInputTests.mm: Added.
(TEST(SwitchInputTests, HapticFeedbackOnDrag)):
This test is macOS only since there is no way to simulate a drag on iOS in API
tests, until a real UIApplication is available.
(TEST(SwitchInputTests, HapticFeedbackRequiresUserGesture)):
Canonical link: https://commits.webkit.org/288403@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list