Skip to content

[GTK] Port SelectionData to new IPC serialization format#26564

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
csaavedra:eng/GTK-Port-SelectionData-to-new-IPC-serialization-format
Apr 3, 2024
Merged

[GTK] Port SelectionData to new IPC serialization format#26564
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
csaavedra:eng/GTK-Port-SelectionData-to-new-IPC-serialization-format

Conversation

@csaavedra
Copy link
Member

@csaavedra csaavedra commented Mar 28, 2024

41e8f10

[GTK] Port SelectionData to new IPC serialization format
https://bugs.webkit.org/show_bug.cgi?id=271836

Reviewed by Carlos Garcia Campos.

Remove the ArgumentCoders for SelectionData, adapt the
class a bit to make it work well with the generated serializers,
and add a new ArgumentCodersGtk.serialization.in for the
GTK-specific serializers.

* Source/WebCore/platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::typesSafeForBindings):
(WebCore::Pasteboard::readOrigin):
(WebCore::Pasteboard::readStringInCustomData):
* Source/WebCore/platform/gtk/SelectionData.cpp:
(WebCore::SelectionData::SelectionData):
* Source/WebCore/platform/gtk/SelectionData.h:
(WebCore::SelectionData::setImage):
(WebCore::SelectionData::image const):
(WebCore::SelectionData::customData const):
* Source/WebKit/PlatformGTK.cmake:
* Source/WebKit/Shared/gtk/ArgumentCodersGtk.cpp:
(IPC::encodeImage): Deleted.
(IPC::decodeImage): Deleted.
(IPC::ArgumentCoder<SelectionData>::encode): Deleted.
(IPC::ArgumentCoder<SelectionData>::decode): Deleted.
* Source/WebKit/Shared/gtk/ArgumentCodersGtk.h:
* Source/WebKit/Shared/gtk/ArgumentCodersGtk.serialization.in: Added.
* Source/WebKit/UIProcess/API/gtk/DragSourceGtk3.cpp:
(WebKit::DragSource::DragSource):
* Source/WebKit/UIProcess/gtk/ClipboardGtk3.cpp:
(WebKit::Clipboard::write):

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

c590209

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
🧪 ios-wk2-wpt 🧪 mac-wk1 ✅ 🛠 wpe-skia
🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
🛠 tv 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
🛠 tv-sim ✅ 🧪 api-gtk
✅ 🛠 🧪 merge 🛠 watch
✅ 🛠 watch-sim

@csaavedra csaavedra self-assigned this Mar 28, 2024
@csaavedra csaavedra added the WebKitGTK Bugs related to the Gtk API layer. label Mar 28, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Mar 28, 2024
@csaavedra csaavedra removed the merging-blocked Applied to prevent a change from being merged label Mar 28, 2024
@csaavedra csaavedra force-pushed the eng/GTK-Port-SelectionData-to-new-IPC-serialization-format branch from 9842b76 to e08f4c4 Compare March 28, 2024 17:48
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Mar 28, 2024
@csaavedra csaavedra removed the merging-blocked Applied to prevent a change from being merged label Apr 2, 2024
@csaavedra csaavedra force-pushed the eng/GTK-Port-SelectionData-to-new-IPC-serialization-format branch from e08f4c4 to 43aeb2a Compare April 2, 2024 15:39
@csaavedra csaavedra marked this pull request as ready for review April 2, 2024 20:13
@csaavedra csaavedra requested a review from a team as a code owner April 2, 2024 20:13
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Apr 2, 2024
@csaavedra csaavedra removed the merging-blocked Applied to prevent a change from being merged label Apr 3, 2024
@csaavedra csaavedra force-pushed the eng/GTK-Port-SelectionData-to-new-IPC-serialization-format branch from 43aeb2a to b7ab23c Compare April 3, 2024 07:06
@csaavedra csaavedra force-pushed the eng/GTK-Port-SelectionData-to-new-IPC-serialization-format branch from b7ab23c to 475930a Compare April 3, 2024 08:41
@csaavedra csaavedra requested a review from carlosgcampos April 3, 2024 08:41
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
void setImage(RefPtr<Image>&& newImage) { m_image = newImage; }
void setImage(RefPtr<Image>&& newImage) { m_image = WTFMove(newImage); }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SelectionData::SelectionData(const String& text, const String& markup, const URL& url, const String& uriList, RefPtr<WebCore::Image> image, RefPtr<WebCore::SharedBuffer>&& buffer, bool canSmartReplace)
SelectionData::SelectionData(const String& text, const String& markup, const URL& url, const String& uriList, RefPtr<WebCore::Image>&& image, RefPtr<WebCore::SharedBuffer>&& buffer, bool canSmartReplace)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
setImage(image.get());
setImage(WTFMove(image));

@csaavedra csaavedra force-pushed the eng/GTK-Port-SelectionData-to-new-IPC-serialization-format branch from 475930a to c590209 Compare April 3, 2024 09:08
@csaavedra csaavedra added the merge-queue Applied to send a pull request to merge-queue label Apr 3, 2024
https://bugs.webkit.org/show_bug.cgi?id=271836

Reviewed by Carlos Garcia Campos.

Remove the ArgumentCoders for SelectionData, adapt the
class a bit to make it work well with the generated serializers,
and add a new ArgumentCodersGtk.serialization.in for the
GTK-specific serializers.

* Source/WebCore/platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::typesSafeForBindings):
(WebCore::Pasteboard::readOrigin):
(WebCore::Pasteboard::readStringInCustomData):
* Source/WebCore/platform/gtk/SelectionData.cpp:
(WebCore::SelectionData::SelectionData):
* Source/WebCore/platform/gtk/SelectionData.h:
(WebCore::SelectionData::setImage):
(WebCore::SelectionData::image const):
(WebCore::SelectionData::customData const):
* Source/WebKit/PlatformGTK.cmake:
* Source/WebKit/Shared/gtk/ArgumentCodersGtk.cpp:
(IPC::encodeImage): Deleted.
(IPC::decodeImage): Deleted.
(IPC::ArgumentCoder<SelectionData>::encode): Deleted.
(IPC::ArgumentCoder<SelectionData>::decode): Deleted.
* Source/WebKit/Shared/gtk/ArgumentCodersGtk.h:
* Source/WebKit/Shared/gtk/ArgumentCodersGtk.serialization.in: Added.
* Source/WebKit/UIProcess/API/gtk/DragSourceGtk3.cpp:
(WebKit::DragSource::DragSource):
* Source/WebKit/UIProcess/gtk/ClipboardGtk3.cpp:
(WebKit::Clipboard::write):

Canonical link: https://commits.webkit.org/276991@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/GTK-Port-SelectionData-to-new-IPC-serialization-format branch from c590209 to 41e8f10 Compare April 3, 2024 11:03
@webkit-commit-queue
Copy link
Collaborator

Committed 276991@main (41e8f10): https://commits.webkit.org/276991@main

Reviewed commits have been landed. Closing PR #26564 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 41e8f10 into WebKit:main Apr 3, 2024
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WebKitGTK Bugs related to the Gtk API layer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments