| Index: third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
|
| diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
|
| index 3fffe48cfff3743d5bc689904177867ee4c7864d..5d38d205d6631d5bc8197616173e3797c13a33b9 100644
|
| --- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
|
| +++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
|
| @@ -590,37 +590,8 @@ bool allowedToUsePaymentRequest(const Frame* frame) {
|
| return false;
|
| }
|
|
|
| - // If Feature Policy is enabled. then we need this hack to support it, until
|
| - // we have proper support for <iframe allowfullscreen> in FP:
|
| - // TODO(lunalu): clean up the code once FP iframe is supported
|
| - // crbug.com/682280
|
| -
|
| - // 1. If FP, by itself, enables paymentrequest in this document, then
|
| - // paymentrequest is allowed.
|
| - if (frame->isFeatureEnabled(WebFeaturePolicyFeature::Payment)) {
|
| - return true;
|
| - }
|
| -
|
| - // 2. Otherwise, if the embedding frame's document is allowed to use
|
| - // paymentrequest (either through FP or otherwise), and either:
|
| - // a) this is a same-origin embedded document, or
|
| - // b) this document's iframe has the allowpayment attribute set,
|
| - // then paymentrequest is allowed.
|
| - if (!frame->isMainFrame()) {
|
| - if (allowedToUsePaymentRequest(frame->tree().parent())) {
|
| - return (frame->owner() && frame->owner()->allowPaymentRequest()) ||
|
| - frame->tree()
|
| - .parent()
|
| - ->securityContext()
|
| - ->getSecurityOrigin()
|
| - ->isSameSchemeHostPortAndSuborigin(
|
| - frame->securityContext()->getSecurityOrigin());
|
| - }
|
| - }
|
| -
|
| - // Otherwise, paymentrequest is not allowed. (If we reach here and this is
|
| - // the main frame, then paymentrequest must have been disabled by FP.)
|
| - return false;
|
| + // 2. If Feature Policy is enabled, return the policy for "payment" feature.
|
| + return frame->isFeatureEnabled(WebFeaturePolicyFeature::Payment);
|
| }
|
|
|
| } // namespace
|
|
|