RESOLVED FIXED189100
[Payment Request] Implement the PaymentMethodChangeEvent and PaymentMethodChangeEventInit interfaces
https://bugs.webkit.org/show_bug.cgi?id=189100
Summary [Payment Request] Implement the PaymentMethodChangeEvent and PaymentMethodCha...
Andy Estes
Reported 2018-08-29 15:15:41 PDT
[Payment Request] Begin implementing PaymentMethodChangeEvent
Attachments
Patch (40.70 KB, patch)
2018-08-29 15:26 PDT, Andy Estes
no flags
Patch (39.48 KB, patch)
2018-08-29 15:29 PDT, Andy Estes
no flags
Patch (40.13 KB, patch)
2018-08-29 19:12 PDT, Andy Estes
no flags
Patch (39.91 KB, patch)
2018-08-29 20:56 PDT, Andy Estes
no flags
Patch (39.87 KB, patch)
2018-08-30 11:34 PDT, Andy Estes
no flags
Patch (39.93 KB, patch)
2018-08-30 12:22 PDT, Andy Estes
no flags
Andy Estes
Comment 1 2018-08-29 15:26:28 PDT Comment hidden (obsolete)
Andy Estes
Comment 2 2018-08-29 15:29:45 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 3 2018-08-29 15:33:22 PDT Comment hidden (obsolete)
Andy Estes
Comment 4 2018-08-29 16:02:19 PDT
Comment on attachment 348439 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=348439&action=review > LayoutTests/imported/w3c/ChangeLog:11 > + One test in onpaymentmenthodchange-attribute.https.html continues to fail due to a bug in > + the test. Oops! This is a bug in the patch, not the test. Fixing.
Andy Estes
Comment 5 2018-08-29 19:12:02 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 6 2018-08-29 19:14:46 PDT Comment hidden (obsolete)
Andy Estes
Comment 7 2018-08-29 20:56:15 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 8 2018-08-29 21:00:56 PDT Comment hidden (obsolete)
Andy Estes
Comment 9 2018-08-30 11:34:18 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 10 2018-08-30 11:36:09 PDT Comment hidden (obsolete)
Daniel Bates
Comment 11 2018-08-30 11:56:04 PDT
Comment on attachment 348520 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=348520&action=review r=me > Source/WebCore/ChangeLog:9 > + by <https://w3c.github.io/payment-request/#paymentmethodchangeevent-interface>. For historical preservation, please include the date of the draft you referenced. > Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEvent.cpp:27 > +#include "PaymentMethodChangeEvent.h" I suggest we move this under the ENABLE(PAYMENT_REQUEST)-guard. > Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEvent.cpp:40 > +PaymentMethodChangeEvent::PaymentMethodChangeEvent(const AtomicString& type, const PaymentMethodChangeEventInit& eventInit) Can we make the first parameter an rvalue reference and move it into PaymentRequestUpdateEvent? > Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEvent.h:40 > +struct PaymentMethodChangeEventInit; This forward declaration is unnecessary as PaymentRequestUpdateEvent.h already contains it. > Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEvent.h:44 > + template <typename... Args> static Ref<PaymentMethodChangeEvent> create(Args&&... args) Nit: We do not put a space between "template" and the template parameters. The code base has a mix of both kinds. The clear majority is without the space. > Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEventInit.h:39 > +struct PaymentMethodChangeEventInit final : public PaymentRequestUpdateEventInit { The keyword "public" is not necessary. > Source/WebCore/Modules/paymentrequest/PaymentRequestUpdateEventInit.h:34 > +struct PaymentRequestUpdateEventInit : public EventInit { Ditto.
Andy Estes
Comment 12 2018-08-30 12:17:35 PDT
(In reply to Daniel Bates from comment #11) > Comment on attachment 348520 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=348520&action=review > > r=me > > > Source/WebCore/ChangeLog:9 > > + by <https://w3c.github.io/payment-request/#paymentmethodchangeevent-interface>. > > For historical preservation, please include the date of the draft you > referenced. Ok. > > > Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEvent.cpp:27 > > +#include "PaymentMethodChangeEvent.h" > > I suggest we move this under the ENABLE(PAYMENT_REQUEST)-guard. Ok. > > > Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEvent.cpp:40 > > +PaymentMethodChangeEvent::PaymentMethodChangeEvent(const AtomicString& type, const PaymentMethodChangeEventInit& eventInit) > > Can we make the first parameter an rvalue reference and move it into > PaymentRequestUpdateEvent? I don't think so, because then I'd initialize m_methodName and m_methodDetails using a moved-from value. > > > Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEvent.h:40 > > +struct PaymentMethodChangeEventInit; > > This forward declaration is unnecessary as PaymentRequestUpdateEvent.h > already contains it. PaymentRequestUpdateEvent.h contains a forward declaration of PaymentRequestUpdateEventInit, not PaymentMethodChangeEventInit. > > > Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEvent.h:44 > > + template <typename... Args> static Ref<PaymentMethodChangeEvent> create(Args&&... args) > > Nit: We do not put a space between "template" and the template parameters. > The code base has a mix of both kinds. The clear majority is without the > space. > > > Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEventInit.h:39 > > +struct PaymentMethodChangeEventInit final : public PaymentRequestUpdateEventInit { > > The keyword "public" is not necessary. > > > Source/WebCore/Modules/paymentrequest/PaymentRequestUpdateEventInit.h:34 > > +struct PaymentRequestUpdateEventInit : public EventInit { > > Ditto. Fixed.
Andy Estes
Comment 13 2018-08-30 12:22:15 PDT
EWS Watchlist
Comment 14 2018-08-30 12:23:31 PDT
Attachment 348527 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/paymentrequest/PaymentMethodChangeEvent.cpp:42: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 15 2018-08-30 12:57:27 PDT
Comment on attachment 348527 [details] Patch Clearing flags on attachment: 348527 Committed r235518: <https://trac.webkit.org/changeset/235518>
WebKit Commit Bot
Comment 16 2018-08-30 12:57:29 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 17 2018-08-31 08:56:40 PDT
Note You need to log in before you can comment on or make changes to this bug.