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

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 switch (roleValue()) {
189 case ApplicationRole:
190 case ArticleRole:
191 case BannerRole:
192 case ComplementaryRole:
193 case ContentInfoRole:
194 case FooterRole:
195 case MainRole:
196 case NavigationRole:
197 case RegionRole:
198 case SearchRole:
199 return true;
200 default:
201 return false;
202 }
203 }
204
186 bool AXObject::isMenuRelated() const 205 bool AXObject::isMenuRelated() const
187 { 206 {
188 switch (roleValue()) { 207 switch (roleValue()) {
189 case MenuRole: 208 case MenuRole:
190 case MenuBarRole: 209 case MenuBarRole:
191 case MenuButtonRole: 210 case MenuButtonRole:
192 case MenuItemRole: 211 case MenuItemRole:
193 return true; 212 return true;
194 default: 213 default:
195 return false; 214 return false;
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 return ToggleButtonRole; 917 return ToggleButtonRole;
899 if (ariaHasPopup()) 918 if (ariaHasPopup())
900 return PopUpButtonRole; 919 return PopUpButtonRole;
901 // We don't contemplate RadioButtonRole, as it depends on the input 920 // We don't contemplate RadioButtonRole, as it depends on the input
902 // type. 921 // type.
903 922
904 return ButtonRole; 923 return ButtonRole;
905 } 924 }
906 925
907 } // namespace WebCore 926 } // 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