| Index: Source/modules/accessibility/AXObjectCacheImpl.cpp
|
| diff --git a/Source/modules/accessibility/AXObjectCacheImpl.cpp b/Source/modules/accessibility/AXObjectCacheImpl.cpp
|
| index ab190e195d09f9c58ed60f5fc7aa43aeaeab8063..5abafb35ee99d89ab4dc117674a814523716031f 100644
|
| --- a/Source/modules/accessibility/AXObjectCacheImpl.cpp
|
| +++ b/Source/modules/accessibility/AXObjectCacheImpl.cpp
|
| @@ -1074,6 +1074,50 @@ 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::computedNameForNode(Node* node)
|
| +{
|
| + AXObject* obj = getOrCreate(node);
|
| + if (!obj)
|
| + return "";
|
| +
|
| + String title = obj->title();
|
| +
|
| + String titleUIText;
|
| + if (title.isEmpty()) {
|
| + AXObject* titleUIElement = obj->titleUIElement();
|
| + if (titleUIElement) {
|
| + titleUIText = titleUIElement->textUnderElement();
|
| + if (!titleUIText.isEmpty())
|
| + return titleUIText;
|
| + }
|
| + }
|
| +
|
| + String description = obj->accessibilityDescription();
|
| + if (!description.isEmpty())
|
| + return description;
|
| +
|
| + if (!title.isEmpty())
|
| + return title;
|
| +
|
| + String placeholder;
|
| + if (isHTMLInputElement(node)) {
|
| + HTMLInputElement* element = toHTMLInputElement(node);
|
| + placeholder = element->strippedPlaceholder();
|
| + if (!placeholder.isEmpty())
|
| + return placeholder;
|
| + }
|
| +
|
| + return String();
|
| +}
|
| +
|
| void AXObjectCacheImpl::setCanvasObjectBounds(Element* element, const LayoutRect& rect)
|
| {
|
| AXObject* obj = getOrCreate(element);
|
|
|