Be more strict when performing rect-based sorting
On further scrutiny of the Android codebase, the following constraints get used to identify |IsAccessibilityFocusable|, which gets used to decide whether a node contributes to the computed bounds of a node or not. Any of these conditions makes a node "accessibility focusable", used here to mean "should use its rect" when sorting for child ordering - actionable nodes - top level scrollables with text In ARC++, we cannot seem to rely entirely upon replicating the exact logic, but keep the spirit of what is meant. To that end, we want to sort nodes by layout. This change gets much closer to what we want by: - allowing computed bounds to be empty (meaning it has no meaningful content). In these cases, we simply rely upon tree ordering - be very conservative when using a node's bounds. Only actionable nodes should matter. This potentially misses non-focusable nodes with text, or non-clickable nodes with text. However, mis-sorting a node is much much worse. This change does not consider virtual hierarchies, which should likely not trigger reodering, since an author has explicit contorl over child ordering in those cases. Change-Id: Iacffc5f2d88b6d52b732dadda8a01fd735665018 Reviewed-on: https://chromium-review.googlesource.com/989657 Commit-Queue: David Tseng <dtseng@chromium.org> Reviewed-by:Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#547790}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment