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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 AXObjectSet visited; | 741 AXObjectSet visited; |
742 AXNameFrom tmpNameFrom; | 742 AXNameFrom tmpNameFrom; |
743 AXRelatedObjectVector tmpRelatedObjects; | 743 AXRelatedObjectVector tmpRelatedObjects; |
744 String text = textAlternative(false, false, visited, tmpNameFrom, &tmpRelate
dObjects, nameSources); | 744 String text = textAlternative(false, false, visited, tmpNameFrom, &tmpRelate
dObjects, nameSources); |
745 text = text.simplifyWhiteSpace(isHTMLSpace<UChar>); | 745 text = text.simplifyWhiteSpace(isHTMLSpace<UChar>); |
746 return text; | 746 return text; |
747 } | 747 } |
748 | 748 |
749 String AXObject::recursiveTextAlternative(const AXObject& axObj, bool inAriaLabe
lledByTraversal, AXObjectSet& visited) | 749 String AXObject::recursiveTextAlternative(const AXObject& axObj, bool inAriaLabe
lledByTraversal, AXObjectSet& visited) |
750 { | 750 { |
| 751 if (visited.contains(&axObj) && !inAriaLabelledByTraversal) |
| 752 return String(); |
| 753 |
751 AXNameFrom tmpNameFrom; | 754 AXNameFrom tmpNameFrom; |
752 return axObj.textAlternative(true, inAriaLabelledByTraversal, visited, tmpNa
meFrom, nullptr, nullptr); | 755 return axObj.textAlternative(true, inAriaLabelledByTraversal, visited, tmpNa
meFrom, nullptr, nullptr); |
753 } | 756 } |
754 | 757 |
755 bool AXObject::isHiddenForTextAlternativeCalculation() const | 758 bool AXObject::isHiddenForTextAlternativeCalculation() const |
756 { | 759 { |
757 if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "false")) | 760 if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "false")) |
758 return false; | 761 return false; |
759 | 762 |
760 if (getLayoutObject()) | 763 if (getLayoutObject()) |
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1731 | 1734 |
1732 DEFINE_TRACE(AXObject) | 1735 DEFINE_TRACE(AXObject) |
1733 { | 1736 { |
1734 visitor->trace(m_children); | 1737 visitor->trace(m_children); |
1735 visitor->trace(m_parent); | 1738 visitor->trace(m_parent); |
1736 visitor->trace(m_cachedLiveRegionRoot); | 1739 visitor->trace(m_cachedLiveRegionRoot); |
1737 visitor->trace(m_axObjectCache); | 1740 visitor->trace(m_axObjectCache); |
1738 } | 1741 } |
1739 | 1742 |
1740 } // namespace blink | 1743 } // namespace blink |
OLD | NEW |