Bug 224831 - [iOS][FCR] <select> decorations should match the text color
Summary: [iOS][FCR] <select> decorations should match the text color
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Other
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Aditya Keerthi
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-20 14:37 PDT by Aditya Keerthi
Modified: 2021-04-21 09:09 PDT (History)
11 users (show)

See Also:


Attachments
Patch (4.35 KB, patch)
2021-04-20 14:39 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Example (13.47 KB, image/png)
2021-04-20 20:22 PDT, Aditya Keerthi
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aditya Keerthi 2021-04-20 14:37:02 PDT
...
Comment 1 Radar WebKit Bug Importer 2021-04-20 14:37:18 PDT
<rdar://problem/76918959>
Comment 2 Aditya Keerthi 2021-04-20 14:39:23 PDT
Created attachment 426595 [details]
Patch
Comment 3 Darin Adler 2021-04-20 18:31:11 PDT
Comment on attachment 426595 [details]
Patch

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

> Source/WebCore/ChangeLog:11
> +        Currently, <select> decorations always have a system blue color, even
> +        if a different text color is specified. To improve stylability, the
> +        color of the decoration should match the color of the text.

Even when the text is black?

> LayoutTests/ChangeLog:13
> +        * fast/forms/ios/form-control-refresh/select/decoration-color-expected-mismatch.html: Added.

Mismatch tests are the least precise kind. But I suppose there is no chance to do better?
Comment 4 Aditya Keerthi 2021-04-20 20:22:40 PDT
Created attachment 426638 [details]
Example
Comment 5 Aditya Keerthi 2021-04-20 20:28:57 PDT
(In reply to Darin Adler from comment #3)
> Comment on attachment 426595 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=426595&action=review
> 
> > Source/WebCore/ChangeLog:11
> > +        Currently, <select> decorations always have a system blue color, even
> > +        if a different text color is specified. To improve stylability, the
> > +        color of the decoration should match the color of the text.
> 
> Even when the text is black?

Yes, the text color for a native <select> without styling is blue, so we still retain the existing appearance on unstyled controls. If the text color is set to black, we want the decoration to match, since it appears right alongside the text. I've attached a screenshot to demonstrate the black text color case.

> > LayoutTests/ChangeLog:13
> > +        * fast/forms/ios/form-control-refresh/select/decoration-color-expected-mismatch.html: Added.
> 
> Mismatch tests are the least precise kind. But I suppose there is no chance
> to do better?

Unfortunately, no. The color of the decoration is not exposed to the web, and it's not possible to write a reference test, since there's only one way to modify the color. 

I did verify that the only difference between the mismatching test cases is the color of the decoration. However, I understand that doesn't really address the imprecision of mismatch tests as more changes are introduced in the future.
Comment 6 EWS 2021-04-21 09:09:12 PDT
Committed r276366 (236844@main): <https://commits.webkit.org/236844@main>

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