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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user