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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 word_ends.push_back(src_word_ends[i]); | 420 word_ends.push_back(src_word_ends[i]); |
421 } | 421 } |
422 dst->AddIntListAttribute(ui::AX_ATTR_WORD_STARTS, word_starts); | 422 dst->AddIntListAttribute(ui::AX_ATTR_WORD_STARTS, word_starts); |
423 dst->AddIntListAttribute(ui::AX_ATTR_WORD_ENDS, word_ends); | 423 dst->AddIntListAttribute(ui::AX_ATTR_WORD_ENDS, word_ends); |
424 } | 424 } |
425 | 425 |
426 if (src.accessKey().length()) { | 426 if (src.accessKey().length()) { |
427 dst->AddStringAttribute(ui::AX_ATTR_ACCESS_KEY, src.accessKey().utf8()); | 427 dst->AddStringAttribute(ui::AX_ATTR_ACCESS_KEY, src.accessKey().utf8()); |
428 } | 428 } |
429 | 429 |
430 if (src.actionVerb().length()) { | 430 if (src.action() != blink::WebAXSupportedAction::None) { |
431 dst->AddStringAttribute(ui::AX_ATTR_ACTION, src.actionVerb().utf8()); | 431 dst->AddIntAttribute(ui::AX_ATTR_ACTION, |
| 432 AXSupportedActionFromBlink(src.action())); |
432 } | 433 } |
433 | 434 |
434 if (src.ariaAutoComplete().length()) { | 435 if (src.ariaAutoComplete().length()) { |
435 dst->AddStringAttribute( | 436 dst->AddStringAttribute( |
436 ui::AX_ATTR_AUTO_COMPLETE, | 437 ui::AX_ATTR_AUTO_COMPLETE, |
437 src.ariaAutoComplete().utf8()); | 438 src.ariaAutoComplete().utf8()); |
438 } | 439 } |
439 | 440 |
440 if (src.isAriaReadOnly()) | 441 if (src.isAriaReadOnly()) |
441 dst->AddBoolAttribute(ui::AX_ATTR_ARIA_READONLY, true); | 442 dst->AddBoolAttribute(ui::AX_ATTR_ARIA_READONLY, true); |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 return WebAXObject(); | 757 return WebAXObject(); |
757 | 758 |
758 WebDocument document = render_frame_->GetWebFrame()->document(); | 759 WebDocument document = render_frame_->GetWebFrame()->document(); |
759 if (!document.isNull()) | 760 if (!document.isNull()) |
760 return document.accessibilityObject(); | 761 return document.accessibilityObject(); |
761 | 762 |
762 return WebAXObject(); | 763 return WebAXObject(); |
763 } | 764 } |
764 | 765 |
765 } // namespace content | 766 } // namespace content |
OLD | NEW |