Bug 212476 - [Apple Pay] Buttons render with a corner radius of PKApplePayButtonDefaultCornerRadius even when explicitly specifying "border-radius: 0px"
Summary: [Apple Pay] Buttons render with a corner radius of PKApplePayButtonDefaultCor...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy Estes
URL:
Keywords: InRadar
Depends on: 238062
Blocks:
  Show dependency treegraph
 
Reported: 2020-05-28 10:32 PDT by Andy Estes
Modified: 2022-03-17 18:08 PDT (History)
15 users (show)

See Also:


Attachments
Patch (28.44 KB, patch)
2020-05-28 10:56 PDT, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (28.99 KB, patch)
2020-05-28 18:39 PDT, Andy Estes
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Estes 2020-05-28 10:32:32 PDT
[Apple Pay] Buttons render with a corner radius of PKApplePayButtonDefaultCornerRadius even when explicitly specifying "border-radius: 0px"
Comment 1 Andy Estes 2020-05-28 10:33:21 PDT
rdar://problem/63401433
Comment 2 Andy Estes 2020-05-28 10:56:12 PDT
Created attachment 400481 [details]
Patch
Comment 3 Simon Fraser (smfr) 2020-05-28 12:09:16 PDT
How does this interact with "all: unset" etc?
Comment 4 Antti Koivisto 2020-05-28 12:28:11 PDT
Comment on attachment 400481 [details]
Patch

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

> Source/WebCore/style/StyleBuilderCustom.h:127
> +    // FIXME: Teach makeprop.pl to generate setters for hasExplicitlySet* flags

Yes please. Doing this manually is bit silly.

Also we might want to track the cascade level instead (so property can be set on UA sheet without being considered 'explicitly set').
Comment 5 Andy Estes 2020-05-28 14:15:42 PDT
(In reply to Simon Fraser (smfr) from comment #3)
> How does this interact with "all: unset" etc?

"all: unset" or "all: initial" would set border-radius back to its initial value, which would set hasExplicitlySetBorderRadius to false, and we would render at the default corner radius.

"all: revert" would roll back to the User or UA origin. As Antti pointed out in comment #4, if border-radius is set in one of those origins then we'd consider it "explicitly set" and use it instead of the default corner radius for Apple Pay buttons. In practice, our UA stylesheet does not set border-radius on any elements that authors would style with '-webkit-appearance: -apple-pay-button', so I think this is ok for now.

I'll do a few things as follow-up:
1. Update my tests to cover the 'all' shorthand.
2. File a bug for Antti's suggestion to track cascade level (and about the makeprop.pl improvement).
Comment 6 Andy Estes 2020-05-28 18:39:17 PDT
Created attachment 400536 [details]
Patch
Comment 7 EWS 2020-05-28 21:08:21 PDT
Committed r262279: <https://trac.webkit.org/changeset/262279>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 400536 [details].