2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2011-10-11 09:50:08 +04:00
|
|
|
|
2013-02-23 04:59:26 +04:00
|
|
|
#include "mozilla/dom/HTMLIFrameElement.h"
|
2013-02-27 19:38:32 +04:00
|
|
|
#include "mozilla/dom/HTMLIFrameElementBinding.h"
|
2018-10-01 09:09:44 +03:00
|
|
|
#include "mozilla/dom/FeaturePolicy.h"
|
2018-06-22 19:48:42 +03:00
|
|
|
#include "mozilla/MappedDeclarations.h"
|
2018-10-12 10:36:33 +03:00
|
|
|
#include "mozilla/NullPrincipal.h"
|
2018-10-01 09:09:44 +03:00
|
|
|
#include "mozilla/StaticPrefs.h"
|
2004-01-26 22:22:05 +03:00
|
|
|
#include "nsMappedAttributes.h"
|
2012-09-30 20:40:24 +04:00
|
|
|
#include "nsAttrValueInlines.h"
|
2012-07-27 18:03:27 +04:00
|
|
|
#include "nsError.h"
|
2007-04-28 20:01:24 +04:00
|
|
|
#include "nsStyleConsts.h"
|
2013-01-23 23:39:03 +04:00
|
|
|
#include "nsContentUtils.h"
|
2016-05-18 02:08:12 +03:00
|
|
|
#include "nsSandboxFlags.h"
|
2018-10-01 09:09:44 +03:00
|
|
|
#include "nsNetUtil.h"
|
2004-04-13 02:47:24 +04:00
|
|
|
|
2010-08-17 18:13:55 +04:00
|
|
|
NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(IFrame)
|
2000-12-23 13:56:31 +03:00
|
|
|
|
2013-02-23 04:59:26 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2018-10-12 10:36:33 +03:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLIFrameElement)
|
|
|
|
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLIFrameElement,
|
|
|
|
nsGenericHTMLFrameElement)
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mFeaturePolicy)
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
|
|
|
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLIFrameElement,
|
|
|
|
nsGenericHTMLFrameElement)
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK(mFeaturePolicy)
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
|
|
|
|
|
|
|
NS_IMPL_ADDREF_INHERITED(HTMLIFrameElement, nsGenericHTMLFrameElement)
|
|
|
|
NS_IMPL_RELEASE_INHERITED(HTMLIFrameElement, nsGenericHTMLFrameElement)
|
|
|
|
|
|
|
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(HTMLIFrameElement)
|
|
|
|
NS_INTERFACE_MAP_END_INHERITING(nsGenericHTMLFrameElement)
|
|
|
|
|
2016-05-05 06:41:24 +03:00
|
|
|
// static
|
|
|
|
const DOMTokenListSupportedToken HTMLIFrameElement::sSupportedSandboxTokens[] =
|
|
|
|
{
|
|
|
|
#define SANDBOX_KEYWORD(string, atom, flags) string,
|
|
|
|
#include "IframeSandboxKeywordList.h"
|
|
|
|
#undef SANDBOX_KEYWORD
|
|
|
|
nullptr};
|
|
|
|
|
2018-09-21 23:45:49 +03:00
|
|
|
HTMLIFrameElement::HTMLIFrameElement(
|
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
2013-02-23 04:59:26 +04:00
|
|
|
FromParser aFromParser)
|
2018-09-21 23:45:49 +03:00
|
|
|
: nsGenericHTMLFrameElement(std::move(aNodeInfo), aFromParser) {
|
2018-10-12 10:36:33 +03:00
|
|
|
// We always need a featurePolicy, even if not exposed.
|
|
|
|
mFeaturePolicy = new FeaturePolicy(this);
|
1998-09-03 05:03:33 +04:00
|
|
|
}
|
|
|
|
|
2013-02-23 04:59:26 +04:00
|
|
|
HTMLIFrameElement::~HTMLIFrameElement() {}
|
1998-09-03 05:03:33 +04:00
|
|
|
|
2013-02-23 04:59:26 +04:00
|
|
|
NS_IMPL_ELEMENT_CLONE(HTMLIFrameElement)
|
|
|
|
|
2018-10-01 09:09:44 +03:00
|
|
|
nsresult HTMLIFrameElement::BindToTree(nsIDocument* aDocument,
|
|
|
|
nsIContent* aParent,
|
|
|
|
nsIContent* aBindingParent) {
|
|
|
|
nsresult rv =
|
|
|
|
nsGenericHTMLFrameElement::BindToTree(aDocument, aParent, aBindingParent);
|
|
|
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (StaticPrefs::dom_security_featurePolicy_enabled()) {
|
2018-10-20 07:08:46 +03:00
|
|
|
RefreshFeaturePolicy(true /* parse the feature policy attribute */);
|
2018-10-01 09:09:44 +03:00
|
|
|
}
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2013-02-23 04:59:26 +04:00
|
|
|
bool HTMLIFrameElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
|
|
|
const nsAString& aValue,
|
2017-11-02 06:35:52 +03:00
|
|
|
nsIPrincipal* aMaybeScriptedPrincipal,
|
2013-02-23 04:59:26 +04:00
|
|
|
nsAttrValue& aResult) {
|
2005-11-29 19:37:15 +03:00
|
|
|
if (aNamespaceID == kNameSpaceID_None) {
|
2006-12-26 20:47:52 +03:00
|
|
|
if (aAttribute == nsGkAtoms::marginwidth) {
|
2011-02-04 22:46:16 +03:00
|
|
|
return aResult.ParseSpecialIntValue(aValue);
|
2005-11-29 19:37:15 +03:00
|
|
|
}
|
2006-12-26 20:47:52 +03:00
|
|
|
if (aAttribute == nsGkAtoms::marginheight) {
|
2011-02-04 22:46:16 +03:00
|
|
|
return aResult.ParseSpecialIntValue(aValue);
|
2005-11-29 19:37:15 +03:00
|
|
|
}
|
2006-12-26 20:47:52 +03:00
|
|
|
if (aAttribute == nsGkAtoms::width) {
|
2011-02-04 22:46:16 +03:00
|
|
|
return aResult.ParseSpecialIntValue(aValue);
|
2005-11-29 19:37:15 +03:00
|
|
|
}
|
2006-12-26 20:47:52 +03:00
|
|
|
if (aAttribute == nsGkAtoms::height) {
|
2011-02-04 22:46:16 +03:00
|
|
|
return aResult.ParseSpecialIntValue(aValue);
|
2005-11-29 19:37:15 +03:00
|
|
|
}
|
2006-12-26 20:47:52 +03:00
|
|
|
if (aAttribute == nsGkAtoms::frameborder) {
|
2005-11-29 19:37:15 +03:00
|
|
|
return ParseFrameborderValue(aValue, aResult);
|
|
|
|
}
|
2006-12-26 20:47:52 +03:00
|
|
|
if (aAttribute == nsGkAtoms::scrolling) {
|
2005-11-29 19:37:15 +03:00
|
|
|
return ParseScrollingValue(aValue, aResult);
|
|
|
|
}
|
2006-12-26 20:47:52 +03:00
|
|
|
if (aAttribute == nsGkAtoms::align) {
|
2005-11-29 19:37:15 +03:00
|
|
|
return ParseAlignValue(aValue, aResult);
|
|
|
|
}
|
2013-12-19 01:42:24 +04:00
|
|
|
if (aAttribute == nsGkAtoms::sandbox) {
|
|
|
|
aResult.ParseAtomArray(aValue);
|
|
|
|
return true;
|
|
|
|
}
|
1998-09-10 03:30:30 +04:00
|
|
|
}
|
2000-12-23 13:56:31 +03:00
|
|
|
|
2005-11-29 19:37:15 +03:00
|
|
|
return nsGenericHTMLFrameElement::ParseAttribute(
|
2017-11-02 06:35:52 +03:00
|
|
|
aNamespaceID, aAttribute, aValue, aMaybeScriptedPrincipal, aResult);
|
1998-09-03 05:03:33 +04:00
|
|
|
}
|
|
|
|
|
2013-11-19 23:21:29 +04:00
|
|
|
void HTMLIFrameElement::MapAttributesIntoRule(
|
|
|
|
const nsMappedAttributes* aAttributes, MappedDeclarations& aDecls) {
|
2018-03-29 04:39:07 +03:00
|
|
|
// frameborder: 0 | 1 (| NO | YES in quirks mode)
|
|
|
|
// If frameborder is 0 or No, set border to 0
|
|
|
|
// else leave it as the value set in html.css
|
|
|
|
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::frameborder);
|
|
|
|
if (value && value->Type() == nsAttrValue::eEnum) {
|
|
|
|
int32_t frameborder = value->GetEnumValue();
|
|
|
|
if (NS_STYLE_FRAME_0 == frameborder || NS_STYLE_FRAME_NO == frameborder ||
|
|
|
|
NS_STYLE_FRAME_OFF == frameborder) {
|
2018-06-22 19:48:42 +03:00
|
|
|
aDecls.SetPixelValueIfUnset(eCSSProperty_border_top_width, 0.0f);
|
|
|
|
aDecls.SetPixelValueIfUnset(eCSSProperty_border_right_width, 0.0f);
|
|
|
|
aDecls.SetPixelValueIfUnset(eCSSProperty_border_bottom_width, 0.0f);
|
|
|
|
aDecls.SetPixelValueIfUnset(eCSSProperty_border_left_width, 0.0f);
|
2000-05-17 01:56:02 +04:00
|
|
|
}
|
1998-09-10 03:30:30 +04:00
|
|
|
}
|
2000-12-23 13:56:31 +03:00
|
|
|
|
2018-06-22 19:48:42 +03:00
|
|
|
nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aDecls);
|
|
|
|
nsGenericHTMLElement::MapImageAlignAttributeInto(aAttributes, aDecls);
|
|
|
|
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
|
1998-09-05 08:00:06 +04:00
|
|
|
}
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
NS_IMETHODIMP_(bool)
|
2017-10-03 01:05:19 +03:00
|
|
|
HTMLIFrameElement::IsAttributeMapped(const nsAtom* aAttribute) const {
|
2004-02-26 00:04:50 +03:00
|
|
|
static const MappedAttributeEntry attributes[] = {
|
2018-04-03 06:21:06 +03:00
|
|
|
{nsGkAtoms::width},
|
|
|
|
{nsGkAtoms::height},
|
|
|
|
{nsGkAtoms::frameborder},
|
2012-07-30 18:20:58 +04:00
|
|
|
{nullptr},
|
2003-04-17 00:54:20 +04:00
|
|
|
};
|
|
|
|
|
2004-02-26 00:04:50 +03:00
|
|
|
static const MappedAttributeEntry* const map[] = {
|
2003-04-17 00:54:20 +04:00
|
|
|
attributes,
|
2003-07-12 01:16:12 +04:00
|
|
|
sImageAlignAttributeMap,
|
2003-04-17 00:54:20 +04:00
|
|
|
sCommonAttributeMap,
|
|
|
|
};
|
2017-07-06 15:00:35 +03:00
|
|
|
|
2011-12-18 14:09:27 +04:00
|
|
|
return FindAttributeDependence(aAttribute, map);
|
1999-07-07 05:24:40 +04:00
|
|
|
}
|
|
|
|
|
2013-02-23 04:59:26 +04:00
|
|
|
nsMapRuleToAttributesFunc HTMLIFrameElement::GetAttributeMappingFunction()
|
|
|
|
const {
|
2005-01-12 22:45:38 +03:00
|
|
|
return &MapAttributesIntoRule;
|
1998-09-03 05:03:33 +04:00
|
|
|
}
|
|
|
|
|
2017-10-03 01:05:19 +03:00
|
|
|
nsresult HTMLIFrameElement::AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
|
2013-02-23 04:59:26 +04:00
|
|
|
const nsAttrValue* aValue,
|
2017-10-10 00:33:38 +03:00
|
|
|
const nsAttrValue* aOldValue,
|
|
|
|
nsIPrincipal* aMaybeScriptedPrincipal,
|
|
|
|
bool aNotify) {
|
2017-06-07 20:28:20 +03:00
|
|
|
AfterMaybeChangeAttr(aNameSpaceID, aName, aNotify);
|
|
|
|
|
|
|
|
if (aNameSpaceID == kNameSpaceID_None) {
|
|
|
|
if (aName == nsGkAtoms::sandbox) {
|
|
|
|
if (mFrameLoader) {
|
|
|
|
// If we have an nsFrameLoader, apply the new sandbox flags.
|
|
|
|
// Since this is called after the setter, the sandbox flags have
|
|
|
|
// alreay been updated.
|
|
|
|
mFrameLoader->ApplySandboxFlags(GetSandboxFlags());
|
|
|
|
}
|
|
|
|
}
|
2018-10-20 07:08:46 +03:00
|
|
|
|
|
|
|
if (StaticPrefs::dom_security_featurePolicy_enabled()) {
|
|
|
|
if (aName == nsGkAtoms::allow || aName == nsGkAtoms::src ||
|
|
|
|
aName == nsGkAtoms::srcdoc || aName == nsGkAtoms::sandbox) {
|
|
|
|
RefreshFeaturePolicy(true /* parse the feature policy attribute */);
|
|
|
|
} else if (aName == nsGkAtoms::allowfullscreen ||
|
|
|
|
aName == nsGkAtoms::allowpaymentrequest) {
|
|
|
|
RefreshFeaturePolicy(false /* parse the feature policy attribute */);
|
|
|
|
}
|
2018-10-01 09:09:44 +03:00
|
|
|
}
|
2012-08-20 22:34:32 +04:00
|
|
|
}
|
2017-10-10 00:33:38 +03:00
|
|
|
return nsGenericHTMLFrameElement::AfterSetAttr(
|
|
|
|
aNameSpaceID, aName, aValue, aOldValue, aMaybeScriptedPrincipal, aNotify);
|
2013-01-23 23:39:03 +04:00
|
|
|
}
|
|
|
|
|
2017-10-03 01:05:19 +03:00
|
|
|
nsresult HTMLIFrameElement::OnAttrSetButNotChanged(
|
2017-06-07 20:28:20 +03:00
|
|
|
int32_t aNamespaceID, nsAtom* aName, const nsAttrValueOrString& aValue,
|
|
|
|
bool aNotify) {
|
|
|
|
AfterMaybeChangeAttr(aNamespaceID, aName, aNotify);
|
|
|
|
|
|
|
|
return nsGenericHTMLFrameElement::OnAttrSetButNotChanged(aNamespaceID, aName,
|
|
|
|
aValue, aNotify);
|
|
|
|
}
|
2013-06-29 07:13:23 +04:00
|
|
|
|
2017-06-07 20:28:20 +03:00
|
|
|
void HTMLIFrameElement::AfterMaybeChangeAttr(int32_t aNamespaceID,
|
2017-10-03 01:05:19 +03:00
|
|
|
nsAtom* aName, bool aNotify) {
|
2017-06-07 20:28:20 +03:00
|
|
|
if (aNamespaceID == kNameSpaceID_None) {
|
|
|
|
if (aName == nsGkAtoms::srcdoc) {
|
|
|
|
// Don't propagate errors from LoadSrc. The attribute was successfully
|
|
|
|
// set/unset, that's what we should reflect.
|
|
|
|
LoadSrc();
|
|
|
|
}
|
|
|
|
}
|
2013-06-29 07:13:23 +04:00
|
|
|
}
|
|
|
|
|
2018-10-01 09:09:44 +03:00
|
|
|
uint32_t HTMLIFrameElement::GetSandboxFlags() const {
|
2013-12-20 01:35:25 +04:00
|
|
|
const nsAttrValue* sandboxAttr = GetParsedAttr(nsGkAtoms::sandbox);
|
2016-05-18 02:08:12 +03:00
|
|
|
// No sandbox attribute, no sandbox flags.
|
|
|
|
if (!sandboxAttr) {
|
2016-06-29 17:48:44 +03:00
|
|
|
return SANDBOXED_NONE;
|
2016-05-18 02:08:12 +03:00
|
|
|
}
|
2016-07-05 02:46:55 +03:00
|
|
|
return nsContentUtils::ParseSandboxAttributeToFlags(sandboxAttr);
|
2012-08-20 22:34:32 +04:00
|
|
|
}
|
2013-02-23 04:59:26 +04:00
|
|
|
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 17:13:33 +03:00
|
|
|
JSObject* HTMLIFrameElement::WrapNode(JSContext* aCx,
|
|
|
|
JS::Handle<JSObject*> aGivenProto) {
|
2018-06-26 00:20:54 +03:00
|
|
|
return HTMLIFrameElement_Binding::Wrap(aCx, this, aGivenProto);
|
2013-02-27 19:38:32 +04:00
|
|
|
}
|
|
|
|
|
2018-10-01 09:09:44 +03:00
|
|
|
FeaturePolicy* HTMLIFrameElement::Policy() const { return mFeaturePolicy; }
|
|
|
|
|
2018-10-12 10:49:51 +03:00
|
|
|
already_AddRefed<nsIPrincipal>
|
|
|
|
HTMLIFrameElement::GetFeaturePolicyDefaultOrigin() const {
|
2018-10-12 10:36:33 +03:00
|
|
|
nsCOMPtr<nsIPrincipal> principal;
|
2018-10-01 09:09:44 +03:00
|
|
|
|
2018-10-12 10:36:33 +03:00
|
|
|
if (HasAttr(kNameSpaceID_None, nsGkAtoms::srcdoc)) {
|
|
|
|
principal = NodePrincipal();
|
2018-10-12 10:49:51 +03:00
|
|
|
return principal.forget();
|
2018-10-01 09:09:44 +03:00
|
|
|
}
|
|
|
|
|
2018-10-12 10:49:51 +03:00
|
|
|
nsCOMPtr<nsIURI> nodeURI;
|
|
|
|
if (GetURIAttr(nsGkAtoms::src, nullptr, getter_AddRefs(nodeURI)) && nodeURI) {
|
|
|
|
principal = BasePrincipal::CreateCodebasePrincipal(
|
|
|
|
nodeURI, BasePrincipal::Cast(NodePrincipal())->OriginAttributesRef());
|
2018-10-01 09:09:44 +03:00
|
|
|
}
|
|
|
|
|
2018-10-12 10:36:33 +03:00
|
|
|
if (!principal) {
|
|
|
|
principal = NodePrincipal();
|
2018-10-01 09:09:44 +03:00
|
|
|
}
|
|
|
|
|
2018-10-12 10:49:51 +03:00
|
|
|
return principal.forget();
|
2018-10-01 09:09:44 +03:00
|
|
|
}
|
|
|
|
|
2018-10-20 07:08:46 +03:00
|
|
|
void HTMLIFrameElement::RefreshFeaturePolicy(bool aParseAllowAttribute) {
|
2018-10-01 09:09:44 +03:00
|
|
|
MOZ_ASSERT(StaticPrefs::dom_security_featurePolicy_enabled());
|
|
|
|
|
2018-10-20 07:08:46 +03:00
|
|
|
if (aParseAllowAttribute) {
|
|
|
|
mFeaturePolicy->ResetDeclaredPolicy();
|
2018-10-01 09:09:44 +03:00
|
|
|
|
2018-10-20 07:08:46 +03:00
|
|
|
// The origin can change if 'src' and 'srcdoc' attributes change.
|
|
|
|
nsCOMPtr<nsIPrincipal> origin = GetFeaturePolicyDefaultOrigin();
|
|
|
|
MOZ_ASSERT(origin);
|
|
|
|
mFeaturePolicy->SetDefaultOrigin(origin);
|
2018-10-01 09:09:44 +03:00
|
|
|
|
2018-10-20 07:08:46 +03:00
|
|
|
nsAutoString allow;
|
|
|
|
GetAttr(nsGkAtoms::allow, allow);
|
2018-10-01 09:09:44 +03:00
|
|
|
|
2018-10-20 07:08:46 +03:00
|
|
|
if (!allow.IsEmpty()) {
|
|
|
|
// Set or reset the FeaturePolicy directives.
|
|
|
|
mFeaturePolicy->SetDeclaredPolicy(OwnerDoc(), allow, NodePrincipal(),
|
|
|
|
origin);
|
|
|
|
}
|
|
|
|
|
|
|
|
mFeaturePolicy->InheritPolicy(OwnerDoc()->Policy());
|
|
|
|
}
|
2018-10-01 09:09:44 +03:00
|
|
|
|
2018-10-01 12:59:57 +03:00
|
|
|
if (AllowPaymentRequest()) {
|
|
|
|
mFeaturePolicy->MaybeSetAllowedPolicy(NS_LITERAL_STRING("payment"));
|
|
|
|
}
|
|
|
|
|
2018-10-04 15:34:37 +03:00
|
|
|
if (AllowFullscreen()) {
|
|
|
|
mFeaturePolicy->MaybeSetAllowedPolicy(NS_LITERAL_STRING("fullscreen"));
|
|
|
|
}
|
2018-10-01 09:09:44 +03:00
|
|
|
}
|
|
|
|
|
2013-02-23 04:59:26 +04:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|