[webkit-changes] [WebKit/WebKit] 6fea66: [GTK][WPE] WebKitDownload destination should be a ...
Carlos Garcia Campos
noreply at github.com
Wed Mar 1 06:22:57 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6fea66849a84ce320661a103dae1c90bcbff5827
https://github.com/WebKit/WebKit/commit/6fea66849a84ce320661a103dae1c90bcbff5827
Author: Carlos Garcia Campos <cgarcia at igalia.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M Source/WebKit/UIProcess/API/glib/WebKitDownload.cpp
M Source/WebKit/UIProcess/API/glib/WebKitDownload.h.in
M Source/WebKit/gtk/migrating-to-webkitgtk-6.0.md
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp
Log Message:
-----------
[GTK][WPE] WebKitDownload destination should be a path instead of a URI
https://bugs.webkit.org/show_bug.cgi?id=253146
Reviewed by Michael Catanzaro and Adrian Perez de Castro.
Destination is handled as a path internally, so using URIs in the API
means we have to convert to/from URI all the time. We can't change this
in the current API, but for simplicity we can allow passing a path,
while still support URIs for backwards compatibility.
WebKiDownload::created-destination always returns a URI in the old API
for compatibilty, but webkit_download_get_destination() only returns a
URI when a URI was set with webkit_download_set_destination(). The new
API only allows to pass a path, and a path is also passed to
WebKiDownload::created-destination signal.
This patch is based on previous patch by Michael Catanzaro.
* Source/WebKit/UIProcess/API/glib/WebKitDownload.cpp:
(webkitDownloadDecideDestination):
(webkit_download_class_init):
(webkitDownloadDecideDestinationWithSuggestedFilename):
(webkitDownloadDestinationCreated):
(webkit_download_get_destination):
(webkit_download_set_destination):
* Source/WebKit/UIProcess/API/glib/WebKitDownload.h.in:
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp:
(testDownloadRemoteFileError):
(testWebViewDownloadURI):
(testPolicyResponseDownload):
(testDownloadEphemeralContext):
(testDownloadDestinationURI):
(testContextMenuDownloadActions):
(testBlobDownload):
(beforeAll):
Canonical link: https://commits.webkit.org/261002@main
More information about the webkit-changes
mailing list