AX: Add missing null checks to prevent crashes when accessing SVG elements
<rdar://problem/102924620>
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
rdar://102843966
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].