| Summary: | AX: Add missing null checks to prevent crashes when accessing SVG elements | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| 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: | Other | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Tyler Wilcock
2022-12-02 17:38:37 PST
Created attachment 463864 [details]
Patch
(In reply to Tyler Wilcock from comment #2) > Created attachment 463864 [details] > Patch --- a/Source/WebCore/accessibility/AccessibilityNodeObject.cpp +++ b/Source/WebCore/accessibility/AccessibilityNodeObject.cpp + if (focusedElement == m_node || isFocusedWebArea()) return true; return false; While at it, can you replace the above 4 lines with: return focusedElement == m_node || isFocusedWebArea(); Looks good. Thanks! (In reply to Tyler Wilcock from comment #2) > Created attachment 463864 [details] > Patch --- a/Source/WebCore/accessibility/AccessibilityNodeObject.cpp +++ b/Source/WebCore/accessibility/AccessibilityNodeObject.cpp @@ -2428,10 +2428,17 @@ bool AccessibilityNodeObject::isFocused() const it may be even better to return early in: auto* focusedElement = document.focusedElement(); if (!focusedElement) return false; if (focusedElement == m_node) return true; and then do the web area stuff. Created attachment 463869 [details]
Patch
Committed 257359@main (cdd13301fca6): <https://commits.webkit.org/257359@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 463869 [details]. |