packages/webkitgtk: don't patch

This commit is contained in:
Max Headroom 2022-10-30 22:56:10 +01:00
parent 9cf71a2e60
commit 2e1cde2b95
3 changed files with 0 additions and 55 deletions

View file

@ -11,7 +11,6 @@
ipfs
nerdfonts-terminus
terminus_font_fancy
webkitgtk
libfprint
fprintd
;

View file

@ -38,8 +38,4 @@ super: rec {
vte-high-refresh-rate = patch' super.vte;
tilix-high-refresh-rate = super.tilix.override { gtkd = super.gtkd.override { vte = vte-high-refresh-rate; }; };
webkitgtk = patch' super.webkitgtk;
webkitgtk_4_1 = patch' super.webkitgtk_4_1;
}

View file

@ -1,50 +0,0 @@
diff --git b/Source/WebCore/platform/gtk/PasteboardGtk.cpp a/Source/WebCore/platform/gtk/PasteboardGtk.cpp
index fbe7198..6693af0 100644
--- b/Source/WebCore/platform/gtk/PasteboardGtk.cpp
+++ a/Source/WebCore/platform/gtk/PasteboardGtk.cpp
@@ -315,15 +315,43 @@ void Pasteboard::read(PasteboardWebContentReader& reader, WebContentReadingPolic
void Pasteboard::read(PasteboardFileReader& reader, Optional<size_t>)
{
+ WTFLogAlways("xxoo Pasteboard::read PasteboardFileReader");
if (m_selectionData) {
- for (const auto& filePath : m_selectionData->filenames())
+ WTFLogAlways("xxoo Pasteboard::read m_selectionData");
+ for (const auto& filePath : m_selectionData->filenames()) {
+ WTFLogAlways("xxoo Pasteboard::read m_selectionData reader.readFilename filePath=%s", filePath.utf8().data());
reader.readFilename(filePath);
+ }
return;
}
+
+ WTFLogAlways("xxoo Pasteboard::read readFilePathsFromClipboard pasteboardName=%s", m_name.utf8().data());
auto filePaths = platformStrategies()->pasteboardStrategy()->readFilePathsFromClipboard(m_name);
- for (const auto& filePath : filePaths)
+ for (const auto& filePath : filePaths) {
+ WTFLogAlways("xxoo Pasteboard::read readFilePathsFromClipboard reader.readFilename filePath=%s", filePath.utf8().data());
reader.readFilename(filePath);
+ }
+
+ if (filePaths.isEmpty()) {
+ WTFLogAlways("xxoo Pasteboard::read readFilePathsFromClipboard got no filePaths, try readBufferFromClipboard pasteboardName=%s", m_name.utf8().data());
+
+ auto types = platformStrategies()->pasteboardStrategy()->types(m_name);
+ static const ASCIILiteral imageTypes[] = { "image/png"_s, "image/jpeg"_s, "image/gif"_s, "image/bmp"_s, "image/vnd.microsoft.icon"_s, "image/x-icon"_s };
+ for (const auto& imageType : imageTypes) {
+ if (types.contains(imageType)) {
+ WTFLogAlways("xxoo Pasteboard::read readBufferFromClipboard types contains imageType");
+ auto buffer = platformStrategies()->pasteboardStrategy()->readBufferFromClipboard(m_name, imageType);
+ // readBuffer(const String&, const String& type, Ref<SharedBuffer>&&)
+ // readImage(Ref<SharedBuffer>&&, const String&, PresentationSize = { })
+ if (!buffer->isEmpty()) {
+ reader.readBuffer(imageType, imageType, buffer.releaseNonNull());
+ WTFLogAlways("xxoo Pasteboard::read reader.readBuffer success");
+ return;
+ }
+ }
+ }
+ }
}
bool Pasteboard::hasData()