New issue
Advanced search Search tips

Issue 682280 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug

Blocked on:
issue 682258


Participants' hotlists:
Payment-Interop

Show other hotlists

Other hotlists containing this issue:
PaymentRequest


Sign in to add a comment

Implement <iframe allowpaymentrequest> in terms of feature policy

Project Member Reported by iclell...@chromium.org, Jan 18 2017

Issue description

The "allowpaymentrequest" iframe attribute should be implemented direcly in terms of Feature Policy, rather than the current implementation, which is an mahup of two different techniques: crawling the frame tree to the root, looking for either a chain of 'allowpaymentrequest' frames or an active policy.

If present on the iframe tag, allowpaymentrequest should translate into a declared policy

{ "paymentrequest": ["*"] }

for the purpose of calculating the inherited policy for the nested frame.

 
Components: Blink>FeaturePolicy Blink>Payments

Comment 3 by lunalu@chromium.org, May 26 2017

Cc: iclell...@chromium.org
We already did this right? 
Owner: lunalu@chromium.org
Status: Fixed (was: Available)
Yes. Thanks for the triage!

https://crrev.com/44b442a4f245e3fbfa17478bf0807cc139ab39ef implemented this.

Comment 5 by rbyers@chromium.org, Jul 18 2017

Owner: loonyb...@chromium.org

Comment 6 by ma...@chromium.org, Oct 16 2017

Cc: lunalu@chromium.org
Hi,

I work on the Payment Request team. I'm trying to see if we can get this WPT test to pass (try in Dev or Canary):

https://w3c-test.org/payment-request/allowpaymentrequest/setting-allowpaymentrequest-timing.https.sub.html

IIUC, it tests that we do snapshotting correctly, and don't support if the "allowpaymentrequest" attribute is added after the iframe is attached.

I don't know the state of feature policy (is it on?). Will it fix this test presumably? Our relevant code is here [1].

Thanks for any help.

[1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp?rcl=9e2ec4dfde8f3c4c3075a1aac6f66455dfb9ef6d&l=809
Cc: -lunalu@chromium.org
Status: Assigned (was: Fixed)
Yea I will take a look.
Hi mathp@, could you please explain what is the test trying to do. I am not quite following the description / test.

Thanks

Comment 9 by ma...@chromium.org, Oct 16 2017

It's testing whether we will fail or succeed in the creation of the PaymentRequest object in an iframe. The test sets the "allowpaymentrequest" attribute on the iframe *after* it is attached to the DOM. IIUC, under the snapshotting concept, we should not honor the attribute if it's been added after the iframe was attached to the DOM. 

Comment 10 by zcorpan@gmail.com, Oct 17 2017

Indeed.

Moreover, it is testing *when* the snapshot happens. If the snapshot happens when the response arrives, the test is intended to fail.

From comment 2:

> * When a document is initialized (https://html.spec.whatwg.org/#creating-a-new-browsing-context and https://html.spec.whatwg.org/#initialise-the-document-object ), https://html.spec.whatwg.org/#set-the-allow*-flags is run, which can set "allowpaymentrequest flag" and "allowusemedia flag" on Document.
Status: Fixed (was: Assigned)
Cc: rouslan@chromium.org
Hi loonybear@, is there a particular change that fixed this issue? Thanks

Sign in to add a comment