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 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1711 Vector<String> roleVector; | 1711 Vector<String> roleVector; |
1712 role.split(' ', roleVector); | 1712 role.split(' ', roleVector); |
1713 for (const auto& child : roleVector) { | 1713 for (const auto& child : roleVector) { |
1714 if (roleSet->contains(child)) | 1714 if (roleSet->contains(child)) |
1715 return true; | 1715 return true; |
1716 } | 1716 } |
1717 return false; | 1717 return false; |
1718 } | 1718 } |
1719 | 1719 |
1720 bool AXObject::nameFromContents() const { | 1720 bool AXObject::nameFromContents() const { |
| 1721 // ARIA 1.1, section 5.2.7.5. |
1721 switch (roleValue()) { | 1722 switch (roleValue()) { |
1722 case ButtonRole: | 1723 case ButtonRole: |
| 1724 case CellRole: |
1723 case CheckBoxRole: | 1725 case CheckBoxRole: |
| 1726 case ColumnHeaderRole: |
1724 case DirectoryRole: | 1727 case DirectoryRole: |
1725 case DisclosureTriangleRole: | 1728 case DisclosureTriangleRole: |
1726 case HeadingRole: | 1729 case HeadingRole: |
1727 case LineBreakRole: | 1730 case LineBreakRole: |
1728 case LinkRole: | 1731 case LinkRole: |
1729 case ListBoxOptionRole: | 1732 case ListBoxOptionRole: |
1730 case ListItemRole: | 1733 case ListItemRole: |
1731 case MenuItemRole: | 1734 case MenuItemRole: |
1732 case MenuItemCheckBoxRole: | 1735 case MenuItemCheckBoxRole: |
1733 case MenuItemRadioRole: | 1736 case MenuItemRadioRole: |
1734 case MenuListOptionRole: | 1737 case MenuListOptionRole: |
1735 case PopUpButtonRole: | 1738 case PopUpButtonRole: |
1736 case RadioButtonRole: | 1739 case RadioButtonRole: |
| 1740 case RowHeaderRole: |
1737 case StaticTextRole: | 1741 case StaticTextRole: |
1738 case StatusRole: | 1742 case StatusRole: |
1739 case SwitchRole: | 1743 case SwitchRole: |
1740 case TabRole: | 1744 case TabRole: |
1741 case ToggleButtonRole: | 1745 case ToggleButtonRole: |
1742 case TreeItemRole: | 1746 case TreeItemRole: |
| 1747 case UserInterfaceTooltipRole: |
1743 return true; | 1748 return true; |
1744 default: | 1749 default: |
1745 return false; | 1750 return false; |
1746 } | 1751 } |
1747 } | 1752 } |
1748 | 1753 |
1749 AccessibilityRole AXObject::buttonRoleType() const { | 1754 AccessibilityRole AXObject::buttonRoleType() const { |
1750 // If aria-pressed is present, then it should be exposed as a toggle button. | 1755 // If aria-pressed is present, then it should be exposed as a toggle button. |
1751 // http://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed | 1756 // http://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed |
1752 if (ariaPressedIsPresent()) | 1757 if (ariaPressedIsPresent()) |
(...skipping 20 matching lines...) Expand all Loading... |
1773 } | 1778 } |
1774 | 1779 |
1775 DEFINE_TRACE(AXObject) { | 1780 DEFINE_TRACE(AXObject) { |
1776 visitor->trace(m_children); | 1781 visitor->trace(m_children); |
1777 visitor->trace(m_parent); | 1782 visitor->trace(m_parent); |
1778 visitor->trace(m_cachedLiveRegionRoot); | 1783 visitor->trace(m_cachedLiveRegionRoot); |
1779 visitor->trace(m_axObjectCache); | 1784 visitor->trace(m_axObjectCache); |
1780 } | 1785 } |
1781 | 1786 |
1782 } // namespace blink | 1787 } // namespace blink |
OLD | NEW |