Bug 224800 - REGRESSION (r275523): [iOS] Opaque system fill colors are incorrect in dark mode
Summary: REGRESSION (r275523): [iOS] Opaque system fill colors are incorrect in dark mode
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-19 20:43 PDT by Aditya Keerthi
Modified: 2021-04-20 09:16 PDT (History)
10 users (show)

See Also:


Attachments
Patch (8.63 KB, patch)
2021-04-19 20:55 PDT, Aditya Keerthi
darin: review+
Details | Formatted Diff | Diff
Patch for landing (8.53 KB, patch)
2021-04-20 06:26 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-04-19 20:43:15 PDT
The colors are much lighter than expected.
Comment 1 Radar WebKit Bug Importer 2021-04-19 20:43:46 PDT
<rdar://problem/76878335>
Comment 2 Aditya Keerthi 2021-04-19 20:55:32 PDT
Created attachment 426516 [details]
Patch
Comment 3 Darin Adler 2021-04-19 21:35:44 PDT
Comment on attachment 426516 [details]
Patch

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

> Source/WebCore/rendering/RenderThemeIOS.mm:1343
> +            if (useDarkAppearance)
> +                return blendSourceOver(Color::black, systemColor);
> +            else
> +                return blendSourceOver(Color::white, systemColor);

This is one of those cases where ?: looks better:

    return blendSourceOver(useDarkAppearance ? Color::black : Color::white, systemColor);
Comment 4 Aditya Keerthi 2021-04-20 06:26:44 PDT
Created attachment 426542 [details]
Patch for landing
Comment 5 Aditya Keerthi 2021-04-20 06:28:25 PDT
Thanks for the review!
Comment 6 EWS 2021-04-20 09:16:52 PDT
Committed r276307 (236789@main): <https://commits.webkit.org/236789@main>

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