| 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 } | 377 } |
| 378 | 378 |
| 379 AccessibilityButtonState AXObject::checkboxOrRadioValue() const | 379 AccessibilityButtonState AXObject::checkboxOrRadioValue() const |
| 380 { | 380 { |
| 381 // If this is a real checkbox or radio button, AXRenderObject will handle. | 381 // If this is a real checkbox or radio button, AXRenderObject will handle. |
| 382 // If it's an ARIA checkbox or radio, the aria-checked attribute should be u
sed. | 382 // If it's an ARIA checkbox or radio, the aria-checked attribute should be u
sed. |
| 383 | 383 |
| 384 const AtomicString& result = getAttribute(aria_checkedAttr); | 384 const AtomicString& result = getAttribute(aria_checkedAttr); |
| 385 if (equalIgnoringCase(result, "true")) | 385 if (equalIgnoringCase(result, "true")) |
| 386 return ButtonStateOn; | 386 return ButtonStateOn; |
| 387 if (equalIgnoringCase(result, "mixed")) { | 387 if (equalIgnoringCase(result, "mixed")) |
| 388 AccessibilityRole role = ariaRoleAttribute(); | |
| 389 if (role == RadioButtonRole || role == MenuItemRadioRole) | |
| 390 return ButtonStateOff; | |
| 391 return ButtonStateMixed; | 388 return ButtonStateMixed; |
| 392 } | |
| 393 | 389 |
| 394 return ButtonStateOff; | 390 return ButtonStateOff; |
| 395 } | 391 } |
| 396 | 392 |
| 397 bool AXObject::ariaIsMultiline() const | 393 bool AXObject::ariaIsMultiline() const |
| 398 { | 394 { |
| 399 return equalIgnoringCase(getAttribute(aria_multilineAttr), "true"); | 395 return equalIgnoringCase(getAttribute(aria_multilineAttr), "true"); |
| 400 } | 396 } |
| 401 | 397 |
| 402 bool AXObject::ariaPressedIsPresent() const | 398 bool AXObject::ariaPressedIsPresent() const |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 return ToggleButtonRole; | 972 return ToggleButtonRole; |
| 977 if (ariaHasPopup()) | 973 if (ariaHasPopup()) |
| 978 return PopUpButtonRole; | 974 return PopUpButtonRole; |
| 979 // We don't contemplate RadioButtonRole, as it depends on the input | 975 // We don't contemplate RadioButtonRole, as it depends on the input |
| 980 // type. | 976 // type. |
| 981 | 977 |
| 982 return ButtonRole; | 978 return ButtonRole; |
| 983 } | 979 } |
| 984 | 980 |
| 985 } // namespace blink | 981 } // namespace blink |
| OLD | NEW |