Branch: refs/heads/webkitglib/2.44
  Home:   https://github.com/WebKit/WebKit
  Commit: 191afe5db3efcf8b51c4883b6fe7533c5d8b68a5
      
https://github.com/WebKit/WebKit/commit/191afe5db3efcf8b51c4883b6fe7533c5d8b68a5
  Author: Georges Basile Stavracas Neto <feane...@igalia.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M Source/WebKit/UIProcess/API/gtk/DropTarget.h
    M Source/WebKit/UIProcess/API/gtk/DropTargetGtk4.cpp

  Log Message:
  -----------
  Cherry-pick 275908@main (ff20e457cb9c). 
https://bugs.webkit.org/show_bug.cgi?id=212079

    [GTK] Receive dropped files using the File Transfer portal
    https://bugs.webkit.org/show_bug.cgi?id=212079

    Reviewed by Carlos Garcia Campos.

    GTK4 has content serializers and deserializers that are able to read
    from, and write to, the File Transfer portal. They're used when using
    the high level content formats API, i.e. using GTypes. In particular,
    GTK4 is able to convert from "application/vnd.portal.filetransfer" (and
    the legacy "application/vnd.portal.files") from and into GdkFileLists.

    The DropTargetGtk4 code did not advertise the GdkFileList GType as a
    potential data offering, so GTK4 was never able to let the File Transfer
    portal conversion happen.

    Add the GdkFileList GType to the content formats.

    This creates a small conflict: many apps, e.g. Nautilus, advertise files
    both as "application/vnd.portal.filetransfer", and as "text/uri-list".
    The file URIs under "text/uri-list" are meaningless to sandboxed apps,
    as they might be in innaccessible locations. Which is why I've made the
    executive decision to ignore "file://" URIs when the File Transfer portal
    is used. Other types of URIs are preserved.

    (Other browsers take a more radical approach of ignoring all URIs on the
    presence of the File Transfer portal vendor.)

    * Source/WebKit/UIProcess/API/gtk/DropTarget.h:
    * Source/WebKit/UIProcess/API/gtk/DropTargetGtk4.cpp:
    (WebKit::DropTarget::DropTarget):
    (WebKit::DropTarget::accept):
    (WebKit::DropReadAsyncData::DropReadAsyncData):
    (WebKit::DropTarget::loadData):
    (WebKit::DropTarget::didLoadData):

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

Canonical link: https://commits.webkit.org/274313.152@webkitglib/2.44



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to