| 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 "content/renderer/accessibility/blink_ax_tree_source.h" | 5 #include "content/renderer/accessibility/blink_ax_tree_source.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 break; | 94 break; |
| 95 default: | 95 default: |
| 96 NOTREACHED(); | 96 NOTREACHED(); |
| 97 } | 97 } |
| 98 } | 98 } |
| 99 | 99 |
| 100 void AddObjectAttribute(WebAXObjectAttribute attribute, | 100 void AddObjectAttribute(WebAXObjectAttribute attribute, |
| 101 const WebAXObject& value) override { | 101 const WebAXObject& value) override { |
| 102 switch (attribute) { | 102 switch (attribute) { |
| 103 case WebAXObjectAttribute::kAriaActiveDescendant: | 103 case WebAXObjectAttribute::kAriaActiveDescendant: |
| 104 dst_->AddIntAttribute(ui::AX_ATTR_ACTIVEDESCENDANT_ID, value.AxID()); | 104 // TODO(dmazzoni): WebAXObject::ActiveDescendant currently returns |
| 105 // more information than the sparse interface does. |
| 105 break; | 106 break; |
| 106 case WebAXObjectAttribute::kAriaDetails: | 107 case WebAXObjectAttribute::kAriaDetails: |
| 107 dst_->AddIntAttribute(ui::AX_ATTR_DETAILS_ID, value.AxID()); | 108 dst_->AddIntAttribute(ui::AX_ATTR_DETAILS_ID, value.AxID()); |
| 108 break; | 109 break; |
| 109 case WebAXObjectAttribute::kAriaErrorMessage: | 110 case WebAXObjectAttribute::kAriaErrorMessage: |
| 110 dst_->AddIntAttribute(ui::AX_ATTR_ERRORMESSAGE_ID, value.AxID()); | 111 dst_->AddIntAttribute(ui::AX_ATTR_ERRORMESSAGE_ID, value.AxID()); |
| 111 break; | 112 break; |
| 112 default: | 113 default: |
| 113 NOTREACHED(); | 114 NOTREACHED(); |
| 114 } | 115 } |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 return WebAXObject(); | 899 return WebAXObject(); |
| 899 | 900 |
| 900 WebDocument document = render_frame_->GetWebFrame()->GetDocument(); | 901 WebDocument document = render_frame_->GetWebFrame()->GetDocument(); |
| 901 if (!document.IsNull()) | 902 if (!document.IsNull()) |
| 902 return WebAXObject::FromWebDocument(document); | 903 return WebAXObject::FromWebDocument(document); |
| 903 | 904 |
| 904 return WebAXObject(); | 905 return WebAXObject(); |
| 905 } | 906 } |
| 906 | 907 |
| 907 } // namespace content | 908 } // namespace content |
| OLD | NEW |