Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXObject.cpp

Issue 2788523002: Finish all string attributes for Accessibility Object Model Phase 1. (Closed)
Patch Set: Test that checked works with true/false, not only 'true' and 'false' Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 case LinkRole: 945 case LinkRole:
946 return AXSupportedAction::Jump; 946 return AXSupportedAction::Jump;
947 case PopUpButtonRole: 947 case PopUpButtonRole:
948 return AXSupportedAction::Open; 948 return AXSupportedAction::Open;
949 default: 949 default:
950 return AXSupportedAction::Click; 950 return AXSupportedAction::Click;
951 } 951 }
952 } 952 }
953 953
954 AccessibilityButtonState AXObject::checkboxOrRadioValue() const { 954 AccessibilityButtonState AXObject::checkboxOrRadioValue() const {
955 const AtomicString& checkedAttribute = getAttribute(aria_checkedAttr); 955 const AtomicString& checkedAttribute =
956 getAOMPropertyOrARIAAttribute(AOMStringProperty::kChecked);
956 if (equalIgnoringCase(checkedAttribute, "true")) 957 if (equalIgnoringCase(checkedAttribute, "true"))
957 return ButtonStateOn; 958 return ButtonStateOn;
958 959
959 if (equalIgnoringCase(checkedAttribute, "mixed")) { 960 if (equalIgnoringCase(checkedAttribute, "mixed")) {
960 // Only checkboxes should support the mixed state. 961 // Only checkboxes should support the mixed state.
961 AccessibilityRole role = ariaRoleAttribute(); 962 AccessibilityRole role = ariaRoleAttribute();
962 if (role == CheckBoxRole || role == MenuItemCheckBoxRole) 963 if (role == CheckBoxRole || role == MenuItemCheckBoxRole)
963 return ButtonStateMixed; 964 return ButtonStateMixed;
964 } 965 }
965 966
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
1784 } 1785 }
1785 1786
1786 DEFINE_TRACE(AXObject) { 1787 DEFINE_TRACE(AXObject) {
1787 visitor->trace(m_children); 1788 visitor->trace(m_children);
1788 visitor->trace(m_parent); 1789 visitor->trace(m_parent);
1789 visitor->trace(m_cachedLiveRegionRoot); 1790 visitor->trace(m_cachedLiveRegionRoot);
1790 visitor->trace(m_axObjectCache); 1791 visitor->trace(m_axObjectCache);
1791 } 1792 }
1792 1793
1793 } // namespace blink 1794 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698