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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 if (src.HasComputedStyle()) { | 553 if (src.HasComputedStyle()) { |
554 dst->AddStringAttribute(ui::AX_ATTR_DISPLAY, | 554 dst->AddStringAttribute(ui::AX_ATTR_DISPLAY, |
555 src.ComputedStyleDisplay().Utf8()); | 555 src.ComputedStyleDisplay().Utf8()); |
556 } | 556 } |
557 | 557 |
558 if (src.Language().length()) { | 558 if (src.Language().length()) { |
559 if (parent.IsNull() || parent.Language() != src.Language()) | 559 if (parent.IsNull() || parent.Language() != src.Language()) |
560 dst->AddStringAttribute(ui::AX_ATTR_LANGUAGE, src.Language().Utf8()); | 560 dst->AddStringAttribute(ui::AX_ATTR_LANGUAGE, src.Language().Utf8()); |
561 } | 561 } |
562 | 562 |
563 if (src.KeyboardShortcut().length()) { | 563 if (src.KeyboardShortcut().length() && |
564 dst->AddStringAttribute(ui::AX_ATTR_SHORTCUT, | 564 !dst->HasStringAttribute(ui::AX_ATTR_KEY_SHORTCUTS)) { |
| 565 dst->AddStringAttribute(ui::AX_ATTR_KEY_SHORTCUTS, |
565 src.KeyboardShortcut().Utf8()); | 566 src.KeyboardShortcut().Utf8()); |
566 } | 567 } |
567 | 568 |
568 if (!src.NextOnLine().IsDetached()) { | 569 if (!src.NextOnLine().IsDetached()) { |
569 dst->AddIntAttribute(ui::AX_ATTR_NEXT_ON_LINE_ID, | 570 dst->AddIntAttribute(ui::AX_ATTR_NEXT_ON_LINE_ID, |
570 src.NextOnLine().AxID()); | 571 src.NextOnLine().AxID()); |
571 } | 572 } |
572 | 573 |
573 if (!src.PreviousOnLine().IsDetached()) { | 574 if (!src.PreviousOnLine().IsDetached()) { |
574 dst->AddIntAttribute(ui::AX_ATTR_PREVIOUS_ON_LINE_ID, | 575 dst->AddIntAttribute(ui::AX_ATTR_PREVIOUS_ON_LINE_ID, |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 return WebAXObject(); | 888 return WebAXObject(); |
888 | 889 |
889 WebDocument document = render_frame_->GetWebFrame()->GetDocument(); | 890 WebDocument document = render_frame_->GetWebFrame()->GetDocument(); |
890 if (!document.IsNull()) | 891 if (!document.IsNull()) |
891 return WebAXObject::FromWebDocument(document); | 892 return WebAXObject::FromWebDocument(document); |
892 | 893 |
893 return WebAXObject(); | 894 return WebAXObject(); |
894 } | 895 } |
895 | 896 |
896 } // namespace content | 897 } // namespace content |
OLD | NEW |