mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1264869 - Request STORAGE permission before downloading images. r=liuche, a=lizzard
MozReview-Commit-ID: KJGugrRw5iI
This commit is contained in:
parent
08b33646fe
commit
fcdaa31bf9
@ -937,9 +937,15 @@ var BrowserApp = {
|
||||
UITelemetry.addEvent("action.1", "contextmenu", null, "web_save_image");
|
||||
UITelemetry.addEvent("save.1", "contextmenu", null, "image");
|
||||
|
||||
ContentAreaUtils.saveImageURL(aTarget.currentURI.spec, null, "SaveImageTitle",
|
||||
false, true, aTarget.ownerDocument.documentURIObject,
|
||||
aTarget.ownerDocument);
|
||||
RuntimePermissions.waitForPermissions(RuntimePermissions.WRITE_EXTERNAL_STORAGE).then(function(permissionGranted) {
|
||||
if (!permissionGranted) {
|
||||
return;
|
||||
}
|
||||
|
||||
ContentAreaUtils.saveImageURL(aTarget.currentURI.spec, null, "SaveImageTitle",
|
||||
false, true, aTarget.ownerDocument.documentURIObject,
|
||||
aTarget.ownerDocument);
|
||||
});
|
||||
});
|
||||
|
||||
NativeWindow.contextmenus.add(stringGetter("contextmenu.setImageAs"),
|
||||
|
Loading…
Reference in New Issue
Block a user