Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXObject.cpp

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 AXNameFrom tmpNameFrom; 702 AXNameFrom tmpNameFrom;
703 return axObj.textAlternative(true, inAriaLabelledByTraversal, visited, 703 return axObj.textAlternative(true, inAriaLabelledByTraversal, visited,
704 tmpNameFrom, nullptr, nullptr); 704 tmpNameFrom, nullptr, nullptr);
705 } 705 }
706 706
707 bool AXObject::isHiddenForTextAlternativeCalculation() const { 707 bool AXObject::isHiddenForTextAlternativeCalculation() const {
708 if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "false")) 708 if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "false"))
709 return false; 709 return false;
710 710
711 if (getLayoutObject()) 711 if (getLayoutObject())
712 return getLayoutObject()->style()->visibility() != EVisibility::Visible; 712 return getLayoutObject()->style()->visibility() != EVisibility::kVisible;
713 713
714 // This is an obscure corner case: if a node has no LayoutObject, that means 714 // This is an obscure corner case: if a node has no LayoutObject, that means
715 // it's not rendered, but we still may be exploring it as part of a text 715 // it's not rendered, but we still may be exploring it as part of a text
716 // alternative calculation, for example if it was explicitly referenced by 716 // alternative calculation, for example if it was explicitly referenced by
717 // aria-labelledby. So we need to explicitly call the style resolver to check 717 // aria-labelledby. So we need to explicitly call the style resolver to check
718 // whether it's invisible or display:none, rather than relying on the style 718 // whether it's invisible or display:none, rather than relying on the style
719 // cached in the LayoutObject. 719 // cached in the LayoutObject.
720 Document* doc = getDocument(); 720 Document* doc = getDocument();
721 if (doc && doc->frame() && getNode() && getNode()->isElementNode()) { 721 if (doc && doc->frame() && getNode() && getNode()->isElementNode()) {
722 RefPtr<ComputedStyle> style = 722 RefPtr<ComputedStyle> style =
723 doc->ensureStyleResolver().styleForElement(toElement(getNode())); 723 doc->ensureStyleResolver().styleForElement(toElement(getNode()));
724 return style->display() == EDisplay::None || 724 return style->display() == EDisplay::None ||
725 style->visibility() != EVisibility::Visible; 725 style->visibility() != EVisibility::kVisible;
726 } 726 }
727 727
728 return false; 728 return false;
729 } 729 }
730 730
731 String AXObject::ariaTextAlternative(bool recursive, 731 String AXObject::ariaTextAlternative(bool recursive,
732 bool inAriaLabelledByTraversal, 732 bool inAriaLabelledByTraversal,
733 AXObjectSet& visited, 733 AXObjectSet& visited,
734 AXNameFrom& nameFrom, 734 AXNameFrom& nameFrom,
735 AXRelatedObjectVector* relatedObjects, 735 AXRelatedObjectVector* relatedObjects,
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
1739 } 1739 }
1740 1740
1741 DEFINE_TRACE(AXObject) { 1741 DEFINE_TRACE(AXObject) {
1742 visitor->trace(m_children); 1742 visitor->trace(m_children);
1743 visitor->trace(m_parent); 1743 visitor->trace(m_parent);
1744 visitor->trace(m_cachedLiveRegionRoot); 1744 visitor->trace(m_cachedLiveRegionRoot);
1745 visitor->trace(m_axObjectCache); 1745 visitor->trace(m_axObjectCache);
1746 } 1746 }
1747 1747
1748 } // namespace blink 1748 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698