Bug 227135 - [iOS] Update textfield border color to match specification
Summary: [iOS] Update textfield border color to match specification
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-06-17 11:36 PDT by Aditya Keerthi
Modified: 2021-06-21 18:00 PDT (History)
14 users (show)

See Also:


Attachments
For EWS (285.47 KB, patch)
2021-06-17 11:39 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Patch (287.21 KB, patch)
2021-06-21 08:40 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-06-17 11:36:24 PDT
...
Comment 1 Aditya Keerthi 2021-06-17 11:37:00 PDT
<rdar://problem/79456679>
Comment 2 Aditya Keerthi 2021-06-17 11:39:22 PDT
Created attachment 431695 [details]
For EWS
Comment 3 James Craig 2021-06-17 14:23:27 PDT
Could the layout tests cover the IC variant?
Comment 4 James Craig 2021-06-17 14:34:39 PDT
Relating bug 227145 as tracking the checkboxes, etc.
Comment 5 James Craig 2021-06-17 14:49:30 PDT
Comment on attachment 431695 [details]
For EWS

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

> Source/WebCore/css/html.css:417
> +    border: 1px solid -apple-system-opaque-separator;

From another thread, this should be -apple-system-separator since it has an IC variant.
Comment 6 Aditya Keerthi 2021-06-21 08:40:58 PDT
Created attachment 431864 [details]
Patch
Comment 7 Aditya Keerthi 2021-06-21 08:50:58 PDT
(In reply to James Craig from comment #3)
> Could the layout tests cover the IC variant?

The layout tests update are old render tree dumps, I would prefer not to add new render tree dump tests or to modify existing ones.

We could update fast/css/ios/system-color-for-css-value.html, but that would require new logic to force IC mode in tests. I've filed https://bugs.webkit.org/show_bug.cgi?id=227218 to track adding the mechanism / tests.
Comment 8 Maciej Stachowiak 2021-06-21 13:12:00 PDT
Comment on attachment 431864 [details]
Patch

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

> Source/WebCore/css/html.css:417
> +    border: 1px solid -apple-system-opaque-separator;

It looks like James's suggestion to use -apple-system-separator here instead has not been applied.
Comment 9 Maciej Stachowiak 2021-06-21 13:12:01 PDT
Comment on attachment 431864 [details]
Patch

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

> Source/WebCore/css/html.css:417
> +    border: 1px solid -apple-system-opaque-separator;

It looks like James's suggestion to use -apple-system-separator here instead has not been applied.
Comment 10 Aditya Keerthi 2021-06-21 13:18:12 PDT
(In reply to Maciej Stachowiak from comment #9)
> Comment on attachment 431864 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=431864&action=review
> 
> > Source/WebCore/css/html.css:417
> > +    border: 1px solid -apple-system-opaque-separator;
> 
> It looks like James's suggestion to use -apple-system-separator here instead
> has not been applied.

We still want an opaque color, hence the use of "-apple-system-opaque-separator". "-apple-system-separator" is a transparent color.

From the other thread, we actually want to use separatorColor composited on top of a solid color (essentially creating our own opaque separator, since the UIKit version is currently missing an Increased Contrast variant).

Consequently, the change that James mentions is actually applied in the RenderThemeIOS change in the patch, where we now use separatorColor with the compositing behavior. The name of the CSS value is kept the same to reflect the opaqueness.
Comment 11 Maciej Stachowiak 2021-06-21 17:37:47 PDT
Comment on attachment 431864 [details]
Patch

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

r=me but see question.

>>>> Source/WebCore/css/html.css:417
>>>> +    border: 1px solid -apple-system-opaque-separator;
>>> 
>>> It looks like James's suggestion to use -apple-system-separator here instead has not been applied.
>> 
>> It looks like James's suggestion to use -apple-system-separator here instead has not been applied.
> 
> We still want an opaque color, hence the use of "-apple-system-opaque-separator". "-apple-system-separator" is a transparent color.
> 
> From the other thread, we actually want to use separatorColor composited on top of a solid color (essentially creating our own opaque separator, since the UIKit version is currently missing an Increased Contrast variant).
> 
> Consequently, the change that James mentions is actually applied in the RenderThemeIOS change in the patch, where we now use separatorColor with the compositing behavior. The name of the CSS value is kept the same to reflect the opaqueness.

I see! I'm not totally sure how the change in RenderThemeIOS.mm does that. Does the ", true" force compositing on top of a solid color? Does that handle dark mode in a reasonable way (as pointed out in another comment in this Radar)?
Comment 12 Aditya Keerthi 2021-06-21 17:54:21 PDT
(In reply to Maciej Stachowiak from comment #11)
> Comment on attachment 431864 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=431864&action=review
> 
> r=me but see question.
> 
> >>>> Source/WebCore/css/html.css:417
> >>>> +    border: 1px solid -apple-system-opaque-separator;
> >>> 
> >>> It looks like James's suggestion to use -apple-system-separator here instead has not been applied.
> >> 
> >> It looks like James's suggestion to use -apple-system-separator here instead has not been applied.
> > 
> > We still want an opaque color, hence the use of "-apple-system-opaque-separator". "-apple-system-separator" is a transparent color.
> > 
> > From the other thread, we actually want to use separatorColor composited on top of a solid color (essentially creating our own opaque separator, since the UIKit version is currently missing an Increased Contrast variant).
> > 
> > Consequently, the change that James mentions is actually applied in the RenderThemeIOS change in the patch, where we now use separatorColor with the compositing behavior. The name of the CSS value is kept the same to reflect the opaqueness.
> 
> I see! I'm not totally sure how the change in RenderThemeIOS.mm does that.
> Does the ", true" force compositing on top of a solid color? Does that
> handle dark mode in a reasonable way (as pointed out in another comment in
> this Radar)?

Yes, the compositing behavior activated with the ", true". The way we handle dark mode is by compositing the dark mode variant of the color over solid black (logic in `systemColorFromCSSValueSystemColorInformation`).

Thanks for the review!
Comment 13 EWS 2021-06-21 18:00:32 PDT
Committed r279097 (239014@main): <https://commits.webkit.org/239014@main>

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