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

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

Issue 2860883003: A11y: Add/refactor methods for manipulating bitfields on AXNodeData. (Closed)
Patch Set: Delete AXNodeData::Init() and clear bitfields in AXNodeData() instead. Created 3 years, 7 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 #include <iterator> 10 #include <iterator>
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 if (GetIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_SPAN, &row_span)) 885 if (GetIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_SPAN, &row_span))
886 return row_span; 886 return row_span;
887 return 1; 887 return 1;
888 } 888 }
889 889
890 base::string16 BrowserAccessibility::GetText() const { 890 base::string16 BrowserAccessibility::GetText() const {
891 return GetInnerText(); 891 return GetInnerText();
892 } 892 }
893 893
894 bool BrowserAccessibility::HasState(ui::AXState state_enum) const { 894 bool BrowserAccessibility::HasState(ui::AXState state_enum) const {
895 return (GetState() >> state_enum) & 1; 895 return GetData().HasState(state_enum);
896 } 896 }
897 897
898 bool BrowserAccessibility::IsCellOrTableHeaderRole() const { 898 bool BrowserAccessibility::IsCellOrTableHeaderRole() const {
899 return (GetRole() == ui::AX_ROLE_CELL || 899 return (GetRole() == ui::AX_ROLE_CELL ||
900 GetRole() == ui::AX_ROLE_COLUMN_HEADER || 900 GetRole() == ui::AX_ROLE_COLUMN_HEADER ||
901 GetRole() == ui::AX_ROLE_ROW_HEADER); 901 GetRole() == ui::AX_ROLE_ROW_HEADER);
902 } 902 }
903 903
904 bool BrowserAccessibility::IsTableLikeRole() const { 904 bool BrowserAccessibility::IsTableLikeRole() const {
905 return (GetRole() == ui::AX_ROLE_TABLE || 905 return (GetRole() == ui::AX_ROLE_TABLE ||
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 return gfx::kNullAcceleratedWidget; 1194 return gfx::kNullAcceleratedWidget;
1195 } 1195 }
1196 1196
1197 bool BrowserAccessibility::AccessibilityPerformAction( 1197 bool BrowserAccessibility::AccessibilityPerformAction(
1198 const ui::AXActionData& data) { 1198 const ui::AXActionData& data) {
1199 NOTREACHED(); 1199 NOTREACHED();
1200 return false; 1200 return false;
1201 } 1201 }
1202 1202
1203 } // namespace content 1203 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698