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

Side by Side Diff: Source/core/accessibility/AXObject.cpp

Issue 104583006: Don't ignore landmark and related AXObjects, because they should be exposed to (Closed) Base URL: http://src.chromium.org/blink/trunk/
Patch Set: Created 6 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
« no previous file with comments | « Source/core/accessibility/AXObject.h ('k') | Source/core/accessibility/AXRenderObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 return ariaRoleAttribute() == TextAreaRole || ariaRoleAttribute() == TextFie ldRole; 176 return ariaRoleAttribute() == TextAreaRole || ariaRoleAttribute() == TextFie ldRole;
177 } 177 }
178 178
179 bool AXObject::isButton() const 179 bool AXObject::isButton() const
180 { 180 {
181 AccessibilityRole role = roleValue(); 181 AccessibilityRole role = roleValue();
182 182
183 return role == ButtonRole || role == PopUpButtonRole || role == ToggleButton Role; 183 return role == ButtonRole || role == PopUpButtonRole || role == ToggleButton Role;
184 } 184 }
185 185
186 bool AXObject::isLandmarkRelated() const
187 {
188 AccessibilityRole role = roleValue();
189 return role == ArticleRole ||
dmazzoni 2014/01/03 18:14:11 Please use a switch statement, and sort them alpha
190 role == RegionRole ||
191 role == ApplicationRole ||
192 role == BannerRole ||
193 role == ComplementaryRole ||
194 role == ContentInfoRole ||
195 role == FooterRole ||
196 role == MainRole ||
197 role == NavigationRole ||
198 role == SearchRole;
199 }
200
186 bool AXObject::isMenuRelated() const 201 bool AXObject::isMenuRelated() const
187 { 202 {
188 switch (roleValue()) { 203 switch (roleValue()) {
189 case MenuRole: 204 case MenuRole:
190 case MenuBarRole: 205 case MenuBarRole:
191 case MenuButtonRole: 206 case MenuButtonRole:
192 case MenuItemRole: 207 case MenuItemRole:
193 return true; 208 return true;
194 default: 209 default:
195 return false; 210 return false;
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 return ToggleButtonRole; 913 return ToggleButtonRole;
899 if (ariaHasPopup()) 914 if (ariaHasPopup())
900 return PopUpButtonRole; 915 return PopUpButtonRole;
901 // We don't contemplate RadioButtonRole, as it depends on the input 916 // We don't contemplate RadioButtonRole, as it depends on the input
902 // type. 917 // type.
903 918
904 return ButtonRole; 919 return ButtonRole;
905 } 920 }
906 921
907 } // namespace WebCore 922 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/accessibility/AXObject.h ('k') | Source/core/accessibility/AXRenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698