| Index: Source/modules/accessibility/AXObjectCacheImpl.h
|
| diff --git a/Source/modules/accessibility/AXObjectCacheImpl.h b/Source/modules/accessibility/AXObjectCacheImpl.h
|
| index acff085d22a73ffc4ef977d868ba7a43d8eb3210..2e7213a6e93281ad88eff24ef29209439e15b0d1 100644
|
| --- a/Source/modules/accessibility/AXObjectCacheImpl.h
|
| +++ b/Source/modules/accessibility/AXObjectCacheImpl.h
|
| @@ -55,15 +55,19 @@ struct TextMarkerData {
|
|
|
| // This class should only be used from inside the accessibility directory.
|
| class MODULES_EXPORT AXObjectCacheImpl : public AXObjectCache {
|
| - WTF_MAKE_NONCOPYABLE(AXObjectCacheImpl); WTF_MAKE_FAST_ALLOCATED(AXObjectCacheImpl);
|
| + WTF_MAKE_NONCOPYABLE(AXObjectCacheImpl);
|
| + WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(AXObjectCacheImpl);
|
| public:
|
| - static PassOwnPtr<AXObjectCache> create(Document&);
|
| + static PassOwnPtrWillBeRawPtr<AXObjectCache> create(Document&);
|
|
|
| explicit AXObjectCacheImpl(Document&);
|
| ~AXObjectCacheImpl();
|
| + DECLARE_VIRTUAL_TRACE();
|
|
|
| AXObject* focusedUIElementForPage(const Page*);
|
|
|
| + virtual void dispose() override;
|
| +
|
| virtual void selectionChanged(Node*) override;
|
| virtual void childrenChanged(Node*) override;
|
| virtual void childrenChanged(LayoutObject*) override;
|
| @@ -188,6 +192,38 @@ private:
|
|
|
| HashSet<AXID> m_idsInUse;
|
|
|
| +#if ENABLE(ASSERT)
|
| + // Verified when finalizing.
|
| + bool m_hasBeenDisposed;
|
| +#endif
|
| +
|
| + //
|
| + // Aria-owns
|
| + //
|
| +
|
| + // Map from the AXID of the owner to the AXIDs of the children.
|
| + // This is a validated map, it doesn't contain illegal, duplicate,
|
| + // or cyclical matches, or references to IDs that don't exist.
|
| + HashMap<AXID, Vector<AXID>> m_ariaOwnerToChildrenMapping;
|
| +
|
| + // Map from the AXID of a child to the AXID of the parent that owns it.
|
| + HashMap<AXID, AXID> m_ariaOwnedChildToOwnerMapping;
|
| +
|
| + // Map from the AXID of a child to the AXID of its real parent in the tree if
|
| + // we ignored aria-owns. This is needed in case the owner no longer wants to own it.
|
| + HashMap<AXID, AXID> m_ariaOwnedChildToRealParentMapping;
|
| +
|
| + // Map from the AXID of any object with an aria-owns attribute to the set of ids
|
| + // of its children. This is *unvalidated*, it includes ids that may not currently
|
| + // exist in the tree.
|
| + HashMap<AXID, HashSet<String>> m_ariaOwnerToIdsMapping;
|
| +
|
| + // Map from an ID (the ID attribute of a DOM element) to the set of elements that
|
| + // want to own that ID. This is *unvalidated*, it includes possible duplicates.
|
| + // This is used so that when an element with an ID is added to the tree or changes
|
| + // its ID, we can quickly determine if it affects an aria-owns relationship.
|
| + HashMap<String, OwnPtr<HashSet<AXID>>> m_idToAriaOwnersMapping;
|
| +
|
| Timer<AXObjectCacheImpl> m_notificationPostTimer;
|
| Vector<pair<RefPtr<AXObject>, AXNotification>> m_notificationsToPost;
|
| void notificationPostTimerFired(Timer<AXObjectCacheImpl>*);
|
|
|