| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014, Google Inc. All rights reserved. | 2 * Copyright (C) 2014, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #ifndef AXObjectCacheImpl_h | 29 #ifndef AXObjectCacheImpl_h |
| 30 #define AXObjectCacheImpl_h | 30 #define AXObjectCacheImpl_h |
| 31 | 31 |
| 32 #include "core/dom/AXObjectCache.h" | 32 #include "core/dom/AXObjectCache.h" |
| 33 #include "modules/ModulesExport.h" | 33 #include "modules/ModulesExport.h" |
| 34 #include "modules/accessibility/AXObject.h" | 34 #include "modules/accessibility/AXObject.h" |
| 35 #include "platform/Timer.h" | |
| 36 #include "wtf/Forward.h" | 35 #include "wtf/Forward.h" |
| 37 #include "wtf/HashMap.h" | 36 #include "wtf/HashMap.h" |
| 38 #include "wtf/HashSet.h" | 37 #include "wtf/HashSet.h" |
| 39 #include <memory> | 38 #include <memory> |
| 40 | 39 |
| 41 namespace blink { | 40 namespace blink { |
| 42 | 41 |
| 43 class AbstractInlineTextBox; | 42 class AbstractInlineTextBox; |
| 44 class HTMLAreaElement; | 43 class HTMLAreaElement; |
| 45 class FrameView; | 44 class FrameView; |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // currently exist in the tree. | 234 // currently exist in the tree. |
| 236 HashMap<AXID, HashSet<String>> m_ariaOwnerToIdsMapping; | 235 HashMap<AXID, HashSet<String>> m_ariaOwnerToIdsMapping; |
| 237 | 236 |
| 238 // Map from an ID (the ID attribute of a DOM element) to the set of elements | 237 // Map from an ID (the ID attribute of a DOM element) to the set of elements |
| 239 // that want to own that ID. This is *unvalidated*, it includes possible | 238 // that want to own that ID. This is *unvalidated*, it includes possible |
| 240 // duplicates. This is used so that when an element with an ID is added to | 239 // duplicates. This is used so that when an element with an ID is added to |
| 241 // the tree or changes its ID, we can quickly determine if it affects an | 240 // the tree or changes its ID, we can quickly determine if it affects an |
| 242 // aria-owns relationship. | 241 // aria-owns relationship. |
| 243 HashMap<String, std::unique_ptr<HashSet<AXID>>> m_idToAriaOwnersMapping; | 242 HashMap<String, std::unique_ptr<HashSet<AXID>>> m_idToAriaOwnersMapping; |
| 244 | 243 |
| 245 Timer<AXObjectCacheImpl> m_notificationPostTimer; | 244 TaskRunnerTimer<AXObjectCacheImpl> m_notificationPostTimer; |
| 246 HeapVector<std::pair<Member<AXObject>, AXNotification>> m_notificationsToPost; | 245 HeapVector<std::pair<Member<AXObject>, AXNotification>> m_notificationsToPost; |
| 247 void notificationPostTimerFired(TimerBase*); | 246 void notificationPostTimerFired(TimerBase*); |
| 248 | 247 |
| 249 AXObject* focusedImageMapUIElement(HTMLAreaElement*); | 248 AXObject* focusedImageMapUIElement(HTMLAreaElement*); |
| 250 | 249 |
| 251 AXID getAXID(AXObject*); | 250 AXID getAXID(AXObject*); |
| 252 | 251 |
| 253 void textChanged(Node*); | 252 void textChanged(Node*); |
| 254 bool nodeIsTextControl(const Node*); | 253 bool nodeIsTextControl(const Node*); |
| 255 | 254 |
| 256 Settings* settings(); | 255 Settings* settings(); |
| 257 }; | 256 }; |
| 258 | 257 |
| 259 // This is the only subclass of AXObjectCache. | 258 // This is the only subclass of AXObjectCache. |
| 260 DEFINE_TYPE_CASTS(AXObjectCacheImpl, AXObjectCache, cache, true, true); | 259 DEFINE_TYPE_CASTS(AXObjectCacheImpl, AXObjectCache, cache, true, true); |
| 261 | 260 |
| 262 bool nodeHasRole(Node*, const String& role); | 261 bool nodeHasRole(Node*, const String& role); |
| 263 // This will let you know if aria-hidden was explicitly set to false. | 262 // This will let you know if aria-hidden was explicitly set to false. |
| 264 bool isNodeAriaVisible(Node*); | 263 bool isNodeAriaVisible(Node*); |
| 265 | 264 |
| 266 } // namespace blink | 265 } // namespace blink |
| 267 | 266 |
| 268 #endif | 267 #endif |
| OLD | NEW |