| Summary: | AX: Modernize AccessibilityMenuListPopup with 2022 code style | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tyler Wilcock <tyler_w> | ||||||
| Component: | Accessibility | Assignee: | Tyler Wilcock <tyler_w> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Tyler Wilcock
2022-08-08 21:46:36 PDT
Created attachment 461500 [details]
Patch
(In reply to Tyler Wilcock from comment #2) > Created attachment 461500 [details] > Patch --- a/Source/WebCore/accessibility/AccessibilityMenuListPopup.cpp +++ a/Source/WebCore/accessibility/AccessibilityMenuListPopup.cpp @@ -114,13 +114,13 @@ void AccessibilityMenuListPopup::addChildren() if (!m_parent) return; - Node* selectNode = m_parent->node(); - if (!selectNode) + auto* parentNode = m_parent->node(); + if (!parentNode || is<HTMLSelectElement>(parentNode)) Should be: + if (!is<HTMLSelectElement>(parentNode)) @@ -153,7 +156,7 @@ void AccessibilityMenuListPopup::didUpdateActiveOption(int optionIndex) if (!cache) return; - RefPtr child = downcast<AccessibilityObject>(m_children[optionIndex].get()); + RefPtr child = dynamicDowncast<AccessibilityObject>(m_children[optionIndex].get()); I think this dynamic cast may be an overkill since how m_children may contain something that is not a AccessibilityObject? Created attachment 461505 [details]
Patch
Committed 253299@main (bbd5fd4a3e0c): <https://commits.webkit.org/253299@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 461505 [details]. |