Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a20b10db9c2de64a37e2eb32579ec465db2bb73d
https://github.com/WebKit/WebKit/commit/a20b10db9c2de64a37e2eb32579ec465db2bb73d
Author: Jean-Yves Avenard <[email protected]>
Date: 2025-08-02 (Sat, 02 Aug 2025)
Changed paths:
M Source/WTF/wtf/TypeTraits.h
M Source/WebCore/Modules/highlight/AppHighlight.h
M Source/WebCore/Modules/highlight/AppHighlightRangeData.cpp
M Source/WebCore/Modules/highlight/AppHighlightRangeData.h
M Source/WebCore/Modules/highlight/AppHighlightStorage.cpp
M Source/WebCore/Modules/highlight/AppHighlightStorage.h
M Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp
M Source/WebCore/bindings/js/WebAssemblyCachedScriptSourceProvider.h
M Source/WebCore/editing/cocoa/EditorCocoa.mm
M Source/WebCore/loader/DocumentLoader.cpp
M Source/WebCore/platform/SharedBuffer.cpp
M Source/WebCore/platform/SharedBuffer.h
M Source/WebCore/platform/cf/SharedBufferCF.cpp
M Source/WebCore/platform/cocoa/SharedBufferCocoa.mm
M Source/WebCore/platform/glib/SharedBufferGlib.cpp
M Source/WebCore/platform/graphics/cg/ImageUtilitiesCG.cpp
M Source/WebCore/platform/graphics/win/ImageAdapterWin.cpp
M Source/WebCore/platform/ios/PreviewConverterIOS.mm
M Source/WebCore/platform/mediarecorder/MediaRecorderPrivateGStreamer.cpp
M Source/WebCore/platform/skia/SharedBufferSkia.cpp
M Source/WebCore/svg/graphics/SVGImage.cpp
M Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
M Source/WebKit/UIProcess/wpe/WebPasteboardProxyWPE.cpp
M Source/WebKit/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp
M Tools/TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp
M Tools/TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm
Log Message:
-----------
SharedBufferBuilder::take() should return a contiguous SharedBuffer if it
only contains a single DataSegment.
https://bugs.webkit.org/show_bug.cgi?id=296684
rdar://157093750
Reviewed by Youenn Fablet.
Make SharedBufferBuilder always return a SharedBuffer if the data it holds
is contiguous, and a FragmentedSharedBuffer otherwise.
Following this change, you can no longer create an object of the base class
FragmentedSharedBuffer if it is contiguous: it will always be a SharedBuffer
instead.
A side benefits is that it allows to remove a memory allocation whenever
we want to convert a FragmentedSharedBuffer into a SharedBuffer such as when
when using a SharedBufferBuilder and appending a single segment to it:
SharedBufferBuilder::takeAsContiguous() is now a no-op if the underlying
buffer is already contiguous.
API tests added.
* Source/WTF/wtf/TypeTraits.h: Adding RemoveCVSmartPointer convenience template.
* Source/WebCore/Modules/highlight/AppHighlight.h:
(IPC::AsyncReplyError<WebCore::AppHighlight>::create): Remove use of
FragmentedSharedBuffer
that was in effect always contiguous.
* Source/WebCore/Modules/highlight/AppHighlightRangeData.cpp:
(WebCore::AppHighlightRangeData::create): Ditto
(WebCore::AppHighlightRangeData::toSharedBuffer const):
* Source/WebCore/Modules/highlight/AppHighlightRangeData.h:
* Source/WebCore/Modules/highlight/AppHighlightStorage.cpp: Ditto
(WebCore::AppHighlightStorage::restoreAndScrollToAppHighlight):
* Source/WebCore/Modules/highlight/AppHighlightStorage.h: Ditto
Canonical link: https://commits.webkit.org/298168@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