summaryrefslogtreecommitdiffstats
path: root/content/browser/accessibility/browser_accessibility_manager_android.cc
diff options
context:
space:
mode:
authordmazzoni <dmazzoni@chromium.org>2014-10-16 16:31:55 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-16 23:32:23 +0000
commitb46a0cf36cb6eaee8bd8bae17ceb227a5bb8ad92 (patch)
treee4ff33b067d6ae0b895af1260a9ba8e7bc08a133 /content/browser/accessibility/browser_accessibility_manager_android.cc
parent05d3a41400d281475aeeda8570be6006dd73ce6c (diff)
downloadchromium_src-b46a0cf36cb6eaee8bd8bae17ceb227a5bb8ad92.zip
chromium_src-b46a0cf36cb6eaee8bd8bae17ceb227a5bb8ad92.tar.gz
chromium_src-b46a0cf36cb6eaee8bd8bae17ceb227a5bb8ad92.tar.bz2
Fix Android hit testing in a totally static page.
Our Android hit testing walks up the tree and returns the highest ancestor that's either (1) a leaf node, or (2) focusable and doesn't have focusable children. The bug is that (2) shouldn't include the root element of the tree, which is indeed focusable. If there are no focusable elements on the page, we don't want all hit tests to return the root - we want them to return the original object hit. BUG=424350 Review URL: https://codereview.chromium.org/665513002 Cr-Commit-Position: refs/heads/master@{#300007}
Diffstat (limited to 'content/browser/accessibility/browser_accessibility_manager_android.cc')
-rw-r--r--content/browser/accessibility/browser_accessibility_manager_android.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/content/browser/accessibility/browser_accessibility_manager_android.cc b/content/browser/accessibility/browser_accessibility_manager_android.cc
index 678bd69..3a31ff7 100644
--- a/content/browser/accessibility/browser_accessibility_manager_android.cc
+++ b/content/browser/accessibility/browser_accessibility_manager_android.cc
@@ -415,7 +415,7 @@ void BrowserAccessibilityManagerAndroid::HandleHoverEvent(
BrowserAccessibilityAndroid* ancestor =
static_cast<BrowserAccessibilityAndroid*>(node->GetParent());
- while (ancestor) {
+ while (ancestor && ancestor != GetRoot()) {
if (ancestor->PlatformIsLeaf() ||
(ancestor->IsFocusable() && !ancestor->HasFocusableChild())) {
node = ancestor;