Bug 208063 - [macOS] Use NSStepperCell when painting the spin button appearance
Summary: [macOS] Use NSStepperCell when painting the spin button appearance
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-21 10:27 PST by Wenson Hsieh
Modified: 2024-01-15 11:02 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2020-02-21 10:27:29 PST
ThemeMac.mm’s paintStepper() helper function has this comment from 2010:

    // We don't use NSStepperCell because there are no ways to draw an
    // NSStepperCell with the up button highlighted.
Comment 1 Wenson Hsieh 2020-02-21 10:29:53 PST
(In reply to Wenson Hsieh from comment #0)
> ThemeMac.mm’s paintStepper() helper function has this comment from 2010:
> 
>     // We don't use NSStepperCell because there are no ways to draw an
>     // NSStepperCell with the up button highlighted.

I wonder if we can just draw with the down button highlighted, but reflect it about the x-axis and translate by -height before drawing into the graphics context :|
Comment 2 Ahmad Saleem 2024-01-15 11:02:24 PST
https://searchfox.org/wubkat/rev/581e116dc6ce254811dbe2da9d1c1168762fc30c/Source/WebCore/platform/graphics/mac/controls/InnerSpinButtonMac.mm#63

We still have this comment above:

"// We don't use NSStepperCell because there are no ways to draw an"