Implementation for AXIsolatedObject::nextSibling and previousSibling.
authorandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Sep 2020 18:52:36 +0000 (18:52 +0000)
committerandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Sep 2020 18:52:36 +0000 (18:52 +0000)
commit4ea22b6a62b873138c4e78e454040f96463aef29
treee74a816bd516295a0d2d04b872c0ff29fc6cb2dc
parent88eb4c44652e0ad08e79ae840700d539a19703ec
Implementation for AXIsolatedObject::nextSibling and previousSibling.
https://bugs.webkit.org/show_bug.cgi?id=216710

Reviewed by Chris Fleizach.

Implementation for AXIsolatedObject::previousSibling and nextSibling which
are invoked by VoiceOver in Safari Reader mode.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::previousSibling const):
- Fixed crash caused by dereferencing m_renderer->parent() which can be null.
- Added check for the AXObjectCache that can become null.
(WebCore::AccessibilityRenderObject::nextSibling const):
- Code style cleanup.
* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):
- Added caching of next/previousSiblling objects.
(WebCore::AXIsolatedObject::previousSibling const): Inlined in header..
(WebCore::AXIsolatedObject::nextSibling const): Inlined in header.
* accessibility/isolatedtree/AXIsolatedObject.h:
* accessibility/isolatedtree/AXIsolatedTree.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h