Backed out changeset a06cc26fbb60 (bug 1665252) for WPT failures in feature-policy/payment-allowed-by-feature-policy-attribute.https.sub.html. CLOSED TREE

This commit is contained in:
Dorel Luca
2020-09-24 15:06:19 +03:00
parent f6e46379cc
commit 14793e80a6
12 changed files with 79 additions and 14 deletions

View File

@@ -171,7 +171,8 @@ nsresult HTMLIFrameElement::AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
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) {
} else if (aName == nsGkAtoms::allowfullscreen ||
aName == nsGkAtoms::allowpaymentrequest) {
RefreshFeaturePolicy(false /* parse the feature policy attribute */);
}
}
@@ -295,6 +296,10 @@ void HTMLIFrameElement::RefreshFeaturePolicy(bool aParseAllowAttribute) {
}
}
if (AllowPaymentRequest()) {
mFeaturePolicy->MaybeSetAllowedPolicy(u"payment"_ns);
}
if (AllowFullscreen()) {
mFeaturePolicy->MaybeSetAllowedPolicy(u"fullscreen"_ns);
}