WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
165860
[ApplePay] Remove remaining custom bindings from the ApplePay code
https://bugs.webkit.org/show_bug.cgi?id=165860
Summary
[ApplePay] Remove remaining custom bindings from the ApplePay code
Sam Weinig
Reported
2016-12-14 12:52:07 PST
[ApplePay] Remove remaining custom bindings from the ApplePay code
Attachments
Patch
(163.32 KB, patch)
2016-12-14 13:02 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(164.47 KB, patch)
2016-12-14 14:10 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews113 for mac-yosemite
(1.57 MB, application/zip)
2016-12-14 15:27 PST
,
Build Bot
no flags
Details
Patch
(165.90 KB, patch)
2016-12-15 10:09 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(146.60 KB, patch)
2016-12-15 15:48 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(147.62 KB, patch)
2016-12-15 16:18 PST
,
Sam Weinig
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2016-12-14 13:02:15 PST
Created
attachment 297114
[details]
Patch
WebKit Commit Bot
Comment 2
2016-12-14 13:05:14 PST
Attachment 297114
[details]
did not pass style-queue: ERROR: Source/WebCore/Modules/applepay/ApplePaySession.h:137: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] Total errors found: 1 in 45 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 3
2016-12-14 14:10:48 PST
Created
attachment 297124
[details]
Patch
WebKit Commit Bot
Comment 4
2016-12-14 14:12:58 PST
Attachment 297124
[details]
did not pass style-queue: ERROR: Source/WebCore/Modules/applepay/ApplePaySession.h:137: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] Total errors found: 1 in 45 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 5
2016-12-14 15:26:59 PST
Comment on
attachment 297124
[details]
Patch
Attachment 297124
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/2723621
New failing tests: imported/w3c/web-platform-tests/IndexedDB/interfaces.worker.html
Build Bot
Comment 6
2016-12-14 15:27:04 PST
Created
attachment 297137
[details]
Archive of layout-test-results from ews113 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-yosemite Platform: Mac OS X 10.10.5
Darin Adler
Comment 7
2016-12-15 01:26:01 PST
Comment on
attachment 297124
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=297124&action=review
Didn’t finish reviewing, but here are my first few comments.
> Source/WebCore/Modules/applepay/ApplePayLineItem.h:36 > + using Type = WebCore::PaymentRequest::LineItem::Type;
I don’t think the WebCore prefix is needed here.
> Source/WebCore/Modules/applepay/ApplePayLineItem.idl:31 > +[ > + Conditional=APPLE_PAY, > +] enum ApplePayLineItemType { > + "pending", > + "final" > +};
Bad to rely on this, I suppose, but a conditional applied to the dictionary in this file applies to the entire file and does not need to be repeated on the enum.
> Source/WebCore/Modules/applepay/ApplePayPaymentRequest.h:37 > +#include <heap/Strong.h> > +#include <wtf/Optional.h> > +#include <wtf/Vector.h> > +#include <wtf/text/WTFString.h>
Are any of these redundant? I think some of the other headers above already include these.
> Source/WebCore/Modules/applepay/ApplePayPaymentRequest.h:45 > + using ShippingType = WebCore::PaymentRequest::ShippingType;
I don’t think you need the WebCore prefix here.
> Source/WebCore/Modules/applepay/ApplePayPaymentToken.h:31 > +#include <wtf/text/WTFString.h>
No need for this include.
Sam Weinig
Comment 8
2016-12-15 10:09:52 PST
Created
attachment 297196
[details]
Patch
WebKit Commit Bot
Comment 9
2016-12-15 10:12:13 PST
Attachment 297196
[details]
did not pass style-queue: ERROR: Source/WebCore/Modules/applepay/ApplePaySession.h:137: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] Total errors found: 1 in 45 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 10
2016-12-15 15:48:36 PST
Created
attachment 297236
[details]
Patch
WebKit Commit Bot
Comment 11
2016-12-15 15:52:06 PST
Attachment 297236
[details]
did not pass style-queue: ERROR: Source/WebCore/Modules/applepay/ApplePaySession.h:137: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] Total errors found: 1 in 43 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 12
2016-12-15 16:18:42 PST
Created
attachment 297247
[details]
Patch
WebKit Commit Bot
Comment 13
2016-12-15 16:20:36 PST
Attachment 297247
[details]
did not pass style-queue: ERROR: Source/WebCore/Modules/applepay/ApplePaySession.h:137: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] Total errors found: 1 in 44 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 14
2016-12-15 18:46:44 PST
Comment on
attachment 297247
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=297247&action=review
> Source/WebCore/Modules/applepay/ApplePayPaymentPass.h:35 > +namespace WebCore { > + > + > +struct ApplePayPaymentPass {
Extra blank line here.
> Source/WebCore/Modules/applepay/ApplePaySession.h:46 > class URL; > +struct ApplePayLineItem;
I normally use a blank line and put the structs into a separate paragraph from the classes.
> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4548 > - push(@headerContent, GenerateDictionariesHeaderContent(undef, $otherDictionaries)) if $otherDictionaries; > + push(@headerContent, GenerateDictionariesHeaderContent($dictionary, $otherDictionaries)) if $otherDictionaries;
I would expect this change to break the build, because MediaTrackConstraints does not contain a type named MediaTrackConstrants::ConstraintSet or MediaTrackConstrants::ConstrainLong. Why doesn’t the change cause a problem?
Sam Weinig
Comment 15
2016-12-16 05:46:25 PST
(In reply to
comment #14
)
> > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4548 > > - push(@headerContent, GenerateDictionariesHeaderContent(undef, $otherDictionaries)) if $otherDictionaries; > > + push(@headerContent, GenerateDictionariesHeaderContent($dictionary, $otherDictionaries)) if $otherDictionaries; > > I would expect this change to break the build, because MediaTrackConstraints > does not contain a type named MediaTrackConstrants::ConstraintSet or > MediaTrackConstrants::ConstrainLong. Why doesn’t the change cause a problem?
I explicitly set the ImplementedAs extended attribute on the MediaTrackConstrants types to avoid the issue.
Sam Weinig
Comment 16
2016-12-16 10:57:17 PST
Committed revision 209927.
Darin Adler
Comment 17
2016-12-16 13:13:34 PST
(In reply to
comment #15
)
> I explicitly set the ImplementedAs extended attribute on the > MediaTrackConstrants types to avoid the issue.
Ah! I went looking but missed that. I guess I’m not 100% thrilled with the rule we made that removes prefixes and nests types inside other types, but it seems like something we can easily refine over time.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug