[webkit-reviews] review granted: [Bug 207169] Feature Request: billingContact - return zip code prior to user auth : [Attachment 389864] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 6 14:07:19 PST 2020


Andy Estes <aestes at apple.com> has granted Nikos Mouchtaris
<nmouchtaris at apple.com>'s request for review:
Bug 207169: Feature Request: billingContact - return zip code prior to user
auth
https://bugs.webkit.org/show_bug.cgi?id=207169

Attachment 389864: Patch

https://bugs.webkit.org/attachment.cgi?id=389864&action=review




--- Comment #7 from Andy Estes <aestes at apple.com> ---
Comment on attachment 389864
  --> https://bugs.webkit.org/attachment.cgi?id=389864
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=389864&action=review

> Source/WebCore/ChangeLog:3
> +	   Feature Request: billingContact - return zip code prior to user auth

I think this bug (and the associated radar) could use a better title. Perhaps
something like "[Apple Pay] Provide a redacted billing contact during payment
method selection".

> Source/WebCore/Modules/applepay/cocoa/PaymentMethodCocoa.mm:117
> +	   result.addressLine = addressLine;

result.addressLine = WTFMove(addressLine)

> Source/WebCore/Modules/applepay/cocoa/PaymentMethodCocoa.mm:122
> +    if (NSString *subLocality = postalAddress.value.subLocality)
> +	   result.subLocality = subLocality;

No need for the if statement. I'd just do `result.subLocality =
postalAddress.value.subLocality`.

> Source/WebCore/Modules/applepay/cocoa/PaymentMethodCocoa.mm:146
> +    if (NSString *locality = postalAddress.value.city)
> +	   result.locality = locality;
> +#endif
> +#if ALLOW(SUB_ADMIN_AREA)
> +    if (NSString *subAdministrativeArea =
postalAddress.value.subAdministrativeArea)
> +	   result.subAdministrativeArea = subAdministrativeArea;
> +#endif
> +#if ALLOW(ADMIN_AREA)
> +    if (NSString *administrativeArea = postalAddress.value.state)
> +	   result.administrativeArea = administrativeArea;
> +#endif
> +#if ALLOW(POSTAL_CODE)
> +    if (NSString *postalCode = postalAddress.value.postalCode)
> +	   result.postalCode = postalCode;
> +#endif
> +#if ALLOW(COUNTRY)
> +    if (NSString *country = postalAddress.value.country)
> +	   result.country = country;
> +#endif
> +#if ALLOW(COUNTRY_CODE)
> +    if (NSString *ISOCountryCode = postalAddress.value.ISOCountryCode)
> +	   result.countryCode = ISOCountryCode;

Ditto for each of these assignments.

> Source/WebCore/Modules/applepay/cocoa/PaymentMethodCocoa.mm:171
> +    if (NSString *givenName = billingContact.givenName)
> +	   result.givenName = billingContact.givenName;
> +    if (NSString *familyName = billingContact.familyName)
> +	   result.familyName = billingContact.familyName;
> +    
> +    if (NSString *phoneticGivenName = billingContact.phoneticGivenName)
> +	   result.phoneticGivenName = phoneticGivenName;
> +    if (NSString *phoneticFamilyName = billingContact.phoneticFamilyName)
> +	   result.phoneticFamilyName = phoneticFamilyName;

And these.


More information about the webkit-reviews mailing list