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

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

Issue 844273002: Add option to not dump childrens of a node in AX Tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updating expectations Created 5 years, 8 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/test/data/accessibility/html/input-date.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/accessibility_tree_formatter.cc
diff --git a/content/browser/accessibility/accessibility_tree_formatter.cc b/content/browser/accessibility/accessibility_tree_formatter.cc
index 1f56cd47f654d33d3dd4ca0393b4fe3fb686e631..2ca2a8544fd7a8d124873954354325edb792d35a 100644
--- a/content/browser/accessibility/accessibility_tree_formatter.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter.cc
@@ -20,6 +20,7 @@ namespace {
const char kIndentSymbol = '+';
const int kIndentSymbolCount = 2;
const char* kSkipString = "@NO_DUMP";
+const char* kSkipChildren = "@NO_CHILDREN_DUMP";
const char* kChildrenDictAttr = "children";
}
@@ -84,6 +85,9 @@ void AccessibilityTreeFormatter::RecursiveFormatAccessibilityTree(
return;
*contents += line + base::ASCIIToUTF16("\n");
+ if (line.find(base::ASCIIToUTF16(kSkipChildren)) != base::string16::npos)
+ return;
+
const base::ListValue* children;
dict.GetList(kChildrenDictAttr, &children);
const base::DictionaryValue* child_dict;
« no previous file with comments | « no previous file | content/test/data/accessibility/html/input-date.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698