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

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

Issue 2408843002: Use BrowserAccessibility::GetClosestPlatformObject consistently (Closed)
Patch Set: Created 4 years, 2 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/browser_accessibility_manager_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/browser_accessibility_manager.cc
diff --git a/content/browser/accessibility/browser_accessibility_manager.cc b/content/browser/accessibility/browser_accessibility_manager.cc
index b3d3668035e6477cb81ac81b34f3abb576c2f3bc..1a7a340fd767a8778cc1ffa448e8457cebbc5219 100644
--- a/content/browser/accessibility/browser_accessibility_manager.cc
+++ b/content/browser/accessibility/browser_accessibility_manager.cc
@@ -470,12 +470,7 @@ void BrowserAccessibilityManager::ActivateFindInPageResult(
return;
// If an ancestor of this node is a leaf node, fire the notification on that.
- BrowserAccessibility* ancestor = node->GetParent();
- while (ancestor && ancestor != GetRoot()) {
- if (ancestor->PlatformIsLeaf())
- node = ancestor;
- ancestor = ancestor->GetParent();
- }
+ node = node->GetClosestPlatformObject();
// The "scrolled to anchor" notification is a great way to get a
// screen reader to jump directly to a specific location in a document.
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698