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

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

Issue 1841333002: Various fixes for aria-activedescendant. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated tests. Stopped firing a focus changed event when the active descendant changes. 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 * Copyright (C) 2008 Nuanti Ltd. 3 * Copyright (C) 2008 Nuanti Ltd.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 const AXObject* ariaHiddenRoot() const; 639 const AXObject* ariaHiddenRoot() const;
640 bool computeIsInertOrAriaHidden(IgnoredReasons* = nullptr) const; 640 bool computeIsInertOrAriaHidden(IgnoredReasons* = nullptr) const;
641 bool isDescendantOfLeafNode() const; 641 bool isDescendantOfLeafNode() const;
642 AXObject* leafNodeAncestor() const; 642 AXObject* leafNodeAncestor() const;
643 bool isDescendantOfDisabledNode() const; 643 bool isDescendantOfDisabledNode() const;
644 const AXObject* disabledAncestor() const; 644 const AXObject* disabledAncestor() const;
645 bool lastKnownIsIgnoredValue(); 645 bool lastKnownIsIgnoredValue();
646 void setLastKnownIsIgnoredValue(bool); 646 void setLastKnownIsIgnoredValue(bool);
647 bool hasInheritedPresentationalRole() const; 647 bool hasInheritedPresentationalRole() const;
648 bool isPresentationalChild() const; 648 bool isPresentationalChild() const;
649 bool ancestorExposesActiveDescendant() const;
dmazzoni 2016/04/05 05:37:22 This needs to be cached, check the other cached at
649 650
650 // 651 //
651 // Accessible name calculation 652 // Accessible name calculation
652 // 653 //
653 654
654 // Retrieves the accessible name of the object, an enum indicating where the name 655 // Retrieves the accessible name of the object, an enum indicating where the name
655 // was derived from, and a list of objects that were used to derive the name , if any. 656 // was derived from, and a list of objects that were used to derive the name , if any.
656 virtual String name(AXNameFrom&, AXObjectVector* nameObjects) const; 657 virtual String name(AXNameFrom&, AXObjectVector* nameObjects) const;
657 658
658 typedef HeapVector<NameSource> NameSources; 659 typedef HeapVector<NameSource> NameSources;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 virtual InvalidState getInvalidState() const { return InvalidStateUndefined; } 734 virtual InvalidState getInvalidState() const { return InvalidStateUndefined; }
734 // Only used when invalidState() returns InvalidStateOther. 735 // Only used when invalidState() returns InvalidStateOther.
735 virtual String ariaInvalidValue() const { return String(); } 736 virtual String ariaInvalidValue() const { return String(); }
736 virtual String valueDescription() const { return String(); } 737 virtual String valueDescription() const { return String(); }
737 virtual float valueForRange() const { return 0.0f; } 738 virtual float valueForRange() const { return 0.0f; }
738 virtual float maxValueForRange() const { return 0.0f; } 739 virtual float maxValueForRange() const { return 0.0f; }
739 virtual float minValueForRange() const { return 0.0f; } 740 virtual float minValueForRange() const { return 0.0f; }
740 virtual String stringValue() const { return String(); } 741 virtual String stringValue() const { return String(); }
741 742
742 // ARIA attributes. 743 // ARIA attributes.
743 virtual AXObject* activeDescendant() const { return 0; } 744 virtual AXObject* activeDescendant() const { return nullptr; }
744 virtual String ariaAutoComplete() const { return String(); } 745 virtual String ariaAutoComplete() const { return String(); }
745 virtual String ariaDescribedByAttribute() const { return String(); } 746 virtual String ariaDescribedByAttribute() const { return String(); }
746 virtual void ariaFlowToElements(AXObjectVector&) const { } 747 virtual void ariaFlowToElements(AXObjectVector&) const { }
747 virtual void ariaControlsElements(AXObjectVector&) const { } 748 virtual void ariaControlsElements(AXObjectVector&) const { }
748 virtual void ariaOwnsElements(AXObjectVector& owns) const { } 749 virtual void ariaOwnsElements(AXObjectVector& owns) const { }
749 virtual void ariaDescribedbyElements(AXObjectVector&) const { } 750 virtual void ariaDescribedbyElements(AXObjectVector&) const { }
750 virtual void ariaLabelledbyElements(AXObjectVector&) const { } 751 virtual void ariaLabelledbyElements(AXObjectVector&) const { }
751 virtual bool ariaHasPopup() const { return false; } 752 virtual bool ariaHasPopup() const { return false; }
752 virtual bool isEditable() const { return false; } 753 virtual bool isEditable() const { return false; }
753 bool isMultiline() const; 754 bool isMultiline() const;
754 virtual bool isRichlyEditable() const { return false; } 755 virtual bool isRichlyEditable() const { return false; }
755 virtual String ariaLabelledbyAttribute() const { return String(); } 756 virtual String ariaLabelledbyAttribute() const { return String(); }
756 bool ariaPressedIsPresent() const; 757 bool ariaPressedIsPresent() const;
757 virtual AccessibilityRole ariaRoleAttribute() const { return UnknownRole; } 758 virtual AccessibilityRole ariaRoleAttribute() const { return UnknownRole; }
758 virtual bool ariaRoleHasPresentationalChildren() const { return false; } 759 virtual bool ariaRoleHasPresentationalChildren() const { return false; }
759 virtual AXObject* ancestorForWhichThisIsAPresentationalChild() const { retur n 0; } 760 virtual AXObject* ancestorForWhichThisIsAPresentationalChild() const { retur n 0; }
760 virtual bool shouldFocusActiveDescendant() const { return false; } 761 bool supportsActiveDescendant() const;
761 bool supportsARIAAttributes() const; 762 bool supportsARIAAttributes() const;
762 virtual bool supportsARIADragging() const { return false; } 763 virtual bool supportsARIADragging() const { return false; }
763 virtual bool supportsARIADropping() const { return false; } 764 virtual bool supportsARIADropping() const { return false; }
764 virtual bool supportsARIAFlowTo() const { return false; } 765 virtual bool supportsARIAFlowTo() const { return false; }
765 virtual bool supportsARIAOwns() const { return false; } 766 virtual bool supportsARIAOwns() const { return false; }
766 bool supportsRangeValue() const; 767 bool supportsRangeValue() const;
767 virtual SortDirection getSortDirection() const { return SortDirectionUndefin ed; } 768 virtual SortDirection getSortDirection() const { return SortDirectionUndefin ed; }
768 769
769 // Returns 0-based index. 770 // Returns 0-based index.
770 int indexInParent() const; 771 int indexInParent() const;
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ 951 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \
951 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate) 952 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate)
952 953
953 } // namespace blink 954 } // namespace blink
954 955
955 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::IgnoredReason); 956 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::IgnoredReason);
956 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NameSource); 957 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NameSource);
957 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::DescriptionSource); 958 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::DescriptionSource);
958 959
959 #endif // AXObject_h 960 #endif // AXObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698