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 <set> | 7 #include <set> |
8 | 8 |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 dst->AddIntListAttribute(ui::AX_ATTR_WORD_STARTS, word_starts); | 260 dst->AddIntListAttribute(ui::AX_ATTR_WORD_STARTS, word_starts); |
261 dst->AddIntListAttribute(ui::AX_ATTR_WORD_ENDS, word_ends); | 261 dst->AddIntListAttribute(ui::AX_ATTR_WORD_ENDS, word_ends); |
262 } | 262 } |
263 | 263 |
264 if (src.accessKey().length()) { | 264 if (src.accessKey().length()) { |
265 dst->AddStringAttribute(ui::AX_ATTR_ACCESS_KEY, | 265 dst->AddStringAttribute(ui::AX_ATTR_ACCESS_KEY, |
266 UTF16ToUTF8(src.accessKey())); | 266 UTF16ToUTF8(src.accessKey())); |
267 } | 267 } |
268 if (src.actionVerb().length()) | 268 if (src.actionVerb().length()) |
269 dst->AddStringAttribute(ui::AX_ATTR_ACTION, UTF16ToUTF8(src.actionVerb())); | 269 dst->AddStringAttribute(ui::AX_ATTR_ACTION, UTF16ToUTF8(src.actionVerb())); |
| 270 if (src.ariaAutoComplete().length()) |
| 271 dst->AddStringAttribute(ui::AX_ATTR_AUTO_COMPLETE, |
| 272 UTF16ToUTF8(src.ariaAutoComplete())); |
270 if (src.isAriaReadOnly()) | 273 if (src.isAriaReadOnly()) |
271 dst->AddBoolAttribute(ui::AX_ATTR_ARIA_READONLY, true); | 274 dst->AddBoolAttribute(ui::AX_ATTR_ARIA_READONLY, true); |
272 if (src.isButtonStateMixed()) | 275 if (src.isButtonStateMixed()) |
273 dst->AddBoolAttribute(ui::AX_ATTR_BUTTON_MIXED, true); | 276 dst->AddBoolAttribute(ui::AX_ATTR_BUTTON_MIXED, true); |
274 if (src.canSetValueAttribute()) | 277 if (src.canSetValueAttribute()) |
275 dst->AddBoolAttribute(ui::AX_ATTR_CAN_SET_VALUE, true); | 278 dst->AddBoolAttribute(ui::AX_ATTR_CAN_SET_VALUE, true); |
276 if (src.accessibilityDescription().length()) { | 279 if (src.accessibilityDescription().length()) { |
277 dst->AddStringAttribute(ui::AX_ATTR_DESCRIPTION, | 280 dst->AddStringAttribute(ui::AX_ATTR_DESCRIPTION, |
278 UTF16ToUTF8(src.accessibilityDescription())); | 281 UTF16ToUTF8(src.accessibilityDescription())); |
279 } | 282 } |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); | 565 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); |
563 } | 566 } |
564 | 567 |
565 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { | 568 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { |
566 if (render_frame_ && render_frame_->GetWebFrame()) | 569 if (render_frame_ && render_frame_->GetWebFrame()) |
567 return render_frame_->GetWebFrame()->document(); | 570 return render_frame_->GetWebFrame()->document(); |
568 return WebDocument(); | 571 return WebDocument(); |
569 } | 572 } |
570 | 573 |
571 } // namespace content | 574 } // namespace content |
OLD | NEW |