| 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 18 matching lines...) Expand all Loading... |
| 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" | 35 #include "platform/Timer.h" |
| 36 #include "wtf/Forward.h" | 36 #include "wtf/Forward.h" |
| 37 #include "wtf/HashMap.h" | 37 #include "wtf/HashMap.h" |
| 38 #include "wtf/HashSet.h" | 38 #include "wtf/HashSet.h" |
| 39 #include "wtf/MakeCancellable.h" |
| 39 #include <memory> | 40 #include <memory> |
| 40 | 41 |
| 41 namespace blink { | 42 namespace blink { |
| 42 | 43 |
| 43 class AbstractInlineTextBox; | 44 class AbstractInlineTextBox; |
| 44 class HTMLAreaElement; | 45 class HTMLAreaElement; |
| 45 class FrameView; | 46 class FrameView; |
| 46 | 47 |
| 47 // This class should only be used from inside the accessibility directory. | 48 // This class should only be used from inside the accessibility directory. |
| 48 class MODULES_EXPORT AXObjectCacheImpl : public AXObjectCache { | 49 class MODULES_EXPORT AXObjectCacheImpl : public AXObjectCache { |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // of its children. This is *unvalidated*, it includes ids that may not curr
ently | 224 // of its children. This is *unvalidated*, it includes ids that may not curr
ently |
| 224 // exist in the tree. | 225 // exist in the tree. |
| 225 HashMap<AXID, HashSet<String>> m_ariaOwnerToIdsMapping; | 226 HashMap<AXID, HashSet<String>> m_ariaOwnerToIdsMapping; |
| 226 | 227 |
| 227 // Map from an ID (the ID attribute of a DOM element) to the set of elements
that | 228 // Map from an ID (the ID attribute of a DOM element) to the set of elements
that |
| 228 // want to own that ID. This is *unvalidated*, it includes possible duplicat
es. | 229 // want to own that ID. This is *unvalidated*, it includes possible duplicat
es. |
| 229 // This is used so that when an element with an ID is added to the tree or c
hanges | 230 // This is used so that when an element with an ID is added to the tree or c
hanges |
| 230 // its ID, we can quickly determine if it affects an aria-owns relationship. | 231 // its ID, we can quickly determine if it affects an aria-owns relationship. |
| 231 HashMap<String, std::unique_ptr<HashSet<AXID>>> m_idToAriaOwnersMapping; | 232 HashMap<String, std::unique_ptr<HashSet<AXID>>> m_idToAriaOwnersMapping; |
| 232 | 233 |
| 233 Timer<AXObjectCacheImpl> m_notificationPostTimer; | 234 WTF::ScopedFunctionCanceller m_notificationPostCanceller; |
| 234 HeapVector<std::pair<Member<AXObject>, AXNotification>> m_notificationsToPos
t; | 235 HeapVector<std::pair<Member<AXObject>, AXNotification>> m_notificationsToPos
t; |
| 235 void notificationPostTimerFired(TimerBase*); | 236 void postNotificationsNow(); |
| 236 | 237 |
| 237 AXObject* focusedImageMapUIElement(HTMLAreaElement*); | 238 AXObject* focusedImageMapUIElement(HTMLAreaElement*); |
| 238 | 239 |
| 239 AXID getAXID(AXObject*); | 240 AXID getAXID(AXObject*); |
| 240 | 241 |
| 241 void textChanged(Node*); | 242 void textChanged(Node*); |
| 242 bool nodeIsTextControl(const Node*); | 243 bool nodeIsTextControl(const Node*); |
| 243 | 244 |
| 244 Settings* settings(); | 245 Settings* settings(); |
| 245 }; | 246 }; |
| 246 | 247 |
| 247 // This is the only subclass of AXObjectCache. | 248 // This is the only subclass of AXObjectCache. |
| 248 DEFINE_TYPE_CASTS(AXObjectCacheImpl, AXObjectCache, cache, true, true); | 249 DEFINE_TYPE_CASTS(AXObjectCacheImpl, AXObjectCache, cache, true, true); |
| 249 | 250 |
| 250 bool nodeHasRole(Node*, const String& role); | 251 bool nodeHasRole(Node*, const String& role); |
| 251 // This will let you know if aria-hidden was explicitly set to false. | 252 // This will let you know if aria-hidden was explicitly set to false. |
| 252 bool isNodeAriaVisible(Node*); | 253 bool isNodeAriaVisible(Node*); |
| 253 | 254 |
| 254 } // namespace blink | 255 } // namespace blink |
| 255 | 256 |
| 256 #endif | 257 #endif |
| OLD | NEW |