Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 92993a7cca0e741db9ef10138b0d0e20cc2e1048
      
https://github.com/WebKit/WebKit/commit/92993a7cca0e741db9ef10138b0d0e20cc2e1048
  Author: Xabier Rodriguez-Calvar <[email protected]>
  Date:   2025-11-13 (Thu, 13 Nov 2025)

  Changed paths:
    M Source/WTF/wtf/StdLibExtras.h
    M Source/WTF/wtf/text/ASCIILiteral.h
    M Source/WTF/wtf/text/CString.cpp
    M Source/WTF/wtf/text/CString.h
    M Source/WTF/wtf/text/CStringView.cpp
    M Source/WTF/wtf/text/CStringView.h
    M Source/WTF/wtf/text/ParsingUtilities.h
    M Source/WTF/wtf/text/StringCommon.h
    M Source/WTF/wtf/text/StringToIntegerConversion.h
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp
    M 
Source/WebCore/Modules/mediastream/gstreamer/GStreamerRtpReceiverBackend.cpp
    M 
Source/WebCore/Modules/mediastream/gstreamer/GStreamerRtpTransceiverBackend.cpp
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerStatsCollector.cpp
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.cpp
    M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
    M Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M 
Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp
    M Source/WebCore/platform/gstreamer/GStreamerElementHarness.cpp
    M Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioRTPPacketizer.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/GStreamerIncomingTrackProcessor.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/GStreamerMockDeviceProvider.cpp
    M Source/WebCore/platform/mediastream/gstreamer/GStreamerRTPPacketizer.cpp
    M Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoRTPPacketizer.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceGStreamer.cpp
    M 
Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingMediaSourceGStreamer.cpp
    M Tools/TestWebKitAPI/Tests/WTF/CString.cpp
    M Tools/TestWebKitAPI/Tests/WTF/CStringView.cpp
    M Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp
    M Tools/TestWebKitAPI/Tests/WTF/StringCommon.cpp

  Log Message:
  -----------
  [WTF] Make CStringView handle only null termination related methods and add 
some helpers for spans to StringCommon
https://bugs.webkit.org/show_bug.cgi?id=299946

Reviewed by Darin Adler.

Improved several comparisons, like starts, ends, contains, find, both case and 
aware and not. Also some more useful
conversions and parsing. For this, some more tweaks and templating was needed 
as many string management methods consider
Latin1Character only and CStringView handles char8_t.

Fly-by: fix return value of isEmpty to be bool instead of size_t and renamed 
length into lengthInBytes.

GStreamer code using CStringView already was adapted to this.

Tests: Tools/TestWebKitAPI/Tests/WTF/CString.cpp
       Tools/TestWebKitAPI/Tests/WTF/CStringView.cpp
       Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp
       Tools/TestWebKitAPI/Tests/WTF/StringCommon.cpp
