Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentRequest.cpp

Issue 2545693002: Support allowpaymentrequest with out-of-process iframes (Closed)
Patch Set: Support allowpaymentrequest with out-of-process iframes Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 0e262109eded96a0be467037d0f77d7f64d48c0d..95a48b3223cf17c088e4c0ed8ad0fcabe7e3d13e 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -482,12 +482,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;
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp ('k') | third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698