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

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

Issue 592353004: img tag should have xml-role as img. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 <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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_COMPLEMENTARY: 73 case ui::AX_ROLE_COMPLEMENTARY:
74 return "complementary"; 74 return "complementary";
75 case ui::AX_ROLE_CONTENT_INFO: 75 case ui::AX_ROLE_CONTENT_INFO:
76 case ui::AX_ROLE_FOOTER: 76 case ui::AX_ROLE_FOOTER:
77 return "contentinfo"; 77 return "contentinfo";
78 case ui::AX_ROLE_IMAGE:
79 return "img";
78 case ui::AX_ROLE_MAIN: 80 case ui::AX_ROLE_MAIN:
79 return "main"; 81 return "main";
80 case ui::AX_ROLE_NAVIGATION: 82 case ui::AX_ROLE_NAVIGATION:
81 return "navigation"; 83 return "navigation";
82 case ui::AX_ROLE_REGION: 84 case ui::AX_ROLE_REGION:
83 return "region"; 85 return "region";
84 default: 86 default:
85 break; 87 break;
86 } 88 }
87 89
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); 596 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst);
595 } 597 }
596 598
597 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { 599 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const {
598 if (render_frame_ && render_frame_->GetWebFrame()) 600 if (render_frame_ && render_frame_->GetWebFrame())
599 return render_frame_->GetWebFrame()->document(); 601 return render_frame_->GetWebFrame()->document();
600 return WebDocument(); 602 return WebDocument();
601 } 603 }
602 604
603 } // namespace content 605 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/dump_accessibility_tree_browsertest.cc ('k') | content/test/data/accessibility/img.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698