* Source/WTF/wtf/StdLibExtras.h:
(WTF::find):
(WTF::contains):
(WTF::ByteCastTraits<T>::cast):
(WTF::ByteCastTraits<T::cast):
(WTF::byteCast):
* Source/WTF/wtf/text/ASCIILiteral.h:
(WTF::StringLiterals::operator_spanChar8):
* Source/WTF/wtf/text/CString.cpp:
(WTF::convertASCIICase):
(WTF::convertToASCIILowercase):
(WTF::convertToASCIIUppercase):
* Source/WTF/wtf/text/CString.h:
* Source/WTF/wtf/text/CStringView.cpp:
(WTF::CStringView::dump const):
(WTF::CStringView::toString const): Deleted.
* Source/WTF/wtf/text/CStringView.h:
(WTF::operator==):
* Source/WTF/wtf/text/ParsingUtilities.h:
(WTF::requires):
* Source/WTF/wtf/text/StringCommon.h:
(WTF::unsafeSpanChar8):
(WTF::equal):
(WTF::requires):
(WTF::equalIgnoringASCIICase):
(WTF::findIgnoringASCIICase):
(WTF::containsIgnoringASCIICase):
(WTF::find):
(WTF::contains):
(WTF::reverseFind):
(WTF::equalLettersIgnoringASCIICaseWithLength):
(WTF::startsWith):
(WTF::endsWith):
(WTF::endsWithLettersIgnoringASCIICaseCommon):
(WTF::endsWithLettersIgnoringASCIICase):
(WTF::startsWithLettersIgnoringASCIICaseCommon):
(WTF::startsWithLettersIgnoringASCIICase):
* Source/WTF/wtf/text/StringToIntegerConversion.h:
(WTF::parseInteger):
(WTF::parseIntegerAllowingTrailingJunk):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp:
(WebCore::GStreamerMediaEndpoint::requestPad):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerRtpReceiverBackend.cpp:
(WebCore::GStreamerRtpReceiverBackend::getParameters):
* 
Source/WebCore/Modules/mediastream/gstreamer/GStreamerRtpTransceiverBackend.cpp:
(WebCore::GStreamerRtpTransceiverBackend::setCodecPreferences):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerStatsCollector.cpp:
(WebCore::RTCStatsReport::Stats::Stats):
(WebCore::RTCStatsReport::RtpStreamStats::RtpStreamStats):
(WebCore::RTCStatsReport::CodecStats::CodecStats):
(WebCore::RTCStatsReport::RemoteInboundRtpStreamStats::RemoteInboundRtpStreamStats):
(WebCore::RTCStatsReport::RemoteOutboundRtpStreamStats::RemoteOutboundRtpStreamStats):
(WebCore::RTCStatsReport::InboundRtpStreamStats::InboundRtpStreamStats):
(WebCore::RTCStatsReport::OutboundRtpStreamStats::OutboundRtpStreamStats):
(WebCore::RTCStatsReport::TransportStats::TransportStats):
(WebCore::RTCStatsReport::IceCandidateStats::IceCandidateStats):
(WebCore::RTCStatsReport::IceCandidatePairStats::IceCandidatePairStats):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.cpp:
(WebCore::toRTCEncodingParameters):
(WebCore::toRTCCodecParameters):
(WebCore::toRTCRtpSendParameters):
(WebCore::capsFromRtpCapabilities):
(WebCore::capsFromSDPMedia):
(WebCore::extractMidAndRidFromRTPBuffer):
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::doCapsHaveType):
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::fillVideoRtpCapabilities):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
* 
Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
(transformInPlace):
* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
* Source/WebCore/platform/gstreamer/GStreamerElementHarness.cpp:
(WebCore::MermaidBuilder::describeCaps):
* Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp:
(annexBStreamFormatCapsFieldValue):
(videoEncoderSetEncoder):
(webkit_video_encoder_class_init):
* Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioRTPPacketizer.cpp:
(WebCore::GStreamerAudioRTPPacketizer::create):
* 
Source/WebCore/platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp:
(WebCore::GStreamerCaptureDeviceManager::captureDeviceFromGstDevice):
* 
Source/WebCore/platform/mediastream/gstreamer/GStreamerIncomingTrackProcessor.cpp:
(WebCore::GStreamerIncomingTrackProcessor::configure):
(WebCore::GStreamerIncomingTrackProcessor::incomingTrackProcessor):
* Source/WebCore/platform/mediastream/gstreamer/GStreamerMockDeviceProvider.cpp:
(webkitGstMockDeviceProviderSwitchDefaultDevice):
* Source/WebCore/platform/mediastream/gstreamer/GStreamerRTPPacketizer.cpp:
(WebCore::GStreamerRTPPacketizer::rtpStreamId const):
* Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp:
(WebCore::GStreamerVideoCapturer::reconfigure):
* Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoRTPPacketizer.cpp:
(WebCore::GStreamerVideoRTPPacketizer::create):
* 
Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceGStreamer.cpp:
(WebCore::RealtimeOutgoingAudioSourceGStreamer::setInitialParameters):
* 
Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingMediaSourceGStreamer.cpp:
(WebCore::RealtimeOutgoingMediaSourceGStreamer::setParameters):
* Tools/TestWebKitAPI/Tests/WTF/CString.cpp:
(TEST(WTF, CStringNullStringConstructor)):
(TEST(WTF, CStringEmptyEmptyConstructor)):
(TEST(WTF, CStringViewASCIICaseConversions)):
* Tools/TestWebKitAPI/Tests/WTF/CStringView.cpp:
(TestWebKitAPI::TEST(WTF, CStringViewSize)):
(TestWebKitAPI::TEST(WTF, CStringViewFrom)):
(TestWebKitAPI::TEST(WTF, CStringViewEquality)):
(TestWebKitAPI::TEST(WTF, CStringViewLength)): Deleted.
* Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp:
(TestWebKitAPI::TEST(StringBuilderTest, Append)):
* 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/303011@main



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

Reply via email to