| 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 b91d35e1884df546c481d4c78320ee738d1ecfef..13ec5ffd3672c0c2e3d0db43bb942134d45277e2 100644
|
| --- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
|
| +++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
|
| @@ -524,12 +524,8 @@ bool allowedToUsePaymentRequest(const Frame* frame) {
|
| // is an iframe element with an |allowpaymentrequest| attribute specified, and
|
| // whose node document is allowed to use the feature indicated by
|
| // |allowpaymentrequest|, then return true.
|
| - HTMLFrameOwnerElement* ownerElement = toHTMLFrameOwnerElement(frame->owner());
|
| - if (ownerElement && isHTMLIFrameElement(ownerElement)) {
|
| - HTMLIFrameElement* iframe = toHTMLIFrameElement(ownerElement);
|
| - if (HTMLIFrameElementPayments::from(*iframe).allowPaymentRequest(*iframe))
|
| - return allowedToUsePaymentRequest(frame->tree().parent());
|
| - }
|
| + if (frame->owner() && frame->owner()->allowPaymentRequest())
|
| + return allowedToUsePaymentRequest(frame->tree().parent());
|
|
|
| // 4. Return false.
|
| return false;
|
|
|