[webkit-changes] [WebKit/WebKit] a81bf2: Allow for <input type=checkbox switch> haptic feed...

Anne van Kesteren noreply at github.com
Wed Mar 27 03:12:56 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a81bf20129ac80f7b807079fe7e5323eecb3e4df
      https://github.com/WebKit/WebKit/commit/a81bf20129ac80f7b807079fe7e5323eecb3e4df
  Author: Anne van Kesteren <annevk at annevk.nl>
  Date:   2024-03-27 (Wed, 27 Mar 2024)

  Changed paths:
    M Source/WebCore/Headers.cmake
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/html/CheckboxInputType.cpp
    M Source/WebCore/html/CheckboxInputType.h
    A Source/WebCore/html/SwitchTrigger.h
    M Source/WebCore/rendering/RenderTheme.h
    M Source/WebCore/rendering/ios/RenderThemeIOS.h
    M Source/WebCore/rendering/mac/RenderThemeMac.h

  Log Message:
  -----------
  Allow for <input type=checkbox switch> haptic feedback on click
https://bugs.webkit.org/show_bug.cgi?id=271711

Reviewed by Aditya Keerthi.

And enable this on HAVE(UI_IMPACT_FEEDBACK_GENERATOR) platforms. For
macOS there should no functional change.

(Not guarding the click path on macOS appears to have the same end
result as well as the haptic cannot be observed, but that does not seem
optimal as more code ends up being executed.)

* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/html/CheckboxInputType.cpp:
(WebCore::CheckboxInputType::willDispatchClick):
(WebCore::switchAnimationUpdateInterval):
(WebCore::CheckboxInputType::performSwitchVisuallyOnAnimation):
(WebCore::CheckboxInputType::updateIsSwitchVisuallyOnFromAbsoluteLocation):
* Source/WebCore/html/CheckboxInputType.h:
* Source/WebCore/html/SwitchTrigger.h: Added.
* Source/WebCore/rendering/RenderTheme.h:
(WebCore::RenderTheme::hasSwitchHapticFeedback const):
* Source/WebCore/rendering/ios/RenderThemeIOS.h:
* Source/WebCore/rendering/mac/RenderThemeMac.h:

Canonical link: https://commits.webkit.org/276727@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