| 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 } | 370 } |
| 371 | 371 |
| 372 AccessibilityButtonState AXObject::checkboxOrRadioValue() const | 372 AccessibilityButtonState AXObject::checkboxOrRadioValue() const |
| 373 { | 373 { |
| 374 // If this is a real checkbox or radio button, AXRenderObject will handle. | 374 // If this is a real checkbox or radio button, AXRenderObject will handle. |
| 375 // If it's an ARIA checkbox or radio, the aria-checked attribute should be u
sed. | 375 // If it's an ARIA checkbox or radio, the aria-checked attribute should be u
sed. |
| 376 | 376 |
| 377 const AtomicString& result = getAttribute(aria_checkedAttr); | 377 const AtomicString& result = getAttribute(aria_checkedAttr); |
| 378 if (equalIgnoringCase(result, "true")) | 378 if (equalIgnoringCase(result, "true")) |
| 379 return ButtonStateOn; | 379 return ButtonStateOn; |
| 380 if (equalIgnoringCase(result, "mixed")) | 380 if (equalIgnoringCase(result, "mixed")) { |
| 381 AccessibilityRole role = ariaRoleAttribute(); |
| 382 if (role == RadioButtonRole || role == MenuItemRadioRole) |
| 383 return ButtonStateOff; |
| 381 return ButtonStateMixed; | 384 return ButtonStateMixed; |
| 385 } |
| 382 | 386 |
| 383 return ButtonStateOff; | 387 return ButtonStateOff; |
| 384 } | 388 } |
| 385 | 389 |
| 386 bool AXObject::ariaIsMultiline() const | 390 bool AXObject::ariaIsMultiline() const |
| 387 { | 391 { |
| 388 return equalIgnoringCase(getAttribute(aria_multilineAttr), "true"); | 392 return equalIgnoringCase(getAttribute(aria_multilineAttr), "true"); |
| 389 } | 393 } |
| 390 | 394 |
| 391 bool AXObject::ariaPressedIsPresent() const | 395 bool AXObject::ariaPressedIsPresent() const |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 return ToggleButtonRole; | 948 return ToggleButtonRole; |
| 945 if (ariaHasPopup()) | 949 if (ariaHasPopup()) |
| 946 return PopUpButtonRole; | 950 return PopUpButtonRole; |
| 947 // We don't contemplate RadioButtonRole, as it depends on the input | 951 // We don't contemplate RadioButtonRole, as it depends on the input |
| 948 // type. | 952 // type. |
| 949 | 953 |
| 950 return ButtonRole; | 954 return ButtonRole; |
| 951 } | 955 } |
| 952 | 956 |
| 953 } // namespace blink | 957 } // namespace blink |
| OLD | NEW |