[webkit-changes] [WebKit/WebKit] c44879: Simplify code by using std::span more

Chris Dumez noreply at github.com
Thu Mar 21 11:29:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c448798e6ae8525f4bb62d6a86326c0ac358b734
      https://github.com/WebKit/WebKit/commit/c448798e6ae8525f4bb62d6a86326c0ac358b734
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2024-03-21 (Thu, 21 Mar 2024)

  Changed paths:
    M Source/JavaScriptCore/runtime/GenericTypedArrayView.h
    M Source/WebCore/Modules/fetch/FetchBody.cpp
    M Source/WebCore/Modules/fetch/FormDataConsumer.cpp
    M Source/WebCore/Modules/mediastream/RTCEncodedFrame.cpp
    M Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp
    M Source/WebCore/Modules/websockets/WebSocketDeflater.cpp
    M Source/WebCore/Modules/webtransport/DatagramSink.cpp
    M Source/WebCore/bindings/js/BufferSource.h
    M Source/WebCore/dom/DecodedDataDocumentParser.cpp
    M Source/WebCore/dom/DecodedDataDocumentParser.h
    M Source/WebCore/dom/DocumentParser.h
    M Source/WebCore/dom/RawDataDocumentParser.h
    M Source/WebCore/dom/TextEncoder.cpp
    M Source/WebCore/fileapi/NetworkSendQueue.cpp
    M Source/WebCore/html/ImageDocument.cpp
    M Source/WebCore/html/MediaDocument.cpp
    M Source/WebCore/html/ModelDocument.cpp
    M Source/WebCore/html/PDFDocument.cpp
    M Source/WebCore/html/PluginDocument.cpp
    M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
    M Source/WebCore/html/parser/HTMLDocumentParserFastPath.cpp
    M Source/WebCore/loader/DocumentWriter.cpp
    M Source/WebCore/loader/SinkDocument.cpp
    M Source/WebCore/platform/SharedBuffer.cpp
    M Source/WebCore/platform/SharedBufferChunkReader.cpp
    M Source/WebCore/platform/SharedMemory.h
    M Source/WebCore/platform/WebCorePersistentCoders.cpp
    M Source/WebCore/platform/generic/KeyedEncoderGeneric.cpp
    M Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm
    M Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h
    M Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm
    M Source/WebKit/NetworkProcess/cocoa/WKURLSessionTaskDelegate.mm
    M Source/WebKit/Shared/WebCompiledContentRuleList.cpp
    M Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm
    M Source/WebKit/UIProcess/Cocoa/SOAuthorization/RedirectSOAuthorizationSession.mm
    M Source/WebKit/UIProcess/Cocoa/SessionStateCoding.mm
    M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
    M Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp
    M Source/WebKit/WebProcess/Network/WebTransportSendStreamSink.cpp
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

  Log Message:
  -----------
  Simplify code by using std::span more
https://bugs.webkit.org/show_bug.cgi?id=271338

Reviewed by Darin Adler.

