| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 std::string GetEquivalentAriaRoleString(const ui::AXRole role) { | 67 std::string GetEquivalentAriaRoleString(const ui::AXRole role) { |
| 68 switch (role) { | 68 switch (role) { |
| 69 case ui::AX_ROLE_ARTICLE: | 69 case ui::AX_ROLE_ARTICLE: |
| 70 return "article"; | 70 return "article"; |
| 71 case ui::AX_ROLE_BANNER: | 71 case ui::AX_ROLE_BANNER: |
| 72 return "banner"; | 72 return "banner"; |
| 73 case ui::AX_ROLE_BUTTON: | 73 case ui::AX_ROLE_BUTTON: |
| 74 return "button"; | 74 return "button"; |
| 75 case ui::AX_ROLE_COMPLEMENTARY: | 75 case ui::AX_ROLE_COMPLEMENTARY: |
| 76 return "complementary"; | 76 return "complementary"; |
| 77 case ui::AX_ROLE_CONTENT_INFO: | |
| 78 case ui::AX_ROLE_FOOTER: | 77 case ui::AX_ROLE_FOOTER: |
| 79 return "contentinfo"; | 78 return "contentinfo"; |
| 80 case ui::AX_ROLE_HORIZONTAL_RULE: | 79 case ui::AX_ROLE_HORIZONTAL_RULE: |
| 81 return "separator"; | 80 return "separator"; |
| 82 case ui::AX_ROLE_IMAGE: | 81 case ui::AX_ROLE_IMAGE: |
| 83 return "img"; | 82 return "img"; |
| 84 case ui::AX_ROLE_MAIN: | 83 case ui::AX_ROLE_MAIN: |
| 85 return "main"; | 84 return "main"; |
| 86 case ui::AX_ROLE_MATH_ELEMENT: | 85 case ui::AX_ROLE_MATH_ELEMENT: |
| 87 return "math"; | 86 return "math"; |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); | 611 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); |
| 613 } | 612 } |
| 614 | 613 |
| 615 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { | 614 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { |
| 616 if (render_frame_ && render_frame_->GetWebFrame()) | 615 if (render_frame_ && render_frame_->GetWebFrame()) |
| 617 return render_frame_->GetWebFrame()->document(); | 616 return render_frame_->GetWebFrame()->document(); |
| 618 return WebDocument(); | 617 return WebDocument(); |
| 619 } | 618 } |
| 620 | 619 |
| 621 } // namespace content | 620 } // namespace content |
| OLD | NEW |