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