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

Unified Diff: ui/accessibility/ax_tree_combiner.cc

Issue 2684543002: Finish implementation and tests of 5 ARIA 1.1 attributes. (Closed)
Patch Set: Update expectations Created 3 years, 10 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 | « ui/accessibility/ax_node_data.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_tree_combiner.cc
diff --git a/ui/accessibility/ax_tree_combiner.cc b/ui/accessibility/ax_tree_combiner.cc
index b36f0d02ecc8174acbe4620af350d5d1e61a24c9..ae7365243b4bccbc9bc9d605cbf695fcf862567d 100644
--- a/ui/accessibility/ax_tree_combiner.cc
+++ b/ui/accessibility/ax_tree_combiner.cc
@@ -7,102 +7,6 @@
#include "ui/gfx/geometry/rect_f.h"
namespace ui {
-namespace {
-
-// Return true if |attr| is a node ID that would need to be mapped when
-// renumbering the ids in a combined tree.
-bool IsNodeIdIntAttribute(AXIntAttribute attr) {
- switch (attr) {
- case AX_ATTR_ACTIVEDESCENDANT_ID:
- case AX_ATTR_MEMBER_OF_ID:
- case AX_ATTR_NEXT_ON_LINE_ID:
- case AX_ATTR_PREVIOUS_ON_LINE_ID:
- case AX_ATTR_TABLE_HEADER_ID:
- case AX_ATTR_TABLE_COLUMN_HEADER_ID:
- case AX_ATTR_TABLE_ROW_HEADER_ID:
- return true;
-
- // Note: all of the attributes are included here explicitly,
- // rather than using "default:", so that it's a compiler error to
- // add a new attribute without explicitly considering whether it's
- // a node id attribute or not.
- case AX_INT_ATTRIBUTE_NONE:
- case AX_ATTR_ACTION:
- case AX_ATTR_SCROLL_X:
- case AX_ATTR_SCROLL_X_MIN:
- case AX_ATTR_SCROLL_X_MAX:
- case AX_ATTR_SCROLL_Y:
- case AX_ATTR_SCROLL_Y_MIN:
- case AX_ATTR_SCROLL_Y_MAX:
- case AX_ATTR_TEXT_SEL_START:
- case AX_ATTR_TEXT_SEL_END:
- case AX_ATTR_TABLE_ROW_COUNT:
- case AX_ATTR_TABLE_COLUMN_COUNT:
- case AX_ATTR_TABLE_ROW_INDEX:
- case AX_ATTR_TABLE_COLUMN_INDEX:
- case AX_ATTR_TABLE_CELL_COLUMN_INDEX:
- case AX_ATTR_TABLE_CELL_COLUMN_SPAN:
- case AX_ATTR_TABLE_CELL_ROW_INDEX:
- case AX_ATTR_TABLE_CELL_ROW_SPAN:
- case AX_ATTR_SORT_DIRECTION:
- case AX_ATTR_HIERARCHICAL_LEVEL:
- case AX_ATTR_NAME_FROM:
- case AX_ATTR_DESCRIPTION_FROM:
- case AX_ATTR_CHILD_TREE_ID:
- case AX_ATTR_SET_SIZE:
- case AX_ATTR_POS_IN_SET:
- case AX_ATTR_COLOR_VALUE:
- case AX_ATTR_ARIA_CURRENT_STATE:
- case AX_ATTR_BACKGROUND_COLOR:
- case AX_ATTR_COLOR:
- case AX_ATTR_INVALID_STATE:
- case AX_ATTR_TEXT_DIRECTION:
- case AX_ATTR_TEXT_STYLE:
- case AX_ATTR_ARIA_COL_COUNT:
- case AX_ATTR_ARIA_COL_INDEX:
- case AX_ATTR_ARIA_ROW_COUNT:
- case AX_ATTR_ARIA_ROW_INDEX:
- return false;
- }
-
- NOTREACHED();
- return false;
-}
-
-// Return true if |attr| contains a vector of node ids that would need
-// to be mapped when renumbering the ids in a combined tree.
-bool IsNodeIdIntListAttribute(AXIntListAttribute attr) {
- switch (attr) {
- case AX_ATTR_CELL_IDS:
- case AX_ATTR_CONTROLS_IDS:
- case AX_ATTR_DESCRIBEDBY_IDS:
- case AX_ATTR_FLOWTO_IDS:
- case AX_ATTR_INDIRECT_CHILD_IDS:
- case AX_ATTR_LABELLEDBY_IDS:
- case AX_ATTR_UNIQUE_CELL_IDS:
- return true;
-
- // Note: all of the attributes are included here explicitly,
- // rather than using "default:", so that it's a compiler error to
- // add a new attribute without explicitly considering whether it's
- // a node id attribute or not.
- case AX_INT_LIST_ATTRIBUTE_NONE:
- case AX_ATTR_LINE_BREAKS:
- case AX_ATTR_MARKER_TYPES:
- case AX_ATTR_MARKER_STARTS:
- case AX_ATTR_MARKER_ENDS:
- case AX_ATTR_CHARACTER_OFFSETS:
- case AX_ATTR_CACHED_LINE_STARTS:
- case AX_ATTR_WORD_STARTS:
- case AX_ATTR_WORD_ENDS:
- return false;
- }
-
- NOTREACHED();
- return false;
-}
-
-} // namespace
AXTreeCombiner::AXTreeCombiner() {
}
« no previous file with comments | « ui/accessibility/ax_node_data.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698