Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 647785e34521e96ba37dab6bbd61a29ff2172666
      
https://github.com/WebKit/WebKit/commit/647785e34521e96ba37dab6bbd61a29ff2172666
  Author: Xabier Rodriguez-Calvar <[email protected]>
  Date:   2025-12-04 (Thu, 04 Dec 2025)

  Changed paths:
    M Source/WTF/wtf/StdLibExtras.h
    M Source/WTF/wtf/text/StringCommon.h
    M Tools/TestWebKitAPI/Tests/WTF/StringCommon.cpp

  Log Message:
  -----------
  [WTF] Fix behavioral issues in searching in spans
https://bugs.webkit.org/show_bug.cgi?id=302925

Reviewed by Darin Adler.

There were several cases where we were not handling properly certain cases when 
inspecting spans for data and some
codepaths that had different behaviors. Fixed them and improved test coverage. 
reverseFind lost the starting offset that
was not used anywhere and for coherence with the find counterpart.

Test: Tools/TestWebKitAPI/Tests/WTF/StringCommon.cpp
* Source/WTF/wtf/StdLibExtras.h:
(WTF::find):
* Source/WTF/wtf/text/StringCommon.h:
(WTF::findIgnoringASCIICase):
(WTF::reverseFindInner):
(WTF::reverseFind):
* Tools/TestWebKitAPI/Tests/WTF/StringCommon.cpp:
(TestWebKitAPI::TEST(WTF_StringCommon, Equal)):
(TestWebKitAPI::TEST(WTF_StringCommon, EqualIgnoringASCIICase)):
(TestWebKitAPI::TEST(WTF_StringCommon, StartsWith)):
(TestWebKitAPI::TEST(WTF_StringCommon, EndsWith)):
(TestWebKitAPI::TEST(WTF_StringCommon, Find)):
(TestWebKitAPI::TEST(WTF_StringCommon, ReverseFind)):
(TestWebKitAPI::TEST(WTF_StringCommon, Contains)):
(TestWebKitAPI::TEST(WTF_StringCommon, StartsWithLettersIgnoringASCIICase)):
(TestWebKitAPI::TEST(WTF_StringCommon, EndsWithLettersIgnoringASCIICase)):
(TestWebKitAPI::TEST(WTF_StringCommon, FindIgnoringASCIICase)):
(TestWebKitAPI::TEST(WTF_StringCommon, ContainsIgnoringASCIICase)):
(TestWebKitAPI::TEST(WTF_StringCommon, CharactersAreAllASCII)):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to