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 f67b63bede62e3795377d09323f5ff31669c1382..129b5f1f14694c6fc431eec00454b52b84b126b5 100644 |
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp |
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp |
@@ -523,12 +523,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; |