AX: Document::existingAXObjectCache() should always return the existing AXObjectCache.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Dec 2017 23:55:42 +0000 (23:55 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Dec 2017 23:55:42 +0000 (23:55 +0000)
commit64f22c792e55debf9607feae480778d4c6d8443a
tree7065189f26c5d99dbab8d634cd5b49f2dd22da90
parent47e2560258e5e4e1ffac0d94bfcd29cd0577035c
AX: Document::existingAXObjectCache() should always return the existing AXObjectCache.
https://bugs.webkit.org/show_bug.cgi?id=180548
<rdar://problem/35917755>

Reviewed by Chris Fleizach.

Currently the AX cache becomes unreachable through Document::existingAXObjectCache soon after the render tree is destroyed.
From this point, the Node objects can't deregister themselves from the AX cache anymore. In some cases, it's
redundant/not advised to notify the cache about certain changes when the document is being destroyed, but the
callsites should make that decision.

Covered by existing tests.

* dom/Document.cpp:
(WebCore::Document::existingAXObjectCacheSlow const):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::takeChildInternal):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/rendering/RenderElement.cpp