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

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

Issue 1301993003: Last few steps of text alternative computation algorithm (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Testing all the special cases Created 5 years, 4 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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 updateCachedAttributeValuesIfNeeded(); 664 updateCachedAttributeValuesIfNeeded();
665 return m_cachedHasInheritedPresentationalRole; 665 return m_cachedHasInheritedPresentationalRole;
666 } 666 }
667 667
668 bool AXObject::isPresentationalChild() const 668 bool AXObject::isPresentationalChild() const
669 { 669 {
670 updateCachedAttributeValuesIfNeeded(); 670 updateCachedAttributeValuesIfNeeded();
671 return m_cachedIsPresentationalChild; 671 return m_cachedIsPresentationalChild;
672 } 672 }
673 673
674 String AXObject::name(AXNameFrom& nameFrom, AXObjectVector& nameObjects) const 674 String AXObject::name(AXNameFrom& nameFrom, AXObjectVector* nameObjects) const
675 { 675 {
676 WillBeHeapHashSet<RawPtrWillBeMember<const AXObject>> visited; 676 WillBeHeapHashSet<RawPtrWillBeMember<const AXObject>> visited;
677 return textAlternative(false, false, visited, nameFrom, nameObjects, nullptr ); 677 return textAlternative(false, false, visited, nameFrom, nameObjects, nullptr );
678 } 678 }
679 679
680 String AXObject::name(NameSources* nameSources) const 680 String AXObject::name(NameSources* nameSources) const
681 { 681 {
682 AXObjectSet visited; 682 AXObjectSet visited;
683 AXNameFrom tmpNameFrom; 683 AXNameFrom tmpNameFrom;
684 AXObjectVector tmpNameObjects; 684 AXObjectVector tmpNameObjects;
685 return textAlternative(false, false, visited, tmpNameFrom, tmpNameObjects, n ameSources); 685 return textAlternative(false, false, visited, tmpNameFrom, &tmpNameObjects, nameSources);
686 } 686 }
687 687
688 String AXObject::recursiveTextAlternative(const AXObject& axObj, bool inAriaLabe lledByTraversal, AXObjectSet& visited) 688 String AXObject::recursiveTextAlternative(const AXObject& axObj, bool inAriaLabe lledByTraversal, AXObjectSet& visited)
689 { 689 {
690 AXNameFrom unusedRecursiveNameFrom; 690 AXNameFrom tmpNameFrom;
691 AXObjectVector unusedRecursiveNameObjects; 691 return axObj.textAlternative(true, inAriaLabelledByTraversal, visited, tmpNa meFrom, nullptr, nullptr);
692 return axObj.textAlternative(true, inAriaLabelledByTraversal, visited, unuse dRecursiveNameFrom, unusedRecursiveNameObjects, nullptr);
693 } 692 }
694 693
695 // In ARIA 1.1, the default value for aria-orientation changed from horizontal t o undefined. 694 // In ARIA 1.1, the default value for aria-orientation changed from horizontal t o undefined.
696 AccessibilityOrientation AXObject::orientation() const 695 AccessibilityOrientation AXObject::orientation() const
697 { 696 {
698 return AccessibilityOrientationUndefined; 697 return AccessibilityOrientationUndefined;
699 } 698 }
700 699
701 static String queryString(WebLocalizedString::Name name) 700 static String queryString(WebLocalizedString::Name name)
702 { 701 {
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 1501
1503 DEFINE_TRACE(AXObject) 1502 DEFINE_TRACE(AXObject)
1504 { 1503 {
1505 visitor->trace(m_children); 1504 visitor->trace(m_children);
1506 visitor->trace(m_parent); 1505 visitor->trace(m_parent);
1507 visitor->trace(m_cachedLiveRegionRoot); 1506 visitor->trace(m_cachedLiveRegionRoot);
1508 visitor->trace(m_axObjectCache); 1507 visitor->trace(m_axObjectCache);
1509 } 1508 }
1510 1509
1511 } // namespace blink 1510 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698