Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: content/renderer/accessibility/blink_ax_tree_source.cc

Issue 2946673003: Aria-details takes an ID reference, not an ID reference list (Closed)
Patch Set: Rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 dst_->AddIntAttribute(ui::AX_ATTR_ACTIVEDESCENDANT_ID, value.AxID());
105 break; 105 break;
106 case WebAXObjectAttribute::kAriaDetails:
107 dst_->AddIntAttribute(ui::AX_ATTR_DETAILS_ID, value.AxID());
108 break;
106 case WebAXObjectAttribute::kAriaErrorMessage: 109 case WebAXObjectAttribute::kAriaErrorMessage:
107 dst_->AddIntAttribute(ui::AX_ATTR_ERRORMESSAGE_ID, value.AxID()); 110 dst_->AddIntAttribute(ui::AX_ATTR_ERRORMESSAGE_ID, value.AxID());
108 break; 111 break;
109 default: 112 default:
110 NOTREACHED(); 113 NOTREACHED();
111 } 114 }
112 } 115 }
113 116
114 void AddObjectVectorAttribute( 117 void AddObjectVectorAttribute(
115 WebAXObjectVectorAttribute attribute, 118 WebAXObjectVectorAttribute attribute,
116 const blink::WebVector<WebAXObject>& value) override { 119 const blink::WebVector<WebAXObject>& value) override {
117 switch (attribute) { 120 switch (attribute) {
118 case WebAXObjectVectorAttribute::kAriaControls: 121 case WebAXObjectVectorAttribute::kAriaControls:
119 AddIntListAttributeFromWebObjects(ui::AX_ATTR_CONTROLS_IDS, value, 122 AddIntListAttributeFromWebObjects(ui::AX_ATTR_CONTROLS_IDS, value,
120 dst_); 123 dst_);
121 break; 124 break;
122 case WebAXObjectVectorAttribute::kAriaDetails:
123 AddIntListAttributeFromWebObjects(ui::AX_ATTR_DETAILS_IDS, value,
124 dst_);
125 break;
126 case WebAXObjectVectorAttribute::kAriaFlowTo: 125 case WebAXObjectVectorAttribute::kAriaFlowTo:
127 AddIntListAttributeFromWebObjects(ui::AX_ATTR_FLOWTO_IDS, value, dst_); 126 AddIntListAttributeFromWebObjects(ui::AX_ATTR_FLOWTO_IDS, value, dst_);
128 break; 127 break;
129 default: 128 default:
130 NOTREACHED(); 129 NOTREACHED();
131 } 130 }
132 } 131 }
133 }; 132 };
134 133
135 WebAXObject ParentObjectUnignored(WebAXObject child) { 134 WebAXObject ParentObjectUnignored(WebAXObject child) {
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 return WebAXObject(); 887 return WebAXObject();
889 888
890 WebDocument document = render_frame_->GetWebFrame()->GetDocument(); 889 WebDocument document = render_frame_->GetWebFrame()->GetDocument();
891 if (!document.IsNull()) 890 if (!document.IsNull())
892 return WebAXObject::FromWebDocument(document); 891 return WebAXObject::FromWebDocument(document);
893 892
894 return WebAXObject(); 893 return WebAXObject();
895 } 894 }
896 895
897 } // namespace content 896 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698