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

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

Issue 1595063002: Adds AX role for abbr tag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_enum_conversion.h" 5 #include "content/renderer/accessibility/blink_ax_enum_conversion.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 state |= (1 << ui::AX_STATE_HORIZONTAL); 85 state |= (1 << ui::AX_STATE_HORIZONTAL);
86 86
87 if (o.isVisited()) 87 if (o.isVisited())
88 state |= (1 << ui::AX_STATE_VISITED); 88 state |= (1 << ui::AX_STATE_VISITED);
89 89
90 return state; 90 return state;
91 } 91 }
92 92
93 ui::AXRole AXRoleFromBlink(blink::WebAXRole role) { 93 ui::AXRole AXRoleFromBlink(blink::WebAXRole role) {
94 switch (role) { 94 switch (role) {
95 case blink::WebAXRoleAbbr:
96 return ui::AX_ROLE_ABBR;
95 case blink::WebAXRoleAlert: 97 case blink::WebAXRoleAlert:
96 return ui::AX_ROLE_ALERT; 98 return ui::AX_ROLE_ALERT;
97 case blink::WebAXRoleAlertDialog: 99 case blink::WebAXRoleAlertDialog:
98 return ui::AX_ROLE_ALERT_DIALOG; 100 return ui::AX_ROLE_ALERT_DIALOG;
99 case blink::WebAXRoleAnnotation: 101 case blink::WebAXRoleAnnotation:
100 return ui::AX_ROLE_ANNOTATION; 102 return ui::AX_ROLE_ANNOTATION;
101 case blink::WebAXRoleApplication: 103 case blink::WebAXRoleApplication:
102 return ui::AX_ROLE_APPLICATION; 104 return ui::AX_ROLE_APPLICATION;
103 case blink::WebAXRoleArticle: 105 case blink::WebAXRoleArticle:
104 return ui::AX_ROLE_ARTICLE; 106 return ui::AX_ROLE_ARTICLE;
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 case blink::WebAXDescriptionFromRelatedElement: 516 case blink::WebAXDescriptionFromRelatedElement:
515 return ui::AX_DESCRIPTION_FROM_RELATED_ELEMENT; 517 return ui::AX_DESCRIPTION_FROM_RELATED_ELEMENT;
516 default: 518 default:
517 NOTREACHED(); 519 NOTREACHED();
518 } 520 }
519 521
520 return ui::AX_DESCRIPTION_FROM_UNINITIALIZED; 522 return ui::AX_DESCRIPTION_FROM_UNINITIALIZED;
521 } 523 }
522 524
523 } // namespace content. 525 } // namespace content.
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility_win.cc ('k') | content/test/data/accessibility/html/abbr-expected-mac.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698