| 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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 case MenuListPopupRole: | 744 case MenuListPopupRole: |
| 745 // FIXME: Implement. | 745 // FIXME: Implement. |
| 746 return String(); | 746 return String(); |
| 747 default: | 747 default: |
| 748 return emptyString(); | 748 return emptyString(); |
| 749 } | 749 } |
| 750 } | 750 } |
| 751 | 751 |
| 752 AccessibilityButtonState AXObject::checkboxOrRadioValue() const | 752 AccessibilityButtonState AXObject::checkboxOrRadioValue() const |
| 753 { | 753 { |
| 754 // If this is a real checkbox or radio button, AXLayoutObject will handle. | 754 const AtomicString& checkedAttribute = getAttribute(aria_checkedAttr); |
| 755 // If it's an ARIA checkbox or radio, the aria-checked attribute should be u
sed. | 755 if (equalIgnoringCase(checkedAttribute, "true")) |
| 756 return ButtonStateOn; |
| 756 | 757 |
| 757 const AtomicString& result = getAttribute(aria_checkedAttr); | 758 if (equalIgnoringCase(checkedAttribute, "mixed")) { |
| 758 if (equalIgnoringCase(result, "true")) | 759 // Only checkboxes should support the mixed state. |
| 759 return ButtonStateOn; | |
| 760 if (equalIgnoringCase(result, "mixed")) { | |
| 761 AccessibilityRole role = ariaRoleAttribute(); | 760 AccessibilityRole role = ariaRoleAttribute(); |
| 762 if (role == RadioButtonRole || role == MenuItemRadioRole || role == Swit
chRole) | 761 if (role == CheckBoxRole || role == MenuItemCheckBoxRole) |
| 763 return ButtonStateOff; | 762 return ButtonStateMixed; |
| 764 return ButtonStateMixed; | |
| 765 } | 763 } |
| 766 | 764 |
| 767 return ButtonStateOff; | 765 return ButtonStateOff; |
| 768 } | 766 } |
| 769 | 767 |
| 770 bool AXObject::isMultiline() const | 768 bool AXObject::isMultiline() const |
| 771 { | 769 { |
| 772 Node* node = this->node(); | 770 Node* node = this->node(); |
| 773 if (!node) | 771 if (!node) |
| 774 return false; | 772 return false; |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1523 | 1521 |
| 1524 DEFINE_TRACE(AXObject) | 1522 DEFINE_TRACE(AXObject) |
| 1525 { | 1523 { |
| 1526 visitor->trace(m_children); | 1524 visitor->trace(m_children); |
| 1527 visitor->trace(m_parent); | 1525 visitor->trace(m_parent); |
| 1528 visitor->trace(m_cachedLiveRegionRoot); | 1526 visitor->trace(m_cachedLiveRegionRoot); |
| 1529 visitor->trace(m_axObjectCache); | 1527 visitor->trace(m_axObjectCache); |
| 1530 } | 1528 } |
| 1531 | 1529 |
| 1532 } // namespace blink | 1530 } // namespace blink |
| OLD | NEW |