| 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; |
| 388 return ButtonStateMixed; | 391 return ButtonStateMixed; |
| 392 } |
| 389 | 393 |
| 390 return ButtonStateOff; | 394 return ButtonStateOff; |
| 391 } | 395 } |
| 392 | 396 |
| 393 bool AXObject::ariaIsMultiline() const | 397 bool AXObject::ariaIsMultiline() const |
| 394 { | 398 { |
| 395 return equalIgnoringCase(getAttribute(aria_multilineAttr), "true"); | 399 return equalIgnoringCase(getAttribute(aria_multilineAttr), "true"); |
| 396 } | 400 } |
| 397 | 401 |
| 398 bool AXObject::ariaPressedIsPresent() const | 402 bool AXObject::ariaPressedIsPresent() const |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 972 return ToggleButtonRole; | 976 return ToggleButtonRole; |
| 973 if (ariaHasPopup()) | 977 if (ariaHasPopup()) |
| 974 return PopUpButtonRole; | 978 return PopUpButtonRole; |
| 975 // We don't contemplate RadioButtonRole, as it depends on the input | 979 // We don't contemplate RadioButtonRole, as it depends on the input |
| 976 // type. | 980 // type. |
| 977 | 981 |
| 978 return ButtonRole; | 982 return ButtonRole; |
| 979 } | 983 } |
| 980 | 984 |
| 981 } // namespace blink | 985 } // namespace blink |
| OLD | NEW |