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

Side by Side Diff: content/browser/accessibility/browser_accessibility.cc

Issue 2539503003: ARIA 1.1: implementation for aria-col-* and aria-row-*. (Closed)
Patch Set: Fix bad rebase Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/accessibility/browser_accessibility.h" 5 #include "content/browser/accessibility/browser_accessibility.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 bool BrowserAccessibility::HasState(ui::AXState state_enum) const { 984 bool BrowserAccessibility::HasState(ui::AXState state_enum) const {
985 return (GetState() >> state_enum) & 1; 985 return (GetState() >> state_enum) & 1;
986 } 986 }
987 987
988 bool BrowserAccessibility::IsCellOrTableHeaderRole() const { 988 bool BrowserAccessibility::IsCellOrTableHeaderRole() const {
989 return (GetRole() == ui::AX_ROLE_CELL || 989 return (GetRole() == ui::AX_ROLE_CELL ||
990 GetRole() == ui::AX_ROLE_COLUMN_HEADER || 990 GetRole() == ui::AX_ROLE_COLUMN_HEADER ||
991 GetRole() == ui::AX_ROLE_ROW_HEADER); 991 GetRole() == ui::AX_ROLE_ROW_HEADER);
992 } 992 }
993 993
994 bool BrowserAccessibility::IsTableOrGridOrTreeGridRole() const {
995 return (GetRole() == ui::AX_ROLE_TABLE ||
996 GetRole() == ui::AX_ROLE_GRID ||
997 GetRole() == ui::AX_ROLE_TREE_GRID);
998 }
999
994 bool BrowserAccessibility::HasCaret() const { 1000 bool BrowserAccessibility::HasCaret() const {
995 if (IsSimpleTextControl() && HasIntAttribute(ui::AX_ATTR_TEXT_SEL_START) && 1001 if (IsSimpleTextControl() && HasIntAttribute(ui::AX_ATTR_TEXT_SEL_START) &&
996 HasIntAttribute(ui::AX_ATTR_TEXT_SEL_END)) { 1002 HasIntAttribute(ui::AX_ATTR_TEXT_SEL_END)) {
997 return true; 1003 return true;
998 } 1004 }
999 1005
1000 // The caret is always at the focus of the selection. 1006 // The caret is always at the focus of the selection.
1001 int32_t focus_id = manager()->GetTreeData().sel_focus_object_id; 1007 int32_t focus_id = manager()->GetTreeData().sel_focus_object_id;
1002 BrowserAccessibility* focus_object = manager()->GetFromID(focus_id); 1008 BrowserAccessibility* focus_object = manager()->GetFromID(focus_id);
1003 if (!focus_object) 1009 if (!focus_object)
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 } 1232 }
1227 } 1233 }
1228 1234
1229 node = container; 1235 node = container;
1230 } 1236 }
1231 1237
1232 return gfx::ToEnclosingRect(bounds); 1238 return gfx::ToEnclosingRect(bounds);
1233 } 1239 }
1234 1240
1235 } // namespace content 1241 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility.h ('k') | content/browser/accessibility/browser_accessibility_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698