* Source/JavaScriptCore/runtime/GenericTypedArrayView.h:
* Source/WTF/wtf/Algorithms.h:
(WTF::spanReinterpretCast): Deleted.
* Source/WTF/wtf/StdLibExtras.h:
(WTF::spanReinterpretCast):
* Source/WebCore/Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::take):
* Source/WebCore/Modules/fetch/FormDataConsumer.cpp:
(WebCore::FormDataConsumer::consumeBlob):
* Source/WebCore/Modules/mediastream/RTCEncodedFrame.cpp:
(WebCore::RTCEncodedFrame::rtcFrame):
* Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp:
(WebCore::RTCRtpSFrameTransform::createStreams):
* Source/WebCore/Modules/websockets/WebSocketDeflater.cpp:
(WebCore::WebSocketInflater::finish):
* Source/WebCore/Modules/webtransport/DatagramSink.cpp:
(WebCore::DatagramSink::write):
* Source/WebCore/bindings/js/BufferSource.h:
(WebCore::toBufferSource):
* Source/WebCore/dom/DocumentParser.h:
(WebCore::DocumentParser::appendBytes):
* Source/WebCore/dom/TextEncoder.cpp:
(WebCore::TextEncoder::encode const):
* Source/WebCore/fileapi/NetworkSendQueue.cpp:
(WebCore::NetworkSendQueue::enqueue):
(WebCore::NetworkSendQueue::processMessages):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::bufferData):
(WebCore::WebGLRenderingContextBase::bufferSubData):
(WebCore::WebGLRenderingContextBase::compressedTexImage2D):
(WebCore::WebGLRenderingContextBase::compressedTexSubImage2D):
(WebCore::WebGLRenderingContextBase::validateTexFuncData):
* Source/WebCore/html/parser/HTMLDocumentParserFastPath.cpp:
(WebCore::HTMLFastPathParser::scanTagName):
* Source/WebCore/loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::replaceDocumentWithResultOfExecutingJavascriptURL):
* Source/WebCore/platform/SharedBuffer.cpp:
(WebCore::FragmentedSharedBuffer::toIPCData const):
* Source/WebCore/platform/SharedBufferChunkReader.cpp:
(WebCore::SharedBufferChunkReader::nextChunk):
(WebCore::SharedBufferChunkReader::peek):
* Source/WebCore/platform/SharedMemory.h:
(WebCore::SharedMemory::bytes const):
* Source/WebCore/platform/WebCorePersistentCoders.cpp:
(WTF::Persistence::encodeCFData):
* Source/WebCore/platform/generic/KeyedEncoderGeneric.cpp:
(WebCore::KeyedEncoderGeneric::encodeString):
* Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::releaseKeys):
(WebCore::CDMSessionAVContentKeySession::update):
(WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
* Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
* Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
(-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedHeaderData:]):
(-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedMediaData:fragmentedMediaDataReport:]):
(WebCore::MediaRecorderPrivateWriter::appendData):
* Source/WebKit/NetworkProcess/cocoa/WKURLSessionTaskDelegate.mm:
(-[WKURLSessionTaskDelegate URLSession:dataTask:didReceiveData:]):
* Source/WebKit/Shared/WebCompiledContentRuleList.cpp:
(WebKit::WebCompiledContentRuleList::spanWithOffsetAndLength const):
* Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController loadHTMLString:baseURL:userData:]):
(-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
(-[WKWebView loadSimulatedRequest:response:responseData:]):
(-[WKWebView _loadData:MIMEType:characterEncodingName:baseURL:userData:]):
* Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:
(produceClientDataJson):
(+[_WKWebAuthenticationPanel convertToCoreCreationOptionsWithOptions:]):
(+[_WKWebAuthenticationPanel convertToCoreRequestOptionsWithOptions:]):
(asUInt8Span): Deleted.
* Source/WebKit/UIProcess/Cocoa/SOAuthorization/RedirectSOAuthorizationSession.mm:
(WebKit::RedirectSOAuthorizationSession::completeInternal):
(WebKit::span): Deleted.
* Source/WebKit/UIProcess/Cocoa/SessionStateCoding.mm:
(WebKit::decodeSessionState):
(WebKit::span): Deleted.
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::insertMultiRepresentationHEIC):
(WebKit::span): Deleted.
* Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
(WebKit::LocalAuthenticatorInternal::toArrayBuffer):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadServiceWorker):
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView removeBackgroundMenu]):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:
(WebKit::RemoteGraphicsContextGLProxy::bufferData):
(WebKit::RemoteGraphicsContextGLProxy::bufferSubData):
(WebKit::RemoteGraphicsContextGLProxy::texImage2D):
(WebKit::RemoteGraphicsContextGLProxy::texSubImage2D):
(WebKit::RemoteGraphicsContextGLProxy::compressedTexImage2D):
(WebKit::RemoteGraphicsContextGLProxy::compressedTexSubImage2D):
(WebKit::RemoteGraphicsContextGLProxy::texImage3D):
(WebKit::RemoteGraphicsContextGLProxy::texSubImage3D):
(WebKit::RemoteGraphicsContextGLProxy::compressedTexImage3D):
(WebKit::RemoteGraphicsContextGLProxy::compressedTexSubImage3D):
* Source/WebKit/WebProcess/Network/WebTransportSendStreamSink.cpp:
(WebKit::WebTransportSendStreamSink::write):
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::relayAccessibilityNotification):

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



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


More information about the webkit-changes mailing list