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 * 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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 virtual bool isMeter() const { return false; } | 546 virtual bool isMeter() const { return false; } |
547 virtual bool isMockObject() const { return false; } | 547 virtual bool isMockObject() const { return false; } |
548 virtual bool isNativeSpinButton() const { return false; } | 548 virtual bool isNativeSpinButton() const { return false; } |
549 virtual bool isNativeTextControl() const { return false; } // input or texta
rea | 549 virtual bool isNativeTextControl() const { return false; } // input or texta
rea |
550 virtual bool isNonNativeTextControl() const { return false; } // contentedit
able or role=textbox | 550 virtual bool isNonNativeTextControl() const { return false; } // contentedit
able or role=textbox |
551 virtual bool isPasswordField() const { return false; } | 551 virtual bool isPasswordField() const { return false; } |
552 virtual bool isPasswordFieldAndShouldHideValue() const; | 552 virtual bool isPasswordFieldAndShouldHideValue() const; |
553 bool isPresentational() const { return roleValue() == NoneRole || roleValue(
) == PresentationalRole; } | 553 bool isPresentational() const { return roleValue() == NoneRole || roleValue(
) == PresentationalRole; } |
554 virtual bool isProgressIndicator() const { return false; } | 554 virtual bool isProgressIndicator() const { return false; } |
555 bool isRadioButton() const { return roleValue() == RadioButtonRole; } | 555 bool isRadioButton() const { return roleValue() == RadioButtonRole; } |
| 556 bool isRange() const { return roleValue() == ProgressIndicatorRole || roleVa
lue() == ScrollBarRole || roleValue() == SliderRole || roleValue() == SpinButton
Role; } |
556 bool isScrollbar() const { return roleValue() == ScrollBarRole; } | 557 bool isScrollbar() const { return roleValue() == ScrollBarRole; } |
557 virtual bool isSlider() const { return false; } | 558 virtual bool isSlider() const { return false; } |
558 virtual bool isNativeSlider() const { return false; } | 559 virtual bool isNativeSlider() const { return false; } |
559 virtual bool isSpinButton() const { return roleValue() == SpinButtonRole; } | 560 virtual bool isSpinButton() const { return roleValue() == SpinButtonRole; } |
560 virtual bool isSpinButtonPart() const { return false; } | 561 virtual bool isSpinButtonPart() const { return false; } |
561 bool isTabItem() const { return roleValue() == TabRole; } | 562 bool isTabItem() const { return roleValue() == TabRole; } |
562 virtual bool isTableCell() const { return false; } | 563 virtual bool isTableCell() const { return false; } |
563 virtual bool isTableRow() const { return false; } | 564 virtual bool isTableRow() const { return false; } |
564 virtual bool isTextControl() const { return false; } | 565 virtual bool isTextControl() const { return false; } |
565 virtual bool isTableCol() const { return false; } | 566 virtual bool isTableCol() const { return false; } |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 virtual String deprecatedTitle(TextUnderElementMode mode = TextUnderElementA
ll) const { return String(); } | 627 virtual String deprecatedTitle(TextUnderElementMode mode = TextUnderElementA
ll) const { return String(); } |
627 virtual String deprecatedHelpText() const { return String(); } | 628 virtual String deprecatedHelpText() const { return String(); } |
628 virtual String deprecatedTextUnderElement(TextUnderElementMode mode = TextUn
derElementAll) const { return String(); } | 629 virtual String deprecatedTextUnderElement(TextUnderElementMode mode = TextUn
derElementAll) const { return String(); } |
629 | 630 |
630 // | 631 // |
631 // New text alternative calculation API (under development). | 632 // New text alternative calculation API (under development). |
632 // | 633 // |
633 | 634 |
634 // Retrieves the accessible name of the object, an enum indicating where the
name | 635 // Retrieves the accessible name of the object, an enum indicating where the
name |
635 // was derived from, and a list of objects that were used to derive the name
, if any. | 636 // was derived from, and a list of objects that were used to derive the name
, if any. |
636 virtual String name(AXNameFrom&, AXObjectVector& nameObjects) const; | 637 virtual String name(AXNameFrom&, AXObjectVector* nameObjects) const; |
637 | 638 |
638 typedef WillBeHeapVector<NameSource> NameSources; | 639 typedef WillBeHeapVector<NameSource> NameSources; |
639 // Retrieves the accessible name of the object and a list of all potential s
ources | 640 // Retrieves the accessible name of the object and a list of all potential s
ources |
640 // for the name, indicating which were used. | 641 // for the name, indicating which were used. |
641 virtual String name(NameSources*) const; | 642 virtual String name(NameSources*) const; |
642 | 643 |
643 // Takes the result of nameFrom from calling |name|, above, and retrieves th
e | 644 // Takes the result of nameFrom from calling |name|, above, and retrieves th
e |
644 // accessible description of the object, which is secondary to |name|, an en
um indicating | 645 // accessible description of the object, which is secondary to |name|, an en
um indicating |
645 // where the description was derived from, and a list of objects that were u
sed to | 646 // where the description was derived from, and a list of objects that were u
sed to |
646 // derive the description, if any. | 647 // derive the description, if any. |
647 virtual String description(AXNameFrom, AXDescriptionFrom&, AXObjectVector& d
escriptionObjects) { return String(); } | 648 virtual String description(AXNameFrom, AXDescriptionFrom&, AXObjectVector* d
escriptionObjects) { return String(); } |
648 | 649 |
649 // Takes the result of nameFrom and descriptionFrom from calling |name| and
|description|, | 650 // Takes the result of nameFrom and descriptionFrom from calling |name| and
|description|, |
650 // above, and retrieves the placeholder of the object, if present and if it
wasn't already | 651 // above, and retrieves the placeholder of the object, if present and if it
wasn't already |
651 // exposed by one of the two functions above. | 652 // exposed by one of the two functions above. |
652 virtual String placeholder(AXNameFrom, AXDescriptionFrom) { return String();
} | 653 virtual String placeholder(AXNameFrom, AXDescriptionFrom) { return String();
} |
653 | 654 |
654 // Internal function used by name and description, above. | 655 // Internal function used by name and description, above. |
655 typedef WillBeHeapHashSet<RawPtrWillBeMember<const AXObject>> AXObjectSet; | 656 typedef WillBeHeapHashSet<RawPtrWillBeMember<const AXObject>> AXObjectSet; |
656 virtual String textAlternative(bool recursive, bool inAriaLabelledByTraversa
l, AXObjectSet& visited, AXNameFrom& nameFrom, AXObjectVector& nameObjects, Name
Sources* nameSources) const { return String(); } | 657 virtual String textAlternative(bool recursive, bool inAriaLabelledByTraversa
l, AXObjectSet& visited, AXNameFrom& nameFrom, AXObjectVector* nameObjects, Name
Sources* nameSources) const { return String(); } |
657 | 658 |
658 // Returns result of Accessible Name Calculation algorithm. | 659 // Returns result of Accessible Name Calculation algorithm. |
659 // This is a simpler high-level interface to |name| used by Inspector. | 660 // This is a simpler high-level interface to |name| used by Inspector. |
660 virtual String computedName() const { return String(); } | 661 virtual String computedName() const { return String(); } |
661 | 662 |
662 // | 663 // |
663 // Properties of static elements. | 664 // Properties of static elements. |
664 // | 665 // |
665 | 666 |
666 virtual const AtomicString& accessKey() const { return nullAtom; } | 667 virtual const AtomicString& accessKey() const { return nullAtom; } |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 | 919 |
919 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 920 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
920 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) | 921 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) |
921 | 922 |
922 } // namespace blink | 923 } // namespace blink |
923 | 924 |
924 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::IgnoredReason); | 925 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::IgnoredReason); |
925 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NameSource); | 926 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NameSource); |
926 | 927 |
927 #endif // AXObject_h | 928 #endif // AXObject_h |
OLD | NEW |