Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |