Bug 223303

Summary: [iOS][FCR] Use system colors for the new appearance
Product: WebKit Reporter: Aditya Keerthi <akeerthi>
Component: FormsAssignee: Aditya Keerthi <akeerthi>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, ie2kl43y, jer.noble, kondapallykalyan, macpherson, menard, pdr, philipj, sergio, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
thorton: review+
Patch for landing none

Description Aditya Keerthi 2021-03-16 20:28:16 PDT
...
Comment 1 Aditya Keerthi 2021-03-16 20:28:33 PDT
<rdar://problem/75508598>
Comment 2 Aditya Keerthi 2021-03-16 20:46:34 PDT
Created attachment 423429 [details]
Patch
Comment 3 Aditya Keerthi 2021-03-17 08:56:17 PDT
Created attachment 423490 [details]
Patch
Comment 4 Tim Horton 2021-03-17 11:46:03 PDT
Comment on attachment 423490 [details]
Patch

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

> Source/WebCore/rendering/RenderThemeIOS.mm:1456
> +    if (cssValueID == CSSValueAppleSystemSecondaryFillDisabled)
> +        return systemColor(CSSValueAppleSystemSecondaryFill, options).colorWithAlphaMultipliedBy(0.75f);

Why are we synthesizing not-real semantic colors instead of just doing it in content?

> Source/WebCore/rendering/RenderThemeIOS.mm:2159
> +        // The inner circle is 1 / 3 the size of the surrounding circle,
> +        // leaving 2 / 3 around it. (2 / 3) / 2 = 1 / 3.
> +        constexpr float innerInverseRatio = 1 / 3.0f;

What's this got to do with system colors?
Comment 5 Aditya Keerthi 2021-03-17 12:13:36 PDT
(In reply to Tim Horton from comment #4)
> Comment on attachment 423490 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=423490&action=review
> 
> > Source/WebCore/rendering/RenderThemeIOS.mm:1456
> > +    if (cssValueID == CSSValueAppleSystemSecondaryFillDisabled)
> > +        return systemColor(CSSValueAppleSystemSecondaryFill, options).colorWithAlphaMultipliedBy(0.75f);
> 
> Why are we synthesizing not-real semantic colors instead of just doing it in
> content?

UIKit doesn't expose this color for us to use, but it's the color for disabled buttons. I'll make a request and add a FIXME.

> > Source/WebCore/rendering/RenderThemeIOS.mm:2159
> > +        // The inner circle is 1 / 3 the size of the surrounding circle,
> > +        // leaving 2 / 3 around it. (2 / 3) / 2 = 1 / 3.
> > +        constexpr float innerInverseRatio = 1 / 3.0f;
> 
> What's this got to do with system colors?

This is a change we need to make to radio buttons, but I'll move it into a separate patch.
Comment 6 Aditya Keerthi 2021-03-17 12:38:13 PDT
Created attachment 423516 [details]
Patch for landing
Comment 7 EWS 2021-03-17 16:47:48 PDT
Committed r274600: <https://commits.webkit.org/r274600>

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