Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 41317199e5d48efc750d62c6feddfc77015f1b67
https://github.com/WebKit/WebKit/commit/41317199e5d48efc750d62c6feddfc77015f1b67
Author: Cole Carley <[email protected]>
Date: 2026-03-18 (Wed, 18 Mar 2026)
Changed paths:
M Source/WebCore/dom/DocumentMarker.h
M Source/WebCore/dom/DocumentMarkerController.h
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/rendering/MarkedText.cpp
M Source/WebCore/rendering/MarkedText.h
M Source/WebCore/rendering/StyledMarkedText.cpp
M Source/WebCore/rendering/ios/RenderThemeIOS.h
M Source/WebCore/rendering/ios/RenderThemeIOS.mm
M Source/WebKit/WebProcess/WebPage/FindController.cpp
M Source/WebKit/WebProcess/WebPage/FindIndicator.cpp
M Source/WebKit/WebProcess/WebPage/FindIndicator.h
M Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp
M Source/WebKit/WebProcess/WebPage/ios/FindIndicatorIOS.cpp
M Tools/TestWebKitAPI/Tests/WebCore/MarkedText.cpp
Log Message:
-----------
Find in page should show yellow indicator even if no valid selection
https://bugs.webkit.org/show_bug.cgi?id=310141
rdar://172781422
Reviewed by Ryosuke Niwa.
When there is no valid selection, the text indicator cannot properly
show the yellow box to highlight a match.
I added a new document mark that represents an active text match. Now,
even if there is no valid selection, the match will be colored correctly.
This is a work around. The TextIndicator cannot render elements tagged
with user-select: none properly. If that is resolved,
DocumentMarkerType::ActiveTextMatch should be removed.
Test: Tools/TestWebKitAPI/Tests/WebCore/MarkedText.cpp
* Source/WebCore/dom/DocumentMarker.h:
(WebCore::DocumentMarker::allMarkers):
* Source/WebCore/dom/DocumentMarkerController.h:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::removeAllActiveTextMatches):
* Source/WebCore/page/Page.h:
* Source/WebCore/rendering/MarkedText.cpp:
(WebCore::MarkedText::collectForDocumentMarkers):
* Source/WebCore/rendering/MarkedText.h:
* Source/WebCore/rendering/StyledMarkedText.cpp:
(WebCore::resolveStyleForMarkedText):
* Source/WebCore/rendering/ios/RenderThemeIOS.h:
* Source/WebCore/rendering/ios/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::platformTextSearchHighlightColor const):
* Source/WebKit/WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString):
(WebKit::FindController::indicateFindMatch):
(WebKit::FindController::hideFindUI):
* Source/WebKit/WebProcess/WebPage/FindIndicator.cpp:
(WebKit::FindIndicator::hide):
* Source/WebKit/WebProcess/WebPage/FindIndicator.h:
(WebKit::FindIndicator::willFindString): Deleted.
* Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp:
(WebKit::WebFoundTextRangeController::decorateTextRangeWithStyle):
(WebKit::WebFoundTextRangeController::clearAllDecoratedFoundText):
* Source/WebKit/WebProcess/WebPage/ios/FindIndicatorIOS.cpp:
(WebKit::FindIndicatorIOS::hide):
(WebKit::FindIndicatorIOS::willFindString):
* Tools/TestWebKitAPI/Tests/WebCore/MarkedText.cpp:
(WebCore::operator<<):
Canonical link: https://commits.webkit.org/309494@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications