Bug 238108 - Add an addition point for system background color
Summary: Add an addition point for system background color
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-19 00:21 PDT by Tim Horton
Modified: 2022-03-21 10:46 PDT (History)
12 users (show)

See Also:


Attachments
Patch (19.22 KB, patch)
2022-03-19 00:24 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (19.07 KB, patch)
2022-03-19 14:25 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (19.07 KB, patch)
2022-03-19 14:34 PDT, Tim Horton
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2022-03-19 00:21:22 PDT
Use hardcoded base background color to avoid transparent backgrounds
Comment 1 Tim Horton 2022-03-19 00:24:26 PDT
Created attachment 455166 [details]
Patch
Comment 2 Aditya Keerthi 2022-03-19 10:37:28 PDT
Comment on attachment 455166 [details]
Patch

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

> Source/WebCore/platform/ios/WebCoreUIColorExtras.mm:38
> +        return (UIColor *)[PAL::getUIColorClass() blackColor];

The system background color is not always black or white.

The trait collection's `userInterfaceLevel` and `accessibilityContrast` also affect this color.

I don't think it would be a good idea to hardcode all the variations – I'll talk to you about possible alternate solutions.
Comment 3 Tim Horton 2022-03-19 14:25:19 PDT
Created attachment 455175 [details]
Patch
Comment 4 Tim Horton 2022-03-19 14:34:09 PDT
Created attachment 455177 [details]
Patch
Comment 5 EWS 2022-03-21 10:45:56 PDT
Committed r291564 (248666@main): <https://commits.webkit.org/248666@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 455177 [details].
Comment 6 Radar WebKit Bug Importer 2022-03-21 10:46:18 PDT
<rdar://problem/90576569>