| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 "progressbar", "radio", "scrollbar", "slider", "spinbutton", "status", | 314 "progressbar", "radio", "scrollbar", "slider", "spinbutton", "status", |
| 315 "tab", "tabpanel", "textbox", "timer", "tooltip", "treeitem", | 315 "tab", "tabpanel", "textbox", "timer", "tooltip", "treeitem", |
| 316 // Composite user interface widgets. | 316 // Composite user interface widgets. |
| 317 // This list is also from the w3.org site referenced above. | 317 // This list is also from the w3.org site referenced above. |
| 318 "combobox", "grid", "listbox", "menu", "menubar", "radiogroup", "tablist", | 318 "combobox", "grid", "listbox", "menu", "menubar", "radiogroup", "tablist", |
| 319 "tree", "treegrid"}; | 319 "tree", "treegrid"}; |
| 320 | 320 |
| 321 static ARIAWidgetSet* createARIARoleWidgetSet() { | 321 static ARIAWidgetSet* createARIARoleWidgetSet() { |
| 322 ARIAWidgetSet* widgetSet = new HashSet<String, CaseFoldingHash>(); | 322 ARIAWidgetSet* widgetSet = new HashSet<String, CaseFoldingHash>(); |
| 323 for (size_t i = 0; i < WTF_ARRAY_LENGTH(ariaWidgets); ++i) | 323 for (size_t i = 0; i < WTF_ARRAY_LENGTH(ariaWidgets); ++i) |
| 324 widgetSet->add(String(ariaWidgets[i])); | 324 widgetSet->insert(String(ariaWidgets[i])); |
| 325 return widgetSet; | 325 return widgetSet; |
| 326 } | 326 } |
| 327 | 327 |
| 328 const char* ariaInteractiveWidgetAttributes[] = { | 328 const char* ariaInteractiveWidgetAttributes[] = { |
| 329 // These attributes implicitly indicate the given widget is interactive. | 329 // These attributes implicitly indicate the given widget is interactive. |
| 330 // From http://www.w3.org/TR/wai-aria/states_and_properties#attrs_widgets | 330 // From http://www.w3.org/TR/wai-aria/states_and_properties#attrs_widgets |
| 331 "aria-activedescendant", "aria-checked", "aria-controls", | 331 "aria-activedescendant", "aria-checked", "aria-controls", |
| 332 "aria-disabled", // If it's disabled, it can be made interactive. | 332 "aria-disabled", // If it's disabled, it can be made interactive. |
| 333 "aria-expanded", "aria-haspopup", "aria-multiselectable", | 333 "aria-expanded", "aria-haspopup", "aria-multiselectable", |
| 334 "aria-pressed", "aria-required", "aria-selected"}; | 334 "aria-pressed", "aria-required", "aria-selected"}; |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 | 737 |
| 738 String AXObject::ariaTextAlternative(bool recursive, | 738 String AXObject::ariaTextAlternative(bool recursive, |
| 739 bool inAriaLabelledByTraversal, | 739 bool inAriaLabelledByTraversal, |
| 740 AXObjectSet& visited, | 740 AXObjectSet& visited, |
| 741 AXNameFrom& nameFrom, | 741 AXNameFrom& nameFrom, |
| 742 AXRelatedObjectVector* relatedObjects, | 742 AXRelatedObjectVector* relatedObjects, |
| 743 NameSources* nameSources, | 743 NameSources* nameSources, |
| 744 bool* foundTextAlternative) const { | 744 bool* foundTextAlternative) const { |
| 745 String textAlternative; | 745 String textAlternative; |
| 746 bool alreadyVisited = visited.contains(this); | 746 bool alreadyVisited = visited.contains(this); |
| 747 visited.add(this); | 747 visited.insert(this); |
| 748 | 748 |
| 749 // Step 2A from: http://www.w3.org/TR/accname-aam-1.1 | 749 // Step 2A from: http://www.w3.org/TR/accname-aam-1.1 |
| 750 // If you change this logic, update AXNodeObject::nameFromLabelElement, too. | 750 // If you change this logic, update AXNodeObject::nameFromLabelElement, too. |
| 751 if (!inAriaLabelledByTraversal && isHiddenForTextAlternativeCalculation()) { | 751 if (!inAriaLabelledByTraversal && isHiddenForTextAlternativeCalculation()) { |
| 752 *foundTextAlternative = true; | 752 *foundTextAlternative = true; |
| 753 return String(); | 753 return String(); |
| 754 } | 754 } |
| 755 | 755 |
| 756 // Step 2B from: http://www.w3.org/TR/accname-aam-1.1 | 756 // Step 2B from: http://www.w3.org/TR/accname-aam-1.1 |
| 757 // If you change this logic, update AXNodeObject::nameFromLabelElement, too. | 757 // If you change this logic, update AXNodeObject::nameFromLabelElement, too. |
| (...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1746 } | 1746 } |
| 1747 | 1747 |
| 1748 DEFINE_TRACE(AXObject) { | 1748 DEFINE_TRACE(AXObject) { |
| 1749 visitor->trace(m_children); | 1749 visitor->trace(m_children); |
| 1750 visitor->trace(m_parent); | 1750 visitor->trace(m_parent); |
| 1751 visitor->trace(m_cachedLiveRegionRoot); | 1751 visitor->trace(m_cachedLiveRegionRoot); |
| 1752 visitor->trace(m_axObjectCache); | 1752 visitor->trace(m_axObjectCache); |
| 1753 } | 1753 } |
| 1754 | 1754 |
| 1755 } // namespace blink | 1755 } // namespace blink |
| OLD | NEW |