Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e24a99cde1a5b4e31f09e5e91f823f14a180f8ad
https://github.com/WebKit/WebKit/commit/e24a99cde1a5b4e31f09e5e91f823f14a180f8ad
Author: Cole Carley <[email protected]>
Date: 2026-03-04 (Wed, 04 Mar 2026)
Changed paths:
M Source/WebCore/page/TextIndicator.cpp
M Source/WebKit/WebProcess/WebPage/FindController.cpp
M Source/WebKit/WebProcess/WebPage/FindController.h
Log Message:
-----------
Fix TextIndicator for -webkit-user-select: none ranges during find in page
https://bugs.webkit.org/show_bug.cgi?id=309040
rdar://171590205
Reviewed by Megan Gardner.
When text indicators are shown for user-select: none matches, only a solid
yellow box is rendered. Users cannot see any of the underlying text. This
is because it tries to use the selection to render, but user-select: none
matches cannot have selections.
To fix this issue, I check if the range is collapsed, and switch the text
indicator options to PaintAllContent. This allows the text to show, but
the background does not match the yellow indicator.
In the future, there needs to be a larger refactor of the TextIndicator
code to decouple it from selections.
* Source/WebCore/page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithSelectionInFrame):
* Source/WebKit/WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString):
(WebKit::FindController::hideFindUI):
(WebKit::FindController::updateFindIndicator):
* Source/WebKit/WebProcess/WebPage/FindController.h:
* selection.html: Added.
Canonical link: https://commits.webkit.org/308667@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications