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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 case MenuListPopupRole: | 902 case MenuListPopupRole: |
903 // FIXME: Implement. | 903 // FIXME: Implement. |
904 return String(); | 904 return String(); |
905 default: | 905 default: |
906 return emptyString(); | 906 return emptyString(); |
907 } | 907 } |
908 } | 908 } |
909 | 909 |
910 AccessibilityButtonState AXObject::checkboxOrRadioValue() const | 910 AccessibilityButtonState AXObject::checkboxOrRadioValue() const |
911 { | 911 { |
912 // If this is a real checkbox or radio button, AXLayoutObject will handle. | 912 // If this is a real checkbox or radio button, AXNodeObject will handle it. |
913 // If it's an ARIA checkbox or radio, the aria-checked attribute should be u
sed. | 913 // If it's an ARIA checkbox or radio, the aria-checked attribute should be u
sed. |
914 | |
915 const AtomicString& result = getAttribute(aria_checkedAttr); | 914 const AtomicString& result = getAttribute(aria_checkedAttr); |
916 if (equalIgnoringCase(result, "true")) | 915 if (equalIgnoringCase(result, "true")) |
917 return ButtonStateOn; | 916 return ButtonStateOn; |
918 if (equalIgnoringCase(result, "mixed")) { | 917 if (equalIgnoringCase(result, "mixed")) { |
| 918 // Only checkboxes should support the mixed state. |
919 AccessibilityRole role = ariaRoleAttribute(); | 919 AccessibilityRole role = ariaRoleAttribute(); |
920 if (role == RadioButtonRole || role == MenuItemRadioRole || role == Swit
chRole) | 920 if (role == CheckBoxRole || role == MenuItemCheckBoxRole) |
921 return ButtonStateOff; | 921 return ButtonStateMixed; |
922 return ButtonStateMixed; | |
923 } | 922 } |
924 | 923 |
925 return ButtonStateOff; | 924 return ButtonStateOff; |
926 } | 925 } |
927 | 926 |
928 bool AXObject::isMultiline() const | 927 bool AXObject::isMultiline() const |
929 { | 928 { |
930 Node* node = this->node(); | 929 Node* node = this->node(); |
931 if (!node) | 930 if (!node) |
932 return false; | 931 return false; |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 | 1680 |
1682 DEFINE_TRACE(AXObject) | 1681 DEFINE_TRACE(AXObject) |
1683 { | 1682 { |
1684 visitor->trace(m_children); | 1683 visitor->trace(m_children); |
1685 visitor->trace(m_parent); | 1684 visitor->trace(m_parent); |
1686 visitor->trace(m_cachedLiveRegionRoot); | 1685 visitor->trace(m_cachedLiveRegionRoot); |
1687 visitor->trace(m_axObjectCache); | 1686 visitor->trace(m_axObjectCache); |
1688 } | 1687 } |
1689 | 1688 |
1690 } // namespace blink | 1689 } // namespace blink |
OLD | NEW |