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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 return getLayoutObject()->style()->visibility() != EVisibility::Visible; | 768 return getLayoutObject()->style()->visibility() != EVisibility::Visible; |
769 | 769 |
770 // This is an obscure corner case: if a node has no LayoutObject, that means
it's not rendered, | 770 // This is an obscure corner case: if a node has no LayoutObject, that means
it's not rendered, |
771 // but we still may be exploring it as part of a text alternative calculatio
n, for example if it | 771 // but we still may be exploring it as part of a text alternative calculatio
n, for example if it |
772 // was explicitly referenced by aria-labelledby. So we need to explicitly ca
ll the style resolver | 772 // was explicitly referenced by aria-labelledby. So we need to explicitly ca
ll the style resolver |
773 // to check whether it's invisible or display:none, rather than relying on t
he style cached in the | 773 // to check whether it's invisible or display:none, rather than relying on t
he style cached in the |
774 // LayoutObject. | 774 // LayoutObject. |
775 Document* doc = getDocument(); | 775 Document* doc = getDocument(); |
776 if (doc && doc->frame() && getNode() && getNode()->isElementNode()) { | 776 if (doc && doc->frame() && getNode() && getNode()->isElementNode()) { |
777 RefPtr<ComputedStyle> style = doc->ensureStyleResolver().styleForElement
(toElement(getNode())); | 777 RefPtr<ComputedStyle> style = doc->ensureStyleResolver().styleForElement
(toElement(getNode())); |
778 return style->display() == NONE || style->visibility() != EVisibility::V
isible; | 778 return style->display() == EDisplay::None || style->visibility() != EVis
ibility::Visible; |
779 } | 779 } |
780 | 780 |
781 return false; | 781 return false; |
782 } | 782 } |
783 | 783 |
784 String AXObject::ariaTextAlternative(bool recursive, bool inAriaLabelledByTraver
sal, AXObjectSet& visited, AXNameFrom& nameFrom, AXRelatedObjectVector* relatedO
bjects, NameSources* nameSources, bool* foundTextAlternative) const | 784 String AXObject::ariaTextAlternative(bool recursive, bool inAriaLabelledByTraver
sal, AXObjectSet& visited, AXNameFrom& nameFrom, AXRelatedObjectVector* relatedO
bjects, NameSources* nameSources, bool* foundTextAlternative) const |
785 { | 785 { |
786 String textAlternative; | 786 String textAlternative; |
787 bool alreadyVisited = visited.contains(this); | 787 bool alreadyVisited = visited.contains(this); |
788 visited.add(this); | 788 visited.add(this); |
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 | 1796 |
1797 DEFINE_TRACE(AXObject) | 1797 DEFINE_TRACE(AXObject) |
1798 { | 1798 { |
1799 visitor->trace(m_children); | 1799 visitor->trace(m_children); |
1800 visitor->trace(m_parent); | 1800 visitor->trace(m_parent); |
1801 visitor->trace(m_cachedLiveRegionRoot); | 1801 visitor->trace(m_cachedLiveRegionRoot); |
1802 visitor->trace(m_axObjectCache); | 1802 visitor->trace(m_axObjectCache); |
1803 } | 1803 } |
1804 | 1804 |
1805 } // namespace blink | 1805 } // namespace blink |
OLD | NEW |