Summary: | Use enum classes and OptionSets for ControlStates::States | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Aditya Keerthi <akeerthi> | ||||
Component: | WebCore Misc. | Assignee: | Aditya Keerthi <akeerthi> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cdumez, changseok, cmarcelo, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, kangil.han, kondapallykalyan, mifenton, pdr, sam, simon.fraser, webkit-bug-importer, wenson_hsieh | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | Other | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Aditya Keerthi
2021-03-23 11:02:25 PDT
Created attachment 424383 [details]
Patch
Comment on attachment 424383 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424383&action=review > Source/WebCore/platform/ControlStates.h:57 > + SpinUp = 1 << 8, // Sub-state for HoverState and PressedState. Should we instead just use { Hovered, Pressed } ? > Source/WebCore/platform/adwaita/ThemeAdwaita.cpp:262 > + else if (states.states().contains(ControlStates::States::Hovered)) So much states (In reply to Simon Fraser (smfr) from comment #2) > Comment on attachment 424383 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=424383&action=review > > > Source/WebCore/platform/ControlStates.h:57 > > + SpinUp = 1 << 8, // Sub-state for HoverState and PressedState. > > Should we instead just use { Hovered, Pressed } ? { SpinUp } != { Hovered, Pressed }. From RenderTheme::extractControlStatesForRenderer: if (isHovered(o)) { states.add(ControlStates::States::Hovered); if (isSpinUpButtonPartHovered(o)) states.add(ControlStates::States::SpinUp); } if (isPressed(o)) { states.add(ControlStates::States::Pressed); if (isSpinUpButtonPartPressed(o)) states.add(ControlStates::States::SpinUp); } Committed r275161: <https://commits.webkit.org/r275161> All reviewed patches have been landed. Closing bug and clearing flags on attachment 424383 [details]. |