| 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/DOMNodeIds.h" |
| 10 #include "core/dom/Element.h" | 11 #include "core/dom/Element.h" |
| 11 #include "core/inspector/InspectorDOMAgent.h" | 12 #include "core/inspector/InspectorDOMAgent.h" |
| 12 #include "core/inspector/InspectorNodeIds.h" | |
| 13 #include "core/inspector/InspectorState.h" | 13 #include "core/inspector/InspectorState.h" |
| 14 #include "core/inspector/InspectorStyleSheet.h" | 14 #include "core/inspector/InspectorStyleSheet.h" |
| 15 #include "core/page/Page.h" | 15 #include "core/page/Page.h" |
| 16 #include "modules/accessibility/AXObject.h" | 16 #include "modules/accessibility/AXObject.h" |
| 17 #include "modules/accessibility/AXObjectCacheImpl.h" | 17 #include "modules/accessibility/AXObjectCacheImpl.h" |
| 18 #include "platform/JSONValues.h" | 18 #include "platform/JSONValues.h" |
| 19 | 19 |
| 20 namespace blink { | 20 namespace blink { |
| 21 | 21 |
| 22 using TypeBuilder::Accessibility::AXGlobalStates; | 22 using TypeBuilder::Accessibility::AXGlobalStates; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 RefPtr<AXValue> axValue = AXValue::create().setType(type); | 92 RefPtr<AXValue> axValue = AXValue::create().setType(type); |
| 93 axValue->setValue(JSONBasicValue::create(value)); | 93 axValue->setValue(JSONBasicValue::create(value)); |
| 94 return axValue; | 94 return axValue; |
| 95 } | 95 } |
| 96 | 96 |
| 97 PassRefPtr<AXRelatedNode> relatedNodeForAXObject(const AXObject* axObject) | 97 PassRefPtr<AXRelatedNode> relatedNodeForAXObject(const AXObject* axObject) |
| 98 { | 98 { |
| 99 Node* node = axObject->node(); | 99 Node* node = axObject->node(); |
| 100 if (!node) | 100 if (!node) |
| 101 return PassRefPtr<AXRelatedNode>(); | 101 return PassRefPtr<AXRelatedNode>(); |
| 102 int backendNodeId = InspectorNodeIds::idForNode(node); | 102 int backendNodeId = DOMNodeIds::idForNode(node); |
| 103 if (!backendNodeId) | 103 if (!backendNodeId) |
| 104 return PassRefPtr<AXRelatedNode>(); | 104 return PassRefPtr<AXRelatedNode>(); |
| 105 RefPtr<AXRelatedNode> relatedNode = AXRelatedNode::create().setBackendNodeId
(backendNodeId); | 105 RefPtr<AXRelatedNode> relatedNode = AXRelatedNode::create().setBackendNodeId
(backendNodeId); |
| 106 if (!node->isElementNode()) | 106 if (!node->isElementNode()) |
| 107 return relatedNode; | 107 return relatedNode; |
| 108 | 108 |
| 109 Element* element = toElement(node); | 109 Element* element = toElement(node); |
| 110 const AtomicString& idref = element->getIdAttribute(); | 110 const AtomicString& idref = element->getIdAttribute(); |
| 111 if (!idref.isEmpty()) | 111 if (!idref.isEmpty()) |
| 112 relatedNode->setIdref(idref); | 112 relatedNode->setIdref(idref); |
| (...skipping 323 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 |