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

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

Issue 2427813002: Android accessibility should not treat whitespace-only nodes as interesting. (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/one_shot_accessibility_tree_search.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/browser_accessibility_android.cc
diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc
index b0fdd15733f2eeb5abe1999c60577eafd0d80db8..a354b70137605881e8f3c08e34c44f8af6711ed9 100644
--- a/content/browser/accessibility/browser_accessibility_android.cc
+++ b/content/browser/accessibility/browser_accessibility_android.cc
@@ -288,8 +288,9 @@ bool BrowserAccessibilityAndroid::IsInterestingOnAndroid() const {
if (IsControl())
return true;
- // Otherwise, the interesting nodes are leaf nodes with text.
- return PlatformIsLeaf() && !GetText().empty();
+ // Otherwise, the interesting nodes are leaf nodes with non-whitespace text.
+ return PlatformIsLeaf() &&
+ !base::ContainsOnlyChars(GetText(), base::kWhitespaceUTF16);
}
const BrowserAccessibilityAndroid*
« no previous file with comments | « no previous file | content/browser/accessibility/one_shot_accessibility_tree_search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698