Bug 223303 - [iOS][FCR] Use system colors for the new appearance
Summary: [iOS][FCR] Use system colors for the new appearance
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aditya Keerthi
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-16 20:28 PDT by Aditya Keerthi
Modified: 2024-04-12 03:45 PDT (History)
18 users (show)

See Also:


Attachments
Patch (720.44 KB, patch)
2021-03-16 20:46 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Patch (731.00 KB, patch)
2021-03-17 08:56 PDT, Aditya Keerthi
thorton: review+
Details | Formatted Diff | Diff
Patch for landing (730.87 KB, patch)
2021-03-17 12:38 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].