summaryrefslogtreecommitdiffstats
path: root/dom/base
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-06-17 09:35:48 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-06-17 09:35:48 +0200
commit07ee0792c9664d649fae8ae530b27462ee45f530 (patch)
tree47536f5fe5f03b41e1868df5e360dfabfef28751 /dom/base
parent1f6068bc695b8bee56f0a99e4343ff138b1ee188 (diff)
downloadUXP-07ee0792c9664d649fae8ae530b27462ee45f530.tar
UXP-07ee0792c9664d649fae8ae530b27462ee45f530.tar.gz
UXP-07ee0792c9664d649fae8ae530b27462ee45f530.tar.lz
UXP-07ee0792c9664d649fae8ae530b27462ee45f530.tar.xz
UXP-07ee0792c9664d649fae8ae530b27462ee45f530.zip
Bug 1398229 - Save-link-as feature should use the loading principal - implementation of nsIContentPolicy.TYPE_SAVE_AS_DOWNLOAD
Diffstat (limited to 'dom/base')
-rw-r--r--dom/base/nsContentPolicyUtils.h3
-rw-r--r--dom/base/nsIContentPolicyBase.idl5
2 files changed, 7 insertions, 1 deletions
diff --git a/dom/base/nsContentPolicyUtils.h b/dom/base/nsContentPolicyUtils.h
index ed0544226..f530f9be9 100644
--- a/dom/base/nsContentPolicyUtils.h
+++ b/dom/base/nsContentPolicyUtils.h
@@ -115,6 +115,7 @@ NS_CP_ContentTypeName(uint32_t contentType)
CASE_RETURN( TYPE_FETCH );
CASE_RETURN( TYPE_IMAGESET );
CASE_RETURN( TYPE_WEB_MANIFEST );
+ CASE_RETURN( TYPE_SAVEAS_DOWNLOAD );
CASE_RETURN( TYPE_INTERNAL_SCRIPT );
CASE_RETURN( TYPE_INTERNAL_WORKER );
CASE_RETURN( TYPE_INTERNAL_SHARED_WORKER );
@@ -236,7 +237,7 @@ NS_CheckContentLoadPolicy(uint32_t contentType,
CHECK_PRINCIPAL_AND_DATA(ShouldLoad);
if (policyService) {
CHECK_CONTENT_POLICY_WITH_SERVICE(ShouldLoad, policyService);
- }
+y
CHECK_CONTENT_POLICY(ShouldLoad);
}
diff --git a/dom/base/nsIContentPolicyBase.idl b/dom/base/nsIContentPolicyBase.idl
index 884e3d96d..0520ebacc 100644
--- a/dom/base/nsIContentPolicyBase.idl
+++ b/dom/base/nsIContentPolicyBase.idl
@@ -182,6 +182,11 @@ interface nsIContentPolicyBase : nsISupports
const nsContentPolicyType TYPE_WEB_MANIFEST = 22;
/**
+ * Indicates an save-as link download from the front-end code.
+ */
+ const nsContentPolicyType TYPE_SAVEAS_DOWNLOAD = 43;
+
+ /**
* Indicates an internal constant for scripts loaded through script
* elements.
*