| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 } | 237 } |
| 238 | 238 |
| 239 AccessibilityRole AXNodeObject::determineAriaRoleAttribute() const | 239 AccessibilityRole AXNodeObject::determineAriaRoleAttribute() const |
| 240 { | 240 { |
| 241 const AtomicString& ariaRole = getAttribute(roleAttr); | 241 const AtomicString& ariaRole = getAttribute(roleAttr); |
| 242 if (ariaRole.isNull() || ariaRole.isEmpty()) | 242 if (ariaRole.isNull() || ariaRole.isEmpty()) |
| 243 return UnknownRole; | 243 return UnknownRole; |
| 244 | 244 |
| 245 AccessibilityRole role = ariaRoleToWebCoreRole(ariaRole); | 245 AccessibilityRole role = ariaRoleToWebCoreRole(ariaRole); |
| 246 | 246 |
| 247 // ARIA states if an item can get focus, it should not be presentational. | 247 // ARIA states if an item can get focus, it should not be none or presentati
onal. |
| 248 if (role == PresentationalRole && canSetFocusAttribute()) | 248 if ((role == NoneRole || role == PresentationalRole) && canSetFocusAttribute
()) |
| 249 return UnknownRole; | 249 return UnknownRole; |
| 250 | 250 |
| 251 if (role == ButtonRole) | 251 if (role == ButtonRole) |
| 252 role = buttonRoleType(); | 252 role = buttonRoleType(); |
| 253 | 253 |
| 254 if (role == TextAreaRole && !ariaIsMultiline()) | 254 if (role == TextAreaRole && !ariaIsMultiline()) |
| 255 role = TextFieldRole; | 255 role = TextFieldRole; |
| 256 | 256 |
| 257 role = remapAriaRoleDueToParent(role); | 257 role = remapAriaRoleDueToParent(role); |
| 258 | 258 |
| (...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1696 float range = maxValueForRange() - minValueForRange(); | 1696 float range = maxValueForRange() - minValueForRange(); |
| 1697 float value = valueForRange(); | 1697 float value = valueForRange(); |
| 1698 | 1698 |
| 1699 value += range * (percentChange / 100); | 1699 value += range * (percentChange / 100); |
| 1700 setValue(String::number(value)); | 1700 setValue(String::number(value)); |
| 1701 | 1701 |
| 1702 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru
e); | 1702 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru
e); |
| 1703 } | 1703 } |
| 1704 | 1704 |
| 1705 } // namespace blink | 1705 } // namespace blink |
| OLD | NEW |