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

Unified Diff: Source/modules/accessibility/AXObjectCacheImpl.h

Issue 742353004: Implement computedRole and computedName (behind a flag) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Finished pulling out ScopedAXObjectCache etc. Many fprintfs remain. Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/accessibility/AXObjectCacheImpl.h
diff --git a/Source/modules/accessibility/AXObjectCacheImpl.h b/Source/modules/accessibility/AXObjectCacheImpl.h
index b7d55febad05a2efb6f6a33a25607184558a9fb0..57c6bf56362363a9c8424ca45209760842b287d5 100644
--- a/Source/modules/accessibility/AXObjectCacheImpl.h
+++ b/Source/modules/accessibility/AXObjectCacheImpl.h
@@ -103,6 +103,8 @@ public:
void handleLayoutComplete(RenderObject*) override;
void handleScrolledToAnchor(const Node* anchorNode) override;
+ virtual PublicAXObject* publicAXObjectForNode(Node*) override;
+
// Returns the root object for the entire document.
AXObject* rootObject();
@@ -142,8 +144,6 @@ public:
AXID platformGenerateAXID() const;
- bool nodeHasRole(Node*, const AtomicString& role);
-
// Counts the number of times the document has been modified. Some attribute values are cached
// as long as the modification count hasn't changed.
int modificationCount() const { return m_modificationCount; }
@@ -162,6 +162,10 @@ protected:
void removeNodeForUse(Node* n) { m_textMarkerNodes.remove(n); }
bool isNodeInUse(Node* n) { return m_textMarkerNodes.contains(n); }
+ PassRefPtr<AXObject> createFromRenderer(RenderObject*);
+ PassRefPtr<AXObject> createFromNode(Node*);
+ PassRefPtr<AXObject> createFromInlineTextBox(AbstractInlineTextBox*);
+
private:
Document& m_document;
HashMap<AXID, RefPtr<AXObject> > m_objects;
@@ -191,10 +195,21 @@ private:
// This is the only subclass of AXObjectCache.
DEFINE_TYPE_CASTS(AXObjectCacheImpl, AXObjectCache, cache, true, true);
+class PublicAXObjectImpl : public PublicAXObject {
+public:
+ explicit PublicAXObjectImpl(AXObject*);
+ ~PublicAXObjectImpl();
+
+ virtual const AtomicString& computedRole();
+ virtual const String computedText();
+
+private:
+ RefPtr<AXObject> m_object;
+};
+
bool nodeHasRole(Node*, const String& role);
// This will let you know if aria-hidden was explicitly set to false.
bool isNodeAriaVisible(Node*);
-
}
#endif

Powered by Google App Engine
This is Rietveld 408576698