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

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

Issue 1885453002: Rename Node::treeScope() to Node::treeScopeOrDocument() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 attributeValue.split(' ', tokens); 889 attributeValue.split(' ', tokens);
890 } 890 }
891 891
892 void AXObject::elementsFromAttribute(HeapVector<Member<Element>>& elements, cons t QualifiedName& attribute) const 892 void AXObject::elementsFromAttribute(HeapVector<Member<Element>>& elements, cons t QualifiedName& attribute) const
893 { 893 {
894 Vector<String> ids; 894 Vector<String> ids;
895 tokenVectorFromAttribute(ids, attribute); 895 tokenVectorFromAttribute(ids, attribute);
896 if (ids.isEmpty()) 896 if (ids.isEmpty())
897 return; 897 return;
898 898
899 TreeScope& scope = getNode()->treeScope(); 899 TreeScope& scope = getNode()->treeScopeOrDocument();
900 for (const auto& id : ids) { 900 for (const auto& id : ids) {
901 if (Element* idElement = scope.getElementById(AtomicString(id))) 901 if (Element* idElement = scope.getElementById(AtomicString(id)))
902 elements.append(idElement); 902 elements.append(idElement);
903 } 903 }
904 } 904 }
905 905
906 void AXObject::ariaLabelledbyElementVector(HeapVector<Member<Element>>& elements ) const 906 void AXObject::ariaLabelledbyElementVector(HeapVector<Member<Element>>& elements ) const
907 { 907 {
908 // Try both spellings, but prefer aria-labelledby, which is the official spe c. 908 // Try both spellings, but prefer aria-labelledby, which is the official spe c.
909 elementsFromAttribute(elements, aria_labelledbyAttr); 909 elementsFromAttribute(elements, aria_labelledbyAttr);
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 1733
1734 DEFINE_TRACE(AXObject) 1734 DEFINE_TRACE(AXObject)
1735 { 1735 {
1736 visitor->trace(m_children); 1736 visitor->trace(m_children);
1737 visitor->trace(m_parent); 1737 visitor->trace(m_parent);
1738 visitor->trace(m_cachedLiveRegionRoot); 1738 visitor->trace(m_cachedLiveRegionRoot);
1739 visitor->trace(m_axObjectCache); 1739 visitor->trace(m_axObjectCache);
1740 } 1740 }
1741 1741
1742 } // namespace blink 1742 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698