OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "modules/accessibility/InspectorAccessibilityAgent.h" | 7 #include "modules/accessibility/InspectorAccessibilityAgent.h" |
8 | 8 |
9 #include "core/dom/AXObjectCache.h" | 9 #include "core/dom/AXObjectCache.h" |
10 #include "core/dom/Element.h" | 10 #include "core/dom/Element.h" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 return role == ColumnHeaderRole || role == RowHeaderRole; | 226 return role == ColumnHeaderRole || role == RowHeaderRole; |
227 } | 227 } |
228 | 228 |
229 bool roleAllowsRangeValues(AccessibilityRole role) | 229 bool roleAllowsRangeValues(AccessibilityRole role) |
230 { | 230 { |
231 return role == ProgressIndicatorRole || role == ScrollBarRole || role == Sli
derRole || role == SpinButtonRole; | 231 return role == ProgressIndicatorRole || role == ScrollBarRole || role == Sli
derRole || role == SpinButtonRole; |
232 } | 232 } |
233 | 233 |
234 bool roleAllowsChecked(AccessibilityRole role) | 234 bool roleAllowsChecked(AccessibilityRole role) |
235 { | 235 { |
236 return role == MenuItemCheckBoxRole || role == MenuItemRadioRole || role ==
RadioButtonRole || role == CheckBoxRole || role == TreeItemRole || role == ListB
oxOptionRole; | 236 return role == MenuItemCheckBoxRole || role == MenuItemRadioRole || role ==
RadioButtonRole || role == CheckBoxRole || role == TreeItemRole || role == ListB
oxOptionRole || role == SwitchRole; |
237 } | 237 } |
238 | 238 |
239 bool roleAllowsSelected(AccessibilityRole role) | 239 bool roleAllowsSelected(AccessibilityRole role) |
240 { | 240 { |
241 return role == CellRole || role == ListBoxOptionRole || role == RowRole || r
ole == TabRole || role == ColumnHeaderRole || role == MenuItemRadioRole || role
== RadioButtonRole || role == RowHeaderRole || role == TreeItemRole; | 241 return role == CellRole || role == ListBoxOptionRole || role == RowRole || r
ole == TabRole || role == ColumnHeaderRole || role == MenuItemRadioRole || role
== RadioButtonRole || role == RowHeaderRole || role == TreeItemRole; |
242 } | 242 } |
243 | 243 |
244 void fillWidgetProperties(AXObject* axObject, PassRefPtr<TypeBuilder::Array<AXPr
operty>> properties) | 244 void fillWidgetProperties(AXObject* axObject, PassRefPtr<TypeBuilder::Array<AXPr
operty>> properties) |
245 { | 245 { |
246 AccessibilityRole role = axObject->roleValue(); | 246 AccessibilityRole role = axObject->roleValue(); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 accessibilityNode = buildObjectForNode(element, axObject, cacheImpl, propert
ies); | 436 accessibilityNode = buildObjectForNode(element, axObject, cacheImpl, propert
ies); |
437 } | 437 } |
438 | 438 |
439 DEFINE_TRACE(InspectorAccessibilityAgent) | 439 DEFINE_TRACE(InspectorAccessibilityAgent) |
440 { | 440 { |
441 visitor->trace(m_page); | 441 visitor->trace(m_page); |
442 InspectorBaseAgent::trace(visitor); | 442 InspectorBaseAgent::trace(visitor); |
443 } | 443 } |
444 | 444 |
445 } // namespace blink | 445 } // namespace blink |
OLD | NEW |