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 "modules/accessibility/InspectorAccessibilityAgent.h" | 5 #include "modules/accessibility/InspectorAccessibilityAgent.h" |
6 | 6 |
7 #include "core/HTMLNames.h" | 7 #include "core/HTMLNames.h" |
8 #include "core/dom/AXObjectCache.h" | 8 #include "core/dom/AXObjectCache.h" |
9 #include "core/dom/DOMNodeIds.h" | 9 #include "core/dom/DOMNodeIds.h" |
10 #include "core/dom/Element.h" | 10 #include "core/dom/Element.h" |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 properties.addItem( | 243 properties.addItem( |
244 createProperty(AXWidgetAttributesEnum::Valuetext, | 244 createProperty(AXWidgetAttributesEnum::Valuetext, |
245 createValue(axObject.valueDescription()))); | 245 createValue(axObject.valueDescription()))); |
246 } | 246 } |
247 } | 247 } |
248 | 248 |
249 void fillWidgetStates(AXObject& axObject, | 249 void fillWidgetStates(AXObject& axObject, |
250 protocol::Array<AXProperty>& properties) { | 250 protocol::Array<AXProperty>& properties) { |
251 AccessibilityRole role = axObject.roleValue(); | 251 AccessibilityRole role = axObject.roleValue(); |
252 if (roleAllowsChecked(role)) { | 252 if (roleAllowsChecked(role)) { |
253 AccessibilityButtonState checked = axObject.checkboxOrRadioValue(); | 253 AccessibilityButtonState checked = axObject.checkedState(); |
254 switch (checked) { | 254 switch (checked) { |
255 case ButtonStateOff: | 255 case ButtonStateOff: |
256 properties.addItem( | 256 properties.addItem( |
257 createProperty(AXWidgetStatesEnum::Checked, | 257 createProperty(AXWidgetStatesEnum::Checked, |
258 createValue("false", AXValueTypeEnum::Tristate))); | 258 createValue("false", AXValueTypeEnum::Tristate))); |
259 break; | 259 break; |
260 case ButtonStateOn: | 260 case ButtonStateOn: |
261 properties.addItem( | 261 properties.addItem( |
262 createProperty(AXWidgetStatesEnum::Checked, | 262 createProperty(AXWidgetStatesEnum::Checked, |
263 createValue("true", AXValueTypeEnum::Tristate))); | 263 createValue("true", AXValueTypeEnum::Tristate))); |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 } | 730 } |
731 } | 731 } |
732 | 732 |
733 DEFINE_TRACE(InspectorAccessibilityAgent) { | 733 DEFINE_TRACE(InspectorAccessibilityAgent) { |
734 visitor->trace(m_page); | 734 visitor->trace(m_page); |
735 visitor->trace(m_domAgent); | 735 visitor->trace(m_domAgent); |
736 InspectorBaseAgent::trace(visitor); | 736 InspectorBaseAgent::trace(visitor); |
737 } | 737 } |
738 | 738 |
739 } // namespace blink | 739 } // namespace blink |
OLD | NEW |