Bug 225375 - [macOS] Use system colors for ActiveButtonText
Summary: [macOS] Use system colors for ActiveButtonText
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aditya Keerthi
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-04 17:46 PDT by Aditya Keerthi
Modified: 2021-05-05 23:15 PDT (History)
11 users (show)

See Also:


Attachments
Patch for EWS (1.96 KB, patch)
2021-05-04 17:48 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Patch (3.12 KB, patch)
2021-05-05 12:43 PDT, Aditya Keerthi
thorton: review+
Details | Formatted Diff | Diff
Patch for landing (3.40 KB, patch)
2021-05-05 13:39 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-05-04 17:46:16 PDT
...
Comment 1 Aditya Keerthi 2021-05-04 17:46:39 PDT
<rdar://problem/75863443>
Comment 2 Aditya Keerthi 2021-05-04 17:48:06 PDT
Created attachment 427716 [details]
Patch for EWS
Comment 3 Aditya Keerthi 2021-05-05 12:43:26 PDT
Created attachment 427790 [details]
Patch
Comment 4 Tim Horton 2021-05-05 13:11:40 PDT
Comment on attachment 427790 [details]
Patch

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

> Source/WebCore/rendering/RenderThemeMac.mm:414
> +    if ([cell interiorBackgroundStyle] == NSBackgroundStyleEmphasized)

Should also have a FIXME and an AppKit radar on all of this.
Comment 5 Aditya Keerthi 2021-05-05 13:39:56 PDT
Created attachment 427801 [details]
Patch for landing
Comment 6 EWS 2021-05-05 19:34:36 PDT
Committed r277067 (237370@main): <https://commits.webkit.org/237370@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 427801 [details].
Comment 7 Simon Fraser (smfr) 2021-05-05 21:23:28 PDT
Comment on attachment 427801 [details]
Patch for landing

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

> Source/WebCore/rendering/RenderThemeMac.mm:423
> +    auto cell = adoptNS([[NSButtonCell alloc] init]);
> +    [cell setBezelStyle:NSBezelStyleRounded];
> +    [cell setHighlighted:YES];
> +
> +    NSColor *activeButtonTextColor;
> +    if ([cell interiorBackgroundStyle] == NSBackgroundStyleEmphasized)
> +        activeButtonTextColor = [NSColor alternateSelectedControlTextColor];
> +    else
> +        activeButtonTextColor = [NSColor controlTextColor];
> +
> +    return semanticColorFromNSColor(activeButtonTextColor);

Do we call this every time we paint a button? Can we cache it?
Comment 8 Tim Horton 2021-05-05 23:15:13 PDT
(In reply to Simon Fraser (smfr) from comment #7)
> Comment on attachment 427801 [details]
> Patch for landing
> Do we call this every time we paint a button? Can we cache it?

See the changelog :)