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

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

Issue 2597193003: Enable iframe support for web payments by default. (Closed)
Patch Set: allowpaymentrequest attribute available only if PR is enabled 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 05ee7d6a3b5b6d42d30f3aaa14c41b10ba5535ba..5878b4d0cdacf38af24653eb84b00c7688648d9a 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -493,10 +493,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.
- if (RuntimeEnabledFeatures::paymentRequestIFrameEnabled() && frame->owner() &&
- frame->owner()->allowPaymentRequest()) {
+ if (frame->owner() && frame->owner()->allowPaymentRequest())
return allowedToUsePaymentRequest(frame->tree().parent());
- }
// 4. Return false.
return false;
@@ -694,10 +692,8 @@ PaymentRequest::PaymentRequest(Document& document,
if (!allowedToUsePaymentRequest(document.frame())) {
exceptionState.throwSecurityError(
- RuntimeEnabledFeatures::paymentRequestIFrameEnabled()
- ? "Must be in a top-level browsing context or an iframe needs to "
- "specify 'allowpaymentrequest' explicitly"
- : "Must be in a top-level browsing context");
+ "Must be in a top-level browsing context or an iframe needs to specify "
+ "'allowpaymentrequest' explicitly");
return;
}

Powered by Google App Engine
This is Rietveld 408576698