Bug 215619 - [macOS] Move stepper painting code off of Carbon API
Summary: [macOS] Move stepper painting code off of Carbon API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari Technology Preview
Hardware: Mac Other
: P2 Normal
Assignee: Aditya Keerthi
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-08-18 12:38 PDT by Aditya Keerthi
Modified: 2020-08-20 11:13 PDT (History)
5 users (show)

See Also:


Attachments
Patch (9.05 KB, patch)
2020-08-18 13:11 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Patch for landing (12.47 KB, patch)
2020-08-18 15:06 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Patch (3.71 KB, patch)
2020-08-20 11:11 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 2020-08-18 12:38:19 PDT
This will ensure the stepper has an appropriate appearance in dark mode.
Comment 1 Aditya Keerthi 2020-08-18 12:39:27 PDT
<rdar://problem/41936617>
Comment 2 Aditya Keerthi 2020-08-18 13:11:43 PDT
Created attachment 406802 [details]
Patch
Comment 3 Darin Adler 2020-08-18 13:55:37 PDT
Comment on attachment 406802 [details]
Patch

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

We should figure out how to make test coverage for this.

> Source/WebCore/platform/mac/ThemeMac.mm:637
> +    ControlStates::States states = controlStates.states();

Consider auto here instead of writing out the type ControlStates::States

> Source/WebCore/platform/mac/ThemeMac.mm:672
> +        (__bridge NSString *)kCUIWidgetKey: (__bridge NSString *)kCUIWidgetButtonLittleArrows,
> +        (__bridge NSString *)kCUISizeKey: coreUISize,
> +        (__bridge NSString *)kCUIStateKey: coreUIState,
> +        (__bridge NSString *)kCUIValueKey: (states & ControlStates::SpinUpState) ? @1 : @0,
> +        (__bridge NSString *)kCUIIsFlippedKey : @NO,
> +        (__bridge NSString *)kCUIScaleKey : @1,
> +        (__bridge NSString *)kCUIMaskOnlyKey : @NO

Mixed formatting here about whether the ":" has a space before it or not.
Comment 4 Aditya Keerthi 2020-08-18 15:06:32 PDT
Created attachment 406817 [details]
Patch for landing
Comment 5 Aditya Keerthi 2020-08-18 15:07:48 PDT
(In reply to Darin Adler from comment #3)
> Comment on attachment 406802 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=406802&action=review
> 
> We should figure out how to make test coverage for this.

I added a reference mismatch test to verify that the stepper has a different appearance under dark mode.
Comment 6 EWS 2020-08-19 09:03:39 PDT
Committed r265860: <https://trac.webkit.org/changeset/265860>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 406817 [details].
Comment 7 Aditya Keerthi 2020-08-20 11:11:44 PDT
Reopening to attach new patch.
Comment 8 Aditya Keerthi 2020-08-20 11:11:45 PDT
Created attachment 406947 [details]
Patch
Comment 9 Aditya Keerthi 2020-08-20 11:13:49 PDT
Uploaded a patch to the wrong bug.