Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1d9c9e48e8ee6209d168e3489b74d7e7683135b9
https://github.com/WebKit/WebKit/commit/1d9c9e48e8ee6209d168e3489b74d7e7683135b9
Author: Sam Weinig <[email protected]>
Date: 2026-10-12 (Mon, 12 Oct 2026)
Changed paths:
M Source/WebCore/editing/Editor.cpp
M Source/WebCore/editing/Editor.h
M Source/WebCore/editing/glib/EditorGLib.cpp
M Source/WebCore/editing/ios/EditorIOS.mm
M Source/WebCore/editing/mac/EditorMac.mm
M Source/WebCore/editing/win/EditorWin.cpp
M Source/WebCore/page/DragController.cpp
M Source/WebCore/platform/Pasteboard.h
M Source/WebCore/platform/StaticPasteboard.cpp
M Source/WebCore/platform/StaticPasteboard.h
M Source/WebCore/platform/glib/PasteboardGLib.cpp
M Source/WebCore/platform/glib/SelectionData.cpp
M Source/WebCore/platform/glib/SelectionData.h
M Source/WebCore/platform/ios/PasteboardIOS.mm
M Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
M Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp
M Source/WebCore/platform/mac/PasteboardMac.mm
M Source/WebCore/platform/win/PasteboardWin.cpp
M Source/WebCore/rendering/RenderImage.cpp
M Source/WebCore/rendering/RenderImage.h
M Source/WebCore/testing/Internals.cpp
M Source/WebKit/Shared/Pasteboard.serialization.in
M Source/WebKit/Shared/glib/SelectionData.serialization.in
M Source/WebKit/UIProcess/API/wpe/WPEWebView.cpp
M Source/WebKit/UIProcess/gtk/GtkUtilities.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/ContextMenuTests.mm
Log Message:
-----------
[Image Redux] Size images written to the pasteboard with the default sizing
algorithm
https://bugs.webkit.org/show_bug.cgi?id=327163
Reviewed by Darin Adler.
This started out as just a change to replace the use of Image::size() in the
pasteboard image code, but
turned into more of a refactoring than I had imagined.
- Updated the PasteboardImage type for each platform so it only includes what
they need. This allowed
removing the RefPtr<Image> entirely.
- Fixed layering violation in the windows code where it was passing an
Element down to platform. Now it
follows the other platforms and use PasteboardImage as the intermediary.
- Added a shared helper on RenderImage, concreteObjectSizeForPasteboard(), to
standardize how to put
image data on the pasteboard that is not just the original file (e.g. on
macOS, this is the TIFF data).
Tests: ContextMenuTests.CopyImageTIFFForSVGWithNaturalSize
ContextMenuTests.CopyImageTIFFForSVGWithOnlyWidth
ContextMenuTests.CopyImageTIFFForSVGWithoutNaturalSize
ContextMenuTests.CopyImageTIFFForHugeSVGIsCapped
* Source/WebCore/editing/Editor.cpp:
* Source/WebCore/editing/Editor.h:
* Source/WebCore/editing/glib/EditorGLib.cpp:
* Source/WebCore/editing/ios/EditorIOS.mm:
* Source/WebCore/editing/mac/EditorMac.mm:
* Source/WebCore/editing/win/EditorWin.cpp:
* Source/WebCore/page/DragController.cpp:
* Source/WebCore/platform/Pasteboard.h:
* Source/WebCore/platform/StaticPasteboard.cpp:
* Source/WebCore/platform/StaticPasteboard.h:
* Source/WebCore/platform/glib/PasteboardGLib.cpp:
* Source/WebCore/platform/glib/SelectionData.cpp:
* Source/WebCore/platform/glib/SelectionData.h:
* Source/WebCore/platform/ios/PasteboardIOS.mm:
* Source/WebCore/platform/ios/PlatformPasteboardIOS.mm:
* Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp:
* Source/WebCore/platform/mac/PasteboardMac.mm:
* Source/WebCore/platform/win/PasteboardWin.cpp:
* Source/WebCore/rendering/RenderImage.cpp:
* Source/WebCore/rendering/RenderImage.h:
* Source/WebKit/Shared/Pasteboard.serialization.in:
* Source/WebKit/Shared/glib/SelectionData.serialization.in:
* Source/WebKit/UIProcess/gtk/GtkUtilities.cpp:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/ContextMenuTests.mm:
Canonical link: https://commits.webkit.org/323529@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications