Chromium Code Reviews| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 254 AccessibilityTextDirectionTopToBottom, | 254 AccessibilityTextDirectionTopToBottom, |
| 255 AccessibilityTextDirectionBottomToTop | 255 AccessibilityTextDirectionBottomToTop |
| 256 }; | 256 }; |
| 257 | 257 |
| 258 enum AccessibilityExpanded { | 258 enum AccessibilityExpanded { |
| 259 ExpandedUndefined = 0, | 259 ExpandedUndefined = 0, |
| 260 ExpandedCollapsed, | 260 ExpandedCollapsed, |
| 261 ExpandedExpanded, | 261 ExpandedExpanded, |
| 262 }; | 262 }; |
| 263 | 263 |
| 264 enum AccessibilityDefined { | |
|
dmazzoni
2014/11/19 17:20:17
The enum looks great but I'm not sure I like calli
je_julie(Not used)
2014/11/20 02:37:43
Good idea.
I updated patchset with that.
| |
| 265 DefinedUndefined = 0, | |
| 266 DefinedFalse, | |
| 267 DefinedTrue | |
| 268 }; | |
| 269 | |
| 264 class AXObject : public RefCounted<AXObject> { | 270 class AXObject : public RefCounted<AXObject> { |
| 265 public: | 271 public: |
| 266 typedef Vector<RefPtr<AXObject> > AccessibilityChildrenVector; | 272 typedef Vector<RefPtr<AXObject> > AccessibilityChildrenVector; |
| 267 | 273 |
| 268 struct PlainTextRange { | 274 struct PlainTextRange { |
| 269 | 275 |
| 270 unsigned start; | 276 unsigned start; |
| 271 unsigned length; | 277 unsigned length; |
| 272 | 278 |
| 273 PlainTextRange() | 279 PlainTextRange() |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 441 virtual void ariaControlsElements(AccessibilityChildrenVector&) const { } | 447 virtual void ariaControlsElements(AccessibilityChildrenVector&) const { } |
| 442 virtual void ariaDescribedbyElements(AccessibilityChildrenVector& describedb y) const { }; | 448 virtual void ariaDescribedbyElements(AccessibilityChildrenVector& describedb y) const { }; |
| 443 virtual void ariaLabelledbyElements(AccessibilityChildrenVector& labelledby) const { }; | 449 virtual void ariaLabelledbyElements(AccessibilityChildrenVector& labelledby) const { }; |
| 444 virtual void ariaOwnsElements(AccessibilityChildrenVector& owns) const { }; | 450 virtual void ariaOwnsElements(AccessibilityChildrenVector& owns) const { }; |
| 445 virtual bool ariaHasPopup() const { return false; } | 451 virtual bool ariaHasPopup() const { return false; } |
| 446 bool ariaIsMultiline() const; | 452 bool ariaIsMultiline() const; |
| 447 virtual String ariaLabeledByAttribute() const { return String(); } | 453 virtual String ariaLabeledByAttribute() const { return String(); } |
| 448 bool ariaPressedIsPresent() const; | 454 bool ariaPressedIsPresent() const; |
| 449 virtual AccessibilityRole ariaRoleAttribute() const { return UnknownRole; } | 455 virtual AccessibilityRole ariaRoleAttribute() const { return UnknownRole; } |
| 450 virtual bool ariaRoleHasPresentationalChildren() const { return false; } | 456 virtual bool ariaRoleHasPresentationalChildren() const { return false; } |
| 451 virtual bool isARIAGrabbed() { return false; } | 457 virtual AccessibilityDefined isAriaGrabbed() const { return DefinedUndefined ; } |
| 452 virtual bool isPresentationalChildOfAriaRole() const { return false; } | 458 virtual bool isPresentationalChildOfAriaRole() const { return false; } |
| 453 virtual bool shouldFocusActiveDescendant() const { return false; } | 459 virtual bool shouldFocusActiveDescendant() const { return false; } |
| 454 bool supportsARIAAttributes() const; | 460 bool supportsARIAAttributes() const; |
| 455 virtual bool supportsARIADragging() const { return false; } | 461 virtual bool supportsARIADragging() const { return false; } |
| 456 virtual bool supportsARIADropping() const { return false; } | 462 virtual bool supportsARIADropping() const { return false; } |
| 457 virtual bool supportsARIAFlowTo() const { return false; } | 463 virtual bool supportsARIAFlowTo() const { return false; } |
| 458 virtual bool supportsARIAOwns() const { return false; } | 464 virtual bool supportsARIAOwns() const { return false; } |
| 459 bool supportsRangeValue() const; | 465 bool supportsRangeValue() const; |
| 460 | 466 |
| 461 // ARIA trees. | 467 // ARIA trees. |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 610 // functions called here may only search up the tree (ancestors), not down. | 616 // functions called here may only search up the tree (ancestors), not down. |
| 611 void updateCachedAttributeValuesIfNeeded() const; | 617 void updateCachedAttributeValuesIfNeeded() const; |
| 612 }; | 618 }; |
| 613 | 619 |
| 614 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 620 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
| 615 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate) | 621 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate) |
| 616 | 622 |
| 617 } // namespace blink | 623 } // namespace blink |
| 618 | 624 |
| 619 #endif // AXObject_h | 625 #endif // AXObject_h |
| OLD | NEW |