Bug 208063

Summary: [macOS] Use NSStepperCell when painting the spin button appearance
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, annevk, cdumez, ntim, wenson_hsieh
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

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"