Bug 224831

Summary: [iOS][FCR] <select> decorations should match the text color
Product: WebKit Reporter: Aditya Keerthi <akeerthi>
Component: FormsAssignee: Aditya Keerthi <akeerthi>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, darin, esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, pdr, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: iPhone / iPad   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Example none

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].