зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1264869 - Request STORAGE permission before downloading images. r=liuche
MozReview-Commit-ID: KJGugrRw5iI --HG-- extra : rebase_source : d1314e42071aeabc9fedd6c8f94a61eb9a271345
This commit is contained in:
Родитель
0c76e7b388
Коммит
29eeec29d0
|
@ -877,9 +877,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"),
|
||||
|
|
Загрузка…
Ссылка в новой задаче