[Webkit-unassigned] [Bug 238748] New: [GTK4] Need API for asynchronously handling WebKitDownload::suggest-filename

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 4 11:14:41 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=238748

            Bug ID: 238748
           Summary: [GTK4] Need API for asynchronously handling
                    WebKitDownload::suggest-filename
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mcatanzaro at gnome.org
                CC: alexm at gnome.org, bugs-noreply at webkitgtk.org
            Blocks: 210100

Currently WebKitDownload::suggest-filename is emitted when WebKit wants to know the location at which to download a file. The application is expected to display a file chooser using gtk_dialog_run(), then return the result to WebKit using webkit_download_set_destination().

In GTK 4, gtk_dialog_run() no longer exists. The only way to accomplish this is to handle it manually, e.g. using your own GMainLoop to iterate the default main context.

Either way, it's not very safe. We should find a way to improve this for the GTK 4 API. One possibility would be to add a webkit_download_start_download() function to allow the application to asynchronously handle things and then indicate to WebKit that it is ready. That might not be needed, though: alternatively, we could make it mandatory to call webkit_download_set_destination(), and just not start downloading until that has been called.


Referenced Bugs:

https://bugs.webkit.org/show_bug.cgi?id=210100
[Bug 210100] [META][GTK][GTK4] Support GTK4
-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220404/86f3c709/attachment.htm>


More information about the webkit-unassigned mailing list