Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4a75c60f3cc10a3dc100d40c8f017c1247a886cb
https://github.com/WebKit/WebKit/commit/4a75c60f3cc10a3dc100d40c8f017c1247a886cb
Author: Yusuke Suzuki <[email protected]>
Date: 2024-03-29 (Fri, 29 Mar 2024)
Changed paths:
M Source/WTF/wtf/text/StringCommon.h
M Source/WebCore/html/TextFieldInputType.cpp
M Source/WebCore/html/parser/HTMLParserIdioms.h
M Tools/TestWebKitAPI/Tests/WTF/StringCommon.cpp
Log Message:
-----------
Add SIMD containsHTMLLineBreak
https://bugs.webkit.org/show_bug.cgi?id=271878
rdar://125595924
Reviewed by Mark Lam.
This patch adds WTF::charactersContain SIMD function which scans entire string
to check if one of character is included.
This function is aligned to charactersAreAllASCII. The intention of this new
function is assuming that the given characters rarely
include specified characters. So this function super quickly scans entire
string and returning the answer with SIMD.
* Source/WTF/wtf/text/StringCommon.h:
* Source/WebCore/html/TextFieldInputType.cpp:
(WebCore::limitLength):
(WebCore::TextFieldInputType::sanitizeValue const):
* Source/WebCore/html/parser/HTMLParserIdioms.h:
(WebCore::containsHTMLLineBreak):
* Tools/TestWebKitAPI/Tests/WTF/StringCommon.cpp:
(TestWebKitAPI::TEST(WTF_StringCommon, CharactersContain8)):
(TestWebKitAPI::TEST(WTF_StringCommon, CharactersContain16)):
Canonical link: https://commits.webkit.org/276842@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes