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

Issue 2394473002: iframes with allowpaymentrequest attribute are allowed to make payment requests. (Closed)

Created:
4 years, 2 months ago by pals
Modified:
4 years, 2 months ago
CC:
chromium-reviews, mlamouri+watch-blink_chromium.org, blink-reviews-html_chromium.org, dcheng, dglazkov+blink, blink-reviews, kinuko+watch, blink-reviews-api_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

iframes with allowpaymentrequest attribute are allowed to make payment requests. Specification: https://w3c.github.io/browser-payment-api/ There are some circumstances where a cross-origin iframe wants to make a payment request. A cross-origin iframe needs explicit permission from the embedding page to invoke the payment request API. BUG=652148 Committed: https://crrev.com/310d33fb9aa25f2bcf58b4c64e4e0c1fbcc73bdb Cr-Commit-Position: refs/heads/master@{#426513}

Patch Set 1 #

Total comments: 9

Patch Set 2 : partial interface #

Patch Set 3 : Rebased #

Patch Set 4 : Rebased #

Patch Set 5 : Rebaselined tests #

Total comments: 12

Patch Set 6 : Rebase issues fixed #

Total comments: 7

Patch Set 7 : Removed #

Patch Set 8 : Simplified the implementation #

Patch Set 9 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+212 lines, -5 lines) Patch
A third_party/WebKit/LayoutTests/payments/payment-request-in-iframe-allowed.html View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/payments/payment-request-in-iframe-nested-allowed.html View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/payments/payment-request-in-iframe-nested-not-allowed.html View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/payments/resources/payment-request-in-iframe-nested-expect-failure.html View 1 2 3 4 5 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/payments/resources/payment-request-in-iframe-nested-expect-success.html View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core_idl_files.gni View 1 2 3 4 5 6 7 8 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLAttributeNames.in View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLIFrameElement.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/modules_idl_files.gni View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/BUILD.gn View 1 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/payments/HTMLIFrameElementPayments.h View 1 2 3 4 5 6 7 1 chunk +39 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/payments/HTMLIFrameElementPayments.cpp View 1 2 3 4 5 6 7 1 chunk +58 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/payments/HTMLIFrameElementPayments.idl View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequest.cpp View 1 2 3 4 5 6 7 8 3 chunks +34 lines, -3 lines 0 comments Download

Messages

Total messages: 58 (37 generated)
pals
PTAL.
4 years, 2 months ago (2016-10-10 05:39:17 UTC) #3
please use gerrit instead
+haraken@: I'm not super familiar with IFrame attribute extension. Can you verify we're doing everything ...
4 years, 2 months ago (2016-10-13 00:26:48 UTC) #6
haraken
https://codereview.chromium.org/2394473002/diff/1/third_party/WebKit/Source/core/html/HTMLIFrameElement.idl File third_party/WebKit/Source/core/html/HTMLIFrameElement.idl (right): https://codereview.chromium.org/2394473002/diff/1/third_party/WebKit/Source/core/html/HTMLIFrameElement.idl#newcode30 third_party/WebKit/Source/core/html/HTMLIFrameElement.idl:30: [CEReactions, Reflect] attribute boolean allowPaymentRequest; On 2016/10/13 00:26:48, rouslan ...
4 years, 2 months ago (2016-10-13 02:20:01 UTC) #7
pals
Extended the HTMLIFrameElemnt with partial interface. PTAL. https://codereview.chromium.org/2394473002/diff/1/third_party/WebKit/LayoutTests/payments/payment-request-in-iframe-allowed.html File third_party/WebKit/LayoutTests/payments/payment-request-in-iframe-allowed.html (right): https://codereview.chromium.org/2394473002/diff/1/third_party/WebKit/LayoutTests/payments/payment-request-in-iframe-allowed.html#newcode6 third_party/WebKit/LayoutTests/payments/payment-request-in-iframe-allowed.html:6: <iframe allowpaymentrequest ...
4 years, 2 months ago (2016-10-14 08:11:18 UTC) #8
pals
I shall update the failed tests.
4 years, 2 months ago (2016-10-15 01:56:46 UTC) #21
pals
On 2016/10/15 01:56:46, pals wrote: > I shall update the failed tests. Rebaselined tests. Please ...
4 years, 2 months ago (2016-10-17 11:41:10 UTC) #26
please use gerrit instead
This is some complex stuff! I'm not even sure myself of how to do this ...
4 years, 2 months ago (2016-10-17 13:57:48 UTC) #27
haraken
The Supplement implementation looks good to me.
4 years, 2 months ago (2016-10-17 15:02:12 UTC) #28
pals
I'm sorry. Most of the issues were introduced during rebase from patch set 2 to ...
4 years, 2 months ago (2016-10-18 04:39:21 UTC) #29
please use gerrit instead
https://codereview.chromium.org/2394473002/diff/100001/third_party/WebKit/Source/core/html/HTMLIFrameElement.h File third_party/WebKit/Source/core/html/HTMLIFrameElement.h (right): https://codereview.chromium.org/2394473002/diff/100001/third_party/WebKit/Source/core/html/HTMLIFrameElement.h#newcode82 third_party/WebKit/Source/core/html/HTMLIFrameElement.h:82: bool allowPaymentRequest() const override { return m_allowPaymentRequest; } I ...
4 years, 2 months ago (2016-10-18 14:04:49 UTC) #34
pals
@haraken, could please suggest how we can move the implementaion in HTMLIFrameElementPayments.h|cpp files? https://codereview.chromium.org/2394473002/diff/100001/third_party/WebKit/Source/core/html/HTMLIFrameElement.h File ...
4 years, 2 months ago (2016-10-19 05:09:53 UTC) #35
haraken
https://codereview.chromium.org/2394473002/diff/100001/third_party/WebKit/Source/core/html/HTMLIFrameElement.h File third_party/WebKit/Source/core/html/HTMLIFrameElement.h (right): https://codereview.chromium.org/2394473002/diff/100001/third_party/WebKit/Source/core/html/HTMLIFrameElement.h#newcode82 third_party/WebKit/Source/core/html/HTMLIFrameElement.h:82: bool allowPaymentRequest() const override { return m_allowPaymentRequest; } On ...
4 years, 2 months ago (2016-10-19 09:04:09 UTC) #36
pals
Removed need of variable in HTMLIFrameElement.h but we need to override allowPaymentRequest() in HTMLIFrameElement.h. I'm ...
4 years, 2 months ago (2016-10-19 12:53:12 UTC) #37
please use gerrit instead
sanjoy.pal@: Sounds like you've done everything you could. I'm out of concrete ideas on how ...
4 years, 2 months ago (2016-10-19 14:21:19 UTC) #38
haraken
https://codereview.chromium.org/2394473002/diff/100001/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp File third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp (right): https://codereview.chromium.org/2394473002/diff/100001/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp#newcode897 third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp:897: frameElement->allowPaymentRequest(), frameElement->csp(), On 2016/10/19 12:53:12, pals wrote: > HTMLIFrameElement ...
4 years, 2 months ago (2016-10-19 15:37:56 UTC) #39
pals
Thank you. Now the code looks much simpler now. PTAL. https://codereview.chromium.org/2394473002/diff/100001/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp File third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp (right): https://codereview.chromium.org/2394473002/diff/100001/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp#newcode897 ...
4 years, 2 months ago (2016-10-20 09:30:07 UTC) #41
haraken
Looks much nicer. LGTM.
4 years, 2 months ago (2016-10-20 09:36:59 UTC) #46
please use gerrit instead
still lgtm from me
4 years, 2 months ago (2016-10-20 15:07:01 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2394473002/180001
4 years, 2 months ago (2016-10-20 16:56:16 UTC) #54
commit-bot: I haz the power
Committed patchset #9 (id:180001)
4 years, 2 months ago (2016-10-20 17:15:53 UTC) #56
commit-bot: I haz the power
4 years, 2 months ago (2016-10-21 13:19:29 UTC) #58
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/310d33fb9aa25f2bcf58b4c64e4e0c1fbcc73bdb
Cr-Commit-Position: refs/heads/master@{#426513}

Powered by Google App Engine
This is Rietveld 408576698