| Index: content/browser/accessibility/browser_accessibility.cc
|
| diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc
|
| index a5b7edc7cb8235ff1024d3e82b43805a8514c109..9d4fe101afc599be1f15caf17a87cdfc0a74103b 100644
|
| --- a/content/browser/accessibility/browser_accessibility.cc
|
| +++ b/content/browser/accessibility/browser_accessibility.cc
|
| @@ -60,14 +60,6 @@
|
| }
|
|
|
| uint32 BrowserAccessibility::PlatformChildCount() const {
|
| - if (GetBoolAttribute(ui::AX_ATTR_IS_AX_TREE_HOST)) {
|
| - // Check if the child frame currently exists.
|
| - if (manager_->delegate()->AccessibilityGetChildFrame(GetId()))
|
| - return 1;
|
| -
|
| - return 0;
|
| - }
|
| -
|
| return PlatformIsLeaf() ? 0 : InternalChildCount();
|
| }
|
|
|
| @@ -88,16 +80,14 @@
|
|
|
| BrowserAccessibility* BrowserAccessibility::PlatformGetChild(
|
| uint32 child_index) const {
|
| - DCHECK(child_index < PlatformChildCount());
|
| - BrowserAccessibility* result = nullptr;
|
| -
|
| - if (GetBoolAttribute(ui::AX_ATTR_IS_AX_TREE_HOST)) {
|
| + DCHECK(child_index < InternalChildCount());
|
| + BrowserAccessibility* result = InternalGetChild(child_index);
|
| +
|
| + if (result->HasBoolAttribute(ui::AX_ATTR_IS_AX_TREE_HOST)) {
|
| BrowserAccessibilityManager* child_manager =
|
| - manager_->delegate()->AccessibilityGetChildFrame(GetId());
|
| + manager_->delegate()->AccessibilityGetChildFrame(result->GetId());
|
| if (child_manager)
|
| result = child_manager->GetRoot();
|
| - } else {
|
| - result = InternalGetChild(child_index);
|
| }
|
|
|
| return result;
|
| @@ -160,7 +150,7 @@
|
| if (!host_node)
|
| return NULL;
|
|
|
| - return host_node;
|
| + return host_node->GetParent();
|
| }
|
|
|
| int32 BrowserAccessibility::GetIndexInParent() const {
|
|
|