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

Unified Diff: content/browser/accessibility/browser_accessibility.cc

Issue 1221003003: Revert of Fix accessibility with out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/accessibility/site_per_process_accessibility_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « no previous file | content/browser/accessibility/site_per_process_accessibility_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698