RESOLVED FIXED304348
clean up WebFoundTextRangeController
https://bugs.webkit.org/show_bug.cgi?id=304348
Summary clean up WebFoundTextRangeController
ccarley2
Reported 2025-12-17 12:02:17 PST
Some of the code in WebFoundTextRangeController is difficult to read and could use some modernization
Attachments
Radar WebKit Bug Importer
Comment 1 2025-12-17 12:02:24 PST
ccarley2
Comment 2 2025-12-17 12:06:23 PST
EWS
Comment 3 2025-12-18 16:05:17 PST
Committed 304713@main (8b622d23c65b): <https://commits.webkit.org/304713@main> Reviewed commits have been landed. Closing PR #55577 and removing active labels.
Diego Pino
Comment 4 2025-12-23 14:23:07 PST
After this patch, 'GTK-Linux-64-bit-Release-Debian-Stable-Build' s is failing with the following error: https://build.webkit.org/#/builders/46/builds/58814 ``` In file included from DerivedSources/WebKit/unified-sources/UnifiedSource-54928a2b-30.cpp:8: ../../../Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp: In member function ‘void WebKit::WebFoundTextRangeController::findTextRangesForStringMatches(const WTF::String&, WTF::OptionSet<WebKit::FindOptions>, uint32_t, WTF::CompletionHandler<void(WTF::HashMap<WTF::ObjectIdentifierGeneric<WebCore::FrameIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits<long unsigned int>, long unsigned int>, WTF::Vector<WebKit::WebFoundTextRange> >&&)>&&)’: ../../../Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp:136:66: error: ‘zip’ is not a member of ‘std::views’ 136 | for (const auto& [foundTextRange, simpleRange] : std::views::zip(webFoundTextRanges, validSimpleRanges)) { | ^~~ ninja: build stopped: subcommand failed. ``` The issue is that this bot uses GCC12 which uses a libstdc++ version which doesn't implement `std::views:zip`. This is the only use of this function in the entire codebase. A potential fix could be to implement std::view:zip in StdLibExtras.h. Another possibility is to rewrite this code so it doesn't use `std::views::zip`.
Diego Pino
Comment 5 2025-12-23 14:30:09 PST
Claudio Saavedra
Comment 6 2026-01-19 09:14:41 PST
EWS
Comment 7 2026-01-19 21:53:19 PST
Committed 305851@main (bea9084bbebd): <https://commits.webkit.org/305851@main> Reviewed commits have been landed. Closing PR #56839 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.