Skip to content

[AutoFill Debugging] Prefer case-sensitive matches before falling back to case-insensitive search#60367

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
whsieh:eng/309680
Mar 11, 2026
Merged

[AutoFill Debugging] Prefer case-sensitive matches before falling back to case-insensitive search#60367
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
whsieh:eng/309680

Conversation

@whsieh
Copy link
Member

@whsieh whsieh commented Mar 11, 2026

37b7ce7

[AutoFill Debugging] Prefer case-sensitive matches before falling back to case-insensitive search
https://bugs.webkit.org/show_bug.cgi?id=309680
rdar://172283407

Reviewed by Aditya Keerthi.

Adjust `TextExtraction::searchForText`, such that it prefers exact, case-sensitive text matches in
the DOM before falling back to a case-insensitive search.

Tests: TextExtractionTests.RequestJSHandleForNodeIdentifierCaseSensitive

* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::searchForText):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/TextExtractionTests.mm:
(TestWebKitAPI::TEST(TextExtractionTests, RequestJSHandleForNodeIdentifierCaseSensitive)):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/debug-text-extraction.html:

Canonical link: https://commits.webkit.org/309074@main

487c75b

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe 🛠 win ⏳ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 🧪 win-tests ⏳ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe ⏳ 🛠 vision-apple
🧪 ios-wk2-wpt 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
🛠 ios-safer-cpp ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
🧪 vision-wk2 ✅ 🧪 mac-intel-wk2
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@whsieh whsieh requested a review from cdumez as a code owner March 11, 2026 16:15
@whsieh whsieh self-assigned this Mar 11, 2026
@whsieh whsieh added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Mar 11, 2026
@@ -571,9 +571,11 @@ - (void)receiveDictionaryFromWebProcess:(NSDictionary *)dictionary
}()];

NSArray<NSString *> *lines = [debugText componentsSeparatedByString:@"\n"];
EXPECT_EQ([lines count], 2u);
NSLog(@"<WK>: %@", lines);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stray logging?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦 Whoops, removed.

Thanks for the review!

@whsieh whsieh added the merge-queue Applied to send a pull request to merge-queue label Mar 11, 2026
…k to case-insensitive search

https://bugs.webkit.org/show_bug.cgi?id=309680
rdar://172283407

Reviewed by Aditya Keerthi.

Adjust `TextExtraction::searchForText`, such that it prefers exact, case-sensitive text matches in
the DOM before falling back to a case-insensitive search.

Tests: TextExtractionTests.RequestJSHandleForNodeIdentifierCaseSensitive

* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::searchForText):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/TextExtractionTests.mm:
(TestWebKitAPI::TEST(TextExtractionTests, RequestJSHandleForNodeIdentifierCaseSensitive)):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/debug-text-extraction.html:

Canonical link: https://commits.webkit.org/309074@main
@webkit-commit-queue
Copy link
Collaborator

Committed 309074@main (37b7ce7): https://commits.webkit.org/309074@main

Reviewed commits have been landed. Closing PR #60367 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 37b7ce7 into WebKit:main Mar 11, 2026
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Bugs Unclassified bugs are placed in this component until the correct component can be determined.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants