RESOLVED FIXED 243715
AX: Modernize AccessibilityMenuListPopup with 2022 code style
https://bugs.webkit.org/show_bug.cgi?id=243715
Summary AX: Modernize AccessibilityMenuListPopup with 2022 code style
Tyler Wilcock
Reported 2022-08-08 21:46:36 PDT
Modernize AccessibilityMenuListPopup with 2022 code style.
Attachments
Patch (3.24 KB, patch)
2022-08-08 21:49 PDT, Tyler Wilcock
no flags
Patch (2.74 KB, patch)
2022-08-09 09:35 PDT, Tyler Wilcock
no flags
Radar WebKit Bug Importer
Comment 1 2022-08-08 21:46:47 PDT
Tyler Wilcock
Comment 2 2022-08-08 21:49:22 PDT
Andres Gonzalez
Comment 3 2022-08-09 05:10:49 PDT
(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?
Tyler Wilcock
Comment 4 2022-08-09 09:35:09 PDT
EWS
Comment 5 2022-08-10 10:10:44 PDT
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].
Note You need to log in before you can comment on or make changes to this bug.