[webkit-changes] [WebKit/WebKit] 40abe1: [macOS] open.spotify.com: unnecessary text selecti...
Wenson Hsieh
noreply at github.com
Sun Dec 1 12:42:32 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 40abe11810765b73c18b0873553852baf83de3fb
https://github.com/WebKit/WebKit/commit/40abe11810765b73c18b0873553852baf83de3fb
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2024-12-01 (Sun, 01 Dec 2024)
Changed paths:
A LayoutTests/fast/events/mac/mouse-down-can-start-selection-quirk-expected.txt
A LayoutTests/fast/events/mac/mouse-down-can-start-selection-quirk.html
M Source/WebCore/page/EventHandler.cpp
M Source/WebCore/page/Quirks.cpp
M Source/WebCore/page/Quirks.h
M Source/WebCore/page/QuirksData.h
Log Message:
-----------
[macOS] open.spotify.com: unnecessary text selection when dragging various sliders
https://bugs.webkit.org/show_bug.cgi?id=283837
rdar://138916062
Reviewed by Abrar Rahman Protyasha.
Add a quirk to prevent mousedown from triggering text selection on Spotify, when clicking and
dragging over various progress sliders. While these widgets lack any accessibility roles which would
suggest that they're sliders or interactive progress-related DOM elements of some kind, they do
contain both `touch-action: none;` and `pointer: cursor;` which serve as a strong hint that they are
clickable (or at least interactive in some way), and the web app intends to process the interaction
using some custom logic.
* LayoutTests/fast/events/mac/mouse-down-can-start-selection-quirk-expected.txt: Added.
* LayoutTests/fast/events/mac/mouse-down-can-start-selection-quirk.html: Added.
Add a layout test to exercise this change.
* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::canMouseDownStartSelect):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::isSpotifyPlayer const):
Factor this out into a separate helper method, so we can use it in both places below.
(WebCore::Quirks::needsBodyScrollbarWidthNoneDisabledQuirk const):
(WebCore::Quirks::shouldAvoidStartingSelectionOnMouseDown const):
* Source/WebCore/page/Quirks.h:
* Source/WebCore/page/QuirksData.h:
Add a cached bit `isSpotifyPlayer` flag, and use it to replace an existing cached quirks state flag.
Canonical link: https://commits.webkit.org/287194@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