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 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 AXNameFrom tmpNameFrom; | 754 AXNameFrom tmpNameFrom; |
755 return axObj.textAlternative(true, inAriaLabelledByTraversal, visited, tmpNa
meFrom, nullptr, nullptr); | 755 return axObj.textAlternative(true, inAriaLabelledByTraversal, visited, tmpNa
meFrom, nullptr, nullptr); |
756 } | 756 } |
757 | 757 |
758 bool AXObject::isHiddenForTextAlternativeCalculation() const | 758 bool AXObject::isHiddenForTextAlternativeCalculation() const |
759 { | 759 { |
760 if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "false")) | 760 if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "false")) |
761 return false; | 761 return false; |
762 | 762 |
763 if (getLayoutObject()) | 763 if (getLayoutObject()) |
764 return getLayoutObject()->style()->visibility() != VISIBLE; | 764 return getLayoutObject()->style()->visibility() != EVisibility::Visible; |
765 | 765 |
766 // This is an obscure corner case: if a node has no LayoutObject, that means
it's not rendered, | 766 // This is an obscure corner case: if a node has no LayoutObject, that means
it's not rendered, |
767 // but we still may be exploring it as part of a text alternative calculatio
n, for example if it | 767 // but we still may be exploring it as part of a text alternative calculatio
n, for example if it |
768 // was explicitly referenced by aria-labelledby. So we need to explicitly ca
ll the style resolver | 768 // was explicitly referenced by aria-labelledby. So we need to explicitly ca
ll the style resolver |
769 // to check whether it's invisible or display:none, rather than relying on t
he style cached in the | 769 // to check whether it's invisible or display:none, rather than relying on t
he style cached in the |
770 // LayoutObject. | 770 // LayoutObject. |
771 Document* doc = getDocument(); | 771 Document* doc = getDocument(); |
772 if (doc && doc->frame() && getNode() && getNode()->isElementNode()) { | 772 if (doc && doc->frame() && getNode() && getNode()->isElementNode()) { |
773 RefPtr<ComputedStyle> style = doc->ensureStyleResolver().styleForElement
(toElement(getNode())); | 773 RefPtr<ComputedStyle> style = doc->ensureStyleResolver().styleForElement
(toElement(getNode())); |
774 return style->display() == NONE || style->visibility() != VISIBLE; | 774 return style->display() == NONE || style->visibility() != EVisibility::V
isible; |
775 } | 775 } |
776 | 776 |
777 return false; | 777 return false; |
778 } | 778 } |
779 | 779 |
780 String AXObject::ariaTextAlternative(bool recursive, bool inAriaLabelledByTraver
sal, AXObjectSet& visited, AXNameFrom& nameFrom, AXRelatedObjectVector* relatedO
bjects, NameSources* nameSources, bool* foundTextAlternative) const | 780 String AXObject::ariaTextAlternative(bool recursive, bool inAriaLabelledByTraver
sal, AXObjectSet& visited, AXNameFrom& nameFrom, AXRelatedObjectVector* relatedO
bjects, NameSources* nameSources, bool* foundTextAlternative) const |
781 { | 781 { |
782 String textAlternative; | 782 String textAlternative; |
783 bool alreadyVisited = visited.contains(this); | 783 bool alreadyVisited = visited.contains(this); |
784 visited.add(this); | 784 visited.add(this); |
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1752 | 1752 |
1753 DEFINE_TRACE(AXObject) | 1753 DEFINE_TRACE(AXObject) |
1754 { | 1754 { |
1755 visitor->trace(m_children); | 1755 visitor->trace(m_children); |
1756 visitor->trace(m_parent); | 1756 visitor->trace(m_parent); |
1757 visitor->trace(m_cachedLiveRegionRoot); | 1757 visitor->trace(m_cachedLiveRegionRoot); |
1758 visitor->trace(m_axObjectCache); | 1758 visitor->trace(m_axObjectCache); |
1759 } | 1759 } |
1760 | 1760 |
1761 } // namespace blink | 1761 } // namespace blink |
OLD | NEW |