Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: Source/core/accessibility/AXObjectCache.h

Issue 22331005: Clean up accessibility enums for use in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add forgotten file back Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010, 2011 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 AXID platformGenerateAXID() const; 144 AXID platformGenerateAXID() const;
145 AccessibilityObject* objectFromAXID(AXID id) const { return m_objects.get(id ); } 145 AccessibilityObject* objectFromAXID(AXID id) const { return m_objects.get(id ); }
146 146
147 // Text marker utilities. 147 // Text marker utilities.
148 void textMarkerDataForVisiblePosition(TextMarkerData&, const VisiblePosition &); 148 void textMarkerDataForVisiblePosition(TextMarkerData&, const VisiblePosition &);
149 VisiblePosition visiblePositionForTextMarkerData(TextMarkerData&); 149 VisiblePosition visiblePositionForTextMarkerData(TextMarkerData&);
150 150
151 enum AXNotification { 151 enum AXNotification {
152 AXActiveDescendantChanged, 152 AXActiveDescendantChanged,
153 AXAlert,
154 AXAriaAttributeChanged,
153 AXAutocorrectionOccured, 155 AXAutocorrectionOccured,
156 AXBlur,
154 AXCheckedStateChanged, 157 AXCheckedStateChanged,
155 AXChildrenChanged, 158 AXChildrenChanged,
156 AXFocusedUIElementChanged, 159 AXFocusedUIElementChanged,
160 AXHide,
161 AXInvalidStatusChanged,
157 AXLayoutComplete, 162 AXLayoutComplete,
163 AXLiveRegionChanged,
158 AXLoadComplete, 164 AXLoadComplete,
165 AXLocationChanged,
166 AXMenuListItemSelected,
167 AXMenuListValueChanged,
168 AXRowCollapsed,
169 AXRowCountChanged,
170 AXRowExpanded,
171 AXScrolledToAnchor,
159 AXSelectedChildrenChanged, 172 AXSelectedChildrenChanged,
160 AXSelectedTextChanged, 173 AXSelectedTextChanged,
161 AXValueChanged, 174 AXShow,
162 AXScrolledToAnchor,
163 AXLiveRegionChanged,
164 AXMenuListItemSelected,
165 AXMenuListValueChanged,
166 AXRowCountChanged,
167 AXRowCollapsed,
168 AXRowExpanded,
169 AXInvalidStatusChanged,
170 AXTextChanged, 175 AXTextChanged,
171 AXAriaAttributeChanged 176 AXTextInserted,
177 AXTextRemoved,
178 AXValueChanged
172 }; 179 };
173 180
174 void postNotification(RenderObject*, AXNotification, bool postToElement, Pos tType = PostAsynchronously); 181 void postNotification(RenderObject*, AXNotification, bool postToElement, Pos tType = PostAsynchronously);
175 void postNotification(Node*, AXNotification, bool postToElement, PostType = PostAsynchronously); 182 void postNotification(Node*, AXNotification, bool postToElement, PostType = PostAsynchronously);
176 void postNotification(AccessibilityObject*, Document*, AXNotification, bool postToElement, PostType = PostAsynchronously); 183 void postNotification(AccessibilityObject*, Document*, AXNotification, bool postToElement, PostType = PostAsynchronously);
177 184
178 enum AXTextChange {
179 AXTextInserted,
180 AXTextDeleted,
181 };
182
183 void nodeTextChangeNotification(Node*, AXTextChange, unsigned offset, const String&);
184 bool nodeHasRole(Node*, const AtomicString& role); 185 bool nodeHasRole(Node*, const AtomicString& role);
185 186
186 void startCachingComputedObjectAttributesUntilTreeMutates(); 187 void startCachingComputedObjectAttributesUntilTreeMutates();
187 void stopCachingComputedObjectAttributes(); 188 void stopCachingComputedObjectAttributes();
188 189
189 AXComputedObjectAttributeCache* computedObjectAttributeCache() { return m_co mputedObjectAttributeCache.get(); } 190 AXComputedObjectAttributeCache* computedObjectAttributeCache() { return m_co mputedObjectAttributeCache.get(); }
190 191
191 protected: 192 protected:
192 void postPlatformNotification(AccessibilityObject*, AXNotification); 193 void postPlatformNotification(AccessibilityObject*, AXNotification);
193 void nodeTextChangePlatformNotification(AccessibilityObject*, AXTextChange, unsigned offset, const String&);
194 void textChanged(AccessibilityObject*); 194 void textChanged(AccessibilityObject*);
195 void labelChanged(Element*); 195 void labelChanged(Element*);
196 196
197 // This is a weak reference cache for knowing if Nodes used by TextMarkers a re valid. 197 // This is a weak reference cache for knowing if Nodes used by TextMarkers a re valid.
198 void setNodeInUse(Node* n) { m_textMarkerNodes.add(n); } 198 void setNodeInUse(Node* n) { m_textMarkerNodes.add(n); }
199 void removeNodeForUse(Node* n) { m_textMarkerNodes.remove(n); } 199 void removeNodeForUse(Node* n) { m_textMarkerNodes.remove(n); }
200 bool isNodeInUse(Node* n) { return m_textMarkerNodes.contains(n); } 200 bool isNodeInUse(Node* n) { return m_textMarkerNodes.contains(n); }
201 201
202 private: 202 private:
203 Document* m_document; 203 Document* m_document;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 inline void AXObjectCache::remove(RenderObject*) { } 272 inline void AXObjectCache::remove(RenderObject*) { }
273 inline void AXObjectCache::remove(Node*) { } 273 inline void AXObjectCache::remove(Node*) { }
274 inline void AXObjectCache::remove(Widget*) { } 274 inline void AXObjectCache::remove(Widget*) { }
275 inline void AXObjectCache::selectedChildrenChanged(RenderObject*) { } 275 inline void AXObjectCache::selectedChildrenChanged(RenderObject*) { }
276 inline void AXObjectCache::selectedChildrenChanged(Node*) { } 276 inline void AXObjectCache::selectedChildrenChanged(Node*) { }
277 #endif 277 #endif
278 278
279 } 279 }
280 280
281 #endif 281 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698