Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 583e403e287774c7ad78dddecafaf25f1b4dc1d8
https://github.com/WebKit/WebKit/commit/583e403e287774c7ad78dddecafaf25f1b4dc1d8
Author: Darin Adler <[email protected]>
Date: 2025-10-31 (Fri, 31 Oct 2025)
Changed paths:
M Source/WTF/wtf/Logger.h
M Source/WTF/wtf/PrintStream.cpp
M Source/WTF/wtf/PrintStream.h
M Source/WTF/wtf/text/StringImpl.cpp
M Source/WTF/wtf/text/StringImpl.h
M Source/WTF/wtf/text/WTFString.cpp
M Source/WTF/wtf/text/WTFString.h
M Tools/Scripts/webkitpy/style/checkers/jsonchecker.py
Log Message:
-----------
Add constructor for String that takes span<char8_t>
https://bugs.webkit.org/show_bug.cgi?id=301739
rdar://163764627
Reviewed by Sam Weinig.
* Source/WTF/wtf/Logger.h:
(WTF::LogArgument::toString): Added overload that takes std::span<const
char8_t>.
* Source/WTF/wtf/PrintStream.cpp:
(WTF::printInternal): Added overload that takes std::span<const char8_t>.
* Source/WTF/wtf/PrintStream.h: Ditto.
* Source/WTF/wtf/text/StringImpl.cpp:
(WTF::StringImpl::create): Added overload that takes std::span<const char8_t>.
* Source/WTF/wtf/text/StringImpl.h: Ditto.
* Source/WTF/wtf/text/WTFString.cpp:
(WTF::String::String): Added overload that takes std::span<const char8_t>.
(WTF::fromUTF8Impl): Deleted.
(WTF::String::fromUTF8): Changed to call the constructor.
(WTF::String::fromUTF8ReplacingInvalidSequences): Moved code here from the
fromUTF8Impl function.
(WTF::String::fromUTF8WithLatin1Fallback): Call the constructor rather than
the fromUTF8 function.
* Source/WTF/wtf/text/WTFString.h: Added constructor that takes
std::span<const char8_t>.
Canonical link: https://commits.webkit.org/302417@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications