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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 } | 670 } |
671 | 671 |
672 String AXObject::name(AXNameFrom& nameFrom, | 672 String AXObject::name(AXNameFrom& nameFrom, |
673 AXObject::AXObjectVector* nameObjects) const { | 673 AXObject::AXObjectVector* nameObjects) const { |
674 HeapHashSet<Member<const AXObject>> visited; | 674 HeapHashSet<Member<const AXObject>> visited; |
675 AXRelatedObjectVector relatedObjects; | 675 AXRelatedObjectVector relatedObjects; |
676 String text = textAlternative(false, false, visited, nameFrom, | 676 String text = textAlternative(false, false, visited, nameFrom, |
677 &relatedObjects, nullptr); | 677 &relatedObjects, nullptr); |
678 | 678 |
679 AccessibilityRole role = roleValue(); | 679 AccessibilityRole role = roleValue(); |
680 if (!getNode() || (!isHTMLBRElement(getNode()) && role != StaticTextRole && | 680 if (!getNode() || |
681 role != InlineTextBoxRole)) | 681 (!isHTMLBRElement(getNode()) && role != StaticTextRole && |
| 682 role != InlineTextBoxRole)) |
682 text = collapseWhitespace(text); | 683 text = collapseWhitespace(text); |
683 | 684 |
684 if (nameObjects) { | 685 if (nameObjects) { |
685 nameObjects->clear(); | 686 nameObjects->clear(); |
686 for (size_t i = 0; i < relatedObjects.size(); i++) | 687 for (size_t i = 0; i < relatedObjects.size(); i++) |
687 nameObjects->push_back(relatedObjects[i]->object); | 688 nameObjects->push_back(relatedObjects[i]->object); |
688 } | 689 } |
689 | 690 |
690 return text; | 691 return text; |
691 } | 692 } |
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1762 } | 1763 } |
1763 | 1764 |
1764 DEFINE_TRACE(AXObject) { | 1765 DEFINE_TRACE(AXObject) { |
1765 visitor->trace(m_children); | 1766 visitor->trace(m_children); |
1766 visitor->trace(m_parent); | 1767 visitor->trace(m_parent); |
1767 visitor->trace(m_cachedLiveRegionRoot); | 1768 visitor->trace(m_cachedLiveRegionRoot); |
1768 visitor->trace(m_axObjectCache); | 1769 visitor->trace(m_axObjectCache); |
1769 } | 1770 } |
1770 | 1771 |
1771 } // namespace blink | 1772 } // namespace blink |
OLD | NEW |