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

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

Issue 742353004: Implement computedRole and computedName (behind a flag) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Set upstream correctly 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.cpp
diff --git a/Source/modules/accessibility/AXObjectCacheImpl.cpp b/Source/modules/accessibility/AXObjectCacheImpl.cpp
index ab190e195d09f9c58ed60f5fc7aa43aeaeab8063..f7af916bc19fcf9fd9df60b93d3dd929959383a7 100644
--- a/Source/modules/accessibility/AXObjectCacheImpl.cpp
+++ b/Source/modules/accessibility/AXObjectCacheImpl.cpp
@@ -1074,6 +1074,22 @@ void AXObjectCacheImpl::handleScrollPositionChanged(RenderObject* renderObject)
postPlatformNotification(getOrCreate(renderObject), AXScrollPositionChanged);
}
+const AtomicString& AXObjectCacheImpl::computedRoleForNode(Node* node)
+{
+ AXObject* obj = getOrCreate(node);
+ if (!obj)
+ return AXObject::roleName(UnknownRole);
+ return AXObject::roleName(obj->roleValue());
+}
+
+String AXObjectCacheImpl::computedTextForNode(Node* node)
+{
+ AXObject* obj = getOrCreate(node);
+ if (!obj)
+ return "";
+ return obj->title();
+}
+
void AXObjectCacheImpl::setCanvasObjectBounds(Element* element, const LayoutRect& rect)
{
AXObject* obj = getOrCreate(element);
« Source/modules/accessibility/AXObject.cpp ('K') | « Source/modules/accessibility/AXObjectCacheImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698