Commit fc48b8dd authored by Alexander Surkov's avatar Alexander Surkov Committed by Commit Bot

dumpacctree testsuite: children property shall not be exposed in

the formatted tree

Correct implementation of
https://chromium-review.googlesource.com/c/chromium/src/+/2412192:
* optimal since children are not populated and not appended into
a tree dictionary structure
* clean because all logic is kept by tree formatter

Bug: n/a
Change-Id: Ic4108c407d6f6d9b4786dd188efbd57b4648684d
AX-Relnotes: n/a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2481762Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Alexander Surkov <asurkov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#818605}
parent 8539e492
...@@ -498,7 +498,13 @@ std::string AccessibilityTreeFormatterMac::ProcessTreeForOutput( ...@@ -498,7 +498,13 @@ std::string AccessibilityTreeFormatterMac::ProcessTreeForOutput(
continue; continue;
} }
// Special processing for position and size. // Special case: children.
// Children are used to generate the tree
// itself, thus no sense to expose them on each node.
if (item.first == kChildrenDictAttr) {
continue;
}
// Special case: position.
if (item.first == kPositionDictAttr) { if (item.first == kPositionDictAttr) {
WriteAttribute(false, WriteAttribute(false,
FormatCoordinates( FormatCoordinates(
...@@ -507,6 +513,7 @@ std::string AccessibilityTreeFormatterMac::ProcessTreeForOutput( ...@@ -507,6 +513,7 @@ std::string AccessibilityTreeFormatterMac::ProcessTreeForOutput(
&line); &line);
continue; continue;
} }
// Special case: size.
if (item.first == kSizeDictAttr) { if (item.first == kSizeDictAttr) {
WriteAttribute( WriteAttribute(
false, false,
......
...@@ -83,9 +83,6 @@ std::vector<ui::AXPropertyFilter> AXTreeServer::GetPropertyFilters( ...@@ -83,9 +83,6 @@ std::vector<ui::AXPropertyFilter> AXTreeServer::GetPropertyFilters(
if (filters_path.empty()) { if (filters_path.empty()) {
return { return {
ui::AXPropertyFilter("*", ui::AXPropertyFilter::ALLOW), ui::AXPropertyFilter("*", ui::AXPropertyFilter::ALLOW),
#if defined(OS_MAC)
ui::AXPropertyFilter("children", ui::AXPropertyFilter::DENY),
#endif
}; };
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment