Bug 230664

Summary: [GPU Process] support rendering Apple Pay logos
Product: WebKit Reporter: Devin Rousso <hi>
Component: New BugsAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, hi, sam, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=230647
Bug Depends on:    
Bug Blocks: 232050    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Devin Rousso 2021-09-22 20:18:56 PDT
.
Comment 1 Devin Rousso 2021-09-22 20:19:15 PDT
<rdar://problem/83187282>
Comment 2 Devin Rousso 2021-09-22 20:21:44 PDT
Created attachment 439007 [details]
Patch
Comment 3 Sam Weinig 2021-09-24 11:55:25 PDT
Comment on attachment 439007 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +

Is there a test that now passes? If not, (or perhaps even if) would probably be good to have one that draws the logo at various different sizes to make sure the scaling works.
Comment 4 Devin Rousso 2021-09-24 14:10:23 PDT
Comment on attachment 439007 [details]
Patch

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

>> Source/WebCore/ChangeLog:8
>> +
> 
> Is there a test that now passes? If not, (or perhaps even if) would probably be good to have one that draws the logo at various different sizes to make sure the scaling works.

I don't believe there are any existing tests for this.  Frankly I'm not entirely sure how to test this given that the actual content being drawn comes from a PDF in PassKit.  I'm also being told that we don't like using `-expected.png` anymore nowadays 😅  Do you have any suggestions for testing this?
Comment 5 Simon Fraser (smfr) 2021-09-24 14:22:10 PDT
You can use transforms, clip-path etc to pick out solid-color parts of the drawn button and ref-test those.
Comment 6 Tim Horton 2021-09-30 12:04:25 PDT
Comment on attachment 439007 [details]
Patch

Devin is going to write a test (maybe just a cheap mismatch test) that would have failed before.
Comment 7 Devin Rousso 2021-09-30 20:33:44 PDT
Created attachment 439816 [details]
Patch
Comment 8 Tim Horton 2021-10-04 15:14:40 PDT
Comment on attachment 439816 [details]
Patch

Mismatch test really only works for a single case at a time (because any one passing will make the whole thing pass), would recommend splitting them.
Comment 9 Devin Rousso 2021-10-07 18:03:37 PDT
Created attachment 440563 [details]
Patch
Comment 10 Devin Rousso 2021-10-08 15:44:59 PDT
Created attachment 440684 [details]
Patch

not sure what's going on with `background-repeat: repeat`, but this test also fails before my changes so I'm going to remove it for now a file a bug about that as a followup
Comment 11 EWS 2021-10-08 23:24:40 PDT
Committed r283864 (242741@main): <https://commits.webkit.org/242741@main>

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