| Summary: | [macOS] Update appearance of <datalist> indicator | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Aditya Keerthi <akeerthi> | ||||||||
| Component: | Forms | Assignee: | Aditya Keerthi <akeerthi> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | cdumez, changseok, esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, pdr, thorton, wenson_hsieh | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | Other | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Aditya Keerthi
2021-10-20 12:28:13 PDT
Created attachment 441915 [details]
Patch
Created attachment 441923 [details]
Patch
Comment on attachment 441923 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=441923&action=review > Source/WebCore/rendering/RenderThemeMac.mm:1019 > + if (auto* buttonElement = input.dataListButtonElement()) > + coreUIState = (__bridge NSString *)(buttonElement->active() ? kCUIStatePressed : kCUIStateActive); > + else > + coreUIState = (__bridge NSString *)kCUIStateActive; Nit - might look cleaner with a top-level `else if` like: ``` if (input.isPresentingAttachedView()) coreUIState = (__bridge NSString *)kCUIStatePressed; else if (auto* buttonElement = input.dataListButtonElement()) coreUIState = (__bridge NSString *)(buttonElement->active() ? kCUIStatePressed : kCUIStateActive); else coreUIState = (__bridge NSString *)kCUIStateActive; ``` Created attachment 442045 [details]
Patch for landing
(In reply to Wenson Hsieh from comment #4) > Comment on attachment 441923 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=441923&action=review > > > Source/WebCore/rendering/RenderThemeMac.mm:1019 > > + if (auto* buttonElement = input.dataListButtonElement()) > > + coreUIState = (__bridge NSString *)(buttonElement->active() ? kCUIStatePressed : kCUIStateActive); > > + else > > + coreUIState = (__bridge NSString *)kCUIStateActive; > > Nit - might look cleaner with a top-level `else if` like: > > ``` > if (input.isPresentingAttachedView()) > coreUIState = (__bridge NSString *)kCUIStatePressed; > else if (auto* buttonElement = input.dataListButtonElement()) > coreUIState = (__bridge NSString *)(buttonElement->active() ? > kCUIStatePressed : kCUIStateActive); > else > coreUIState = (__bridge NSString *)kCUIStateActive; > ``` Done. Thanks for the review! Committed r284626 (243347@main): <https://commits.webkit.org/243347@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 442045 [details]. |