OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, Google 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 if (isHTMLSummaryElement(*node())) { | 197 if (isHTMLSummaryElement(*node())) { |
198 if (node()->parentNode() && isHTMLDetailsElement(node()->parentNode())) | 198 if (node()->parentNode() && isHTMLDetailsElement(node()->parentNode())) |
199 return DisclosureTriangleRole; | 199 return DisclosureTriangleRole; |
200 return UnknownRole; | 200 return UnknownRole; |
201 } | 201 } |
202 | 202 |
203 if (isHTMLInputElement(*node())) { | 203 if (isHTMLInputElement(*node())) { |
204 HTMLInputElement& input = toHTMLInputElement(*node()); | 204 HTMLInputElement& input = toHTMLInputElement(*node()); |
205 const AtomicString& type = input.type(); | 205 const AtomicString& type = input.type(); |
206 if (type == InputTypeNames::button) { | 206 if (type == InputTypeNames::button) { |
207 if ((node()->parentNode() && isHTMLMenuElement(node()->parentNode())
) || (parentObject() && parentObject()->roleValue() == MenuRole)) | 207 if ((node()->parentNode() && isHTMLMenuElement(node()->parentNode())
) || (parentObject() && parentObject()->ariaRoleAttribute() == MenuRole)) |
208 return MenuItemRole; | 208 return MenuItemRole; |
| 209 if (parentObject() && parentObject()->ariaRoleAttribute() == GroupRo
le) |
| 210 return MenuButtonRole; |
209 return buttonRoleType(); | 211 return buttonRoleType(); |
210 } | 212 } |
211 if (type == InputTypeNames::checkbox) { | 213 if (type == InputTypeNames::checkbox) { |
212 if ((node()->parentNode() && isHTMLMenuElement(node()->parentNode())
) || (parentObject() && parentObject()->roleValue() == MenuRole)) | 214 if ((node()->parentNode() && isHTMLMenuElement(node()->parentNode())
) || (parentObject() && parentObject()->ariaRoleAttribute() == MenuRole)) |
213 return MenuItemCheckBoxRole; | 215 return MenuItemCheckBoxRole; |
214 return CheckBoxRole; | 216 return CheckBoxRole; |
215 } | 217 } |
216 if (type == InputTypeNames::date) | 218 if (type == InputTypeNames::date) |
217 return DateRole; | 219 return DateRole; |
218 if (type == InputTypeNames::datetime | 220 if (type == InputTypeNames::datetime |
219 || type == InputTypeNames::datetime_local | 221 || type == InputTypeNames::datetime_local |
220 || type == InputTypeNames::month | 222 || type == InputTypeNames::month |
221 || type == InputTypeNames::week) | 223 || type == InputTypeNames::week) |
222 return DateTimeRole; | 224 return DateTimeRole; |
223 if (type == InputTypeNames::radio) { | 225 if (type == InputTypeNames::radio) { |
224 if ((node()->parentNode() && isHTMLMenuElement(node()->parentNode())
) || (parentObject() && parentObject()->roleValue() == MenuRole)) | 226 if ((node()->parentNode() && isHTMLMenuElement(node()->parentNode())
) || (parentObject() && parentObject()->ariaRoleAttribute() == MenuRole)) |
225 return MenuItemRadioRole; | 227 return MenuItemRadioRole; |
226 return RadioButtonRole; | 228 return RadioButtonRole; |
227 } | 229 } |
228 if (input.isTextButton()) | 230 if (input.isTextButton()) |
229 return buttonRoleType(); | 231 return buttonRoleType(); |
230 if (type == InputTypeNames::range) | 232 if (type == InputTypeNames::range) |
231 return SliderRole; | 233 return SliderRole; |
232 if (type == InputTypeNames::color) | 234 if (type == InputTypeNames::color) |
233 return ColorWellRole; | 235 return ColorWellRole; |
234 if (type == InputTypeNames::time) | 236 if (type == InputTypeNames::time) |
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1760 float range = maxValueForRange() - minValueForRange(); | 1762 float range = maxValueForRange() - minValueForRange(); |
1761 float value = valueForRange(); | 1763 float value = valueForRange(); |
1762 | 1764 |
1763 value += range * (percentChange / 100); | 1765 value += range * (percentChange / 100); |
1764 setValue(String::number(value)); | 1766 setValue(String::number(value)); |
1765 | 1767 |
1766 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
true); | 1768 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
true); |
1767 } | 1769 } |
1768 | 1770 |
1769 } // namespace blink | 1771 } // namespace blink |
OLD | NEW |