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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 virtual bool isRequired() const { return false; } | 374 virtual bool isRequired() const { return false; } |
375 virtual bool isSelected() const { return false; } | 375 virtual bool isSelected() const { return false; } |
376 virtual bool isSelectedOptionActive() const { return false; } | 376 virtual bool isSelectedOptionActive() const { return false; } |
377 virtual bool isVisible() const { return true; } | 377 virtual bool isVisible() const { return true; } |
378 virtual bool isVisited() const { return false; } | 378 virtual bool isVisited() const { return false; } |
379 | 379 |
380 // Check whether certain properties can be modified. | 380 // Check whether certain properties can be modified. |
381 virtual bool canSetFocusAttribute() const { return false; } | 381 virtual bool canSetFocusAttribute() const { return false; } |
382 virtual bool canSetValueAttribute() const { return false; } | 382 virtual bool canSetValueAttribute() const { return false; } |
383 virtual bool canSetSelectedAttribute() const { return false; } | 383 virtual bool canSetSelectedAttribute() const { return false; } |
384 virtual bool canSetSelectedChildrenAttribute() const { return false; } | |
385 | 384 |
386 // Whether objects are ignored, i.e. not included in the tree. | 385 // Whether objects are ignored, i.e. not included in the tree. |
387 bool accessibilityIsIgnored() const; | 386 bool accessibilityIsIgnored() const; |
388 bool accessibilityIsIgnoredByDefault() const; | 387 bool accessibilityIsIgnoredByDefault() const; |
389 AXObjectInclusion accessibilityPlatformIncludesObject() const; | 388 AXObjectInclusion accessibilityPlatformIncludesObject() const; |
390 virtual AXObjectInclusion defaultObjectInclusion() const; | 389 virtual AXObjectInclusion defaultObjectInclusion() const; |
391 bool isInertOrAriaHidden() const; | 390 bool isInertOrAriaHidden() const; |
392 bool lastKnownIsIgnoredValue(); | 391 bool lastKnownIsIgnoredValue(); |
393 void setLastKnownIsIgnoredValue(bool); | 392 void setLastKnownIsIgnoredValue(bool); |
394 | 393 |
395 // Properties of static elements. | 394 // Properties of static elements. |
396 virtual const AtomicString& accessKey() const { return nullAtom; } | 395 virtual const AtomicString& accessKey() const { return nullAtom; } |
397 virtual bool canvasHasFallbackContent() const { return false; } | 396 virtual bool canvasHasFallbackContent() const { return false; } |
398 virtual bool exposesTitleUIElement() const { return true; } | 397 virtual bool exposesTitleUIElement() const { return true; } |
399 virtual int headingLevel() const { return 0; } | 398 virtual int headingLevel() const { return 0; } |
400 // 1-based, to match the aria-level spec. | 399 // 1-based, to match the aria-level spec. |
401 virtual unsigned hierarchicalLevel() const { return 0; } | 400 virtual unsigned hierarchicalLevel() const { return 0; } |
402 virtual AccessibilityOrientation orientation() const; | 401 virtual AccessibilityOrientation orientation() const; |
403 virtual int tableLevel() const { return 0; } | |
404 virtual String text() const { return String(); } | 402 virtual String text() const { return String(); } |
405 virtual int textLength() const { return 0; } | 403 virtual int textLength() const { return 0; } |
406 virtual AXObject* titleUIElement() const { return 0; } | 404 virtual AXObject* titleUIElement() const { return 0; } |
407 virtual KURL url() const { return KURL(); } | 405 virtual KURL url() const { return KURL(); } |
408 | 406 |
409 // For an inline text box. | 407 // For an inline text box. |
410 virtual AccessibilityTextDirection textDirection() const { return Accessibil
ityTextDirectionLeftToRight; } | 408 virtual AccessibilityTextDirection textDirection() const { return Accessibil
ityTextDirectionLeftToRight; } |
411 // The integer horizontal pixel offset of each character in the string; nega
tive values for RTL. | 409 // The integer horizontal pixel offset of each character in the string; nega
tive values for RTL. |
412 virtual void textCharacterOffsets(Vector<int>&) const { } | 410 virtual void textCharacterOffsets(Vector<int>&) const { } |
413 // The start and end character offset of each word in the inline text box. | 411 // The start and end character offset of each word in the inline text box. |
414 virtual void wordBoundaries(Vector<PlainTextRange>& words) const { } | 412 virtual void wordBoundaries(Vector<PlainTextRange>& words) const { } |
415 | 413 |
416 // Properties of interactive elements. | 414 // Properties of interactive elements. |
417 virtual String actionVerb() const; | 415 virtual String actionVerb() const; |
418 virtual AccessibilityButtonState checkboxOrRadioValue() const; | 416 virtual AccessibilityButtonState checkboxOrRadioValue() const; |
419 virtual void colorValue(int& r, int& g, int& b) const { r = 0; g = 0; b = 0;
} | 417 virtual void colorValue(int& r, int& g, int& b) const { r = 0; g = 0; b = 0;
} |
420 virtual String valueDescription() const { return String(); } | 418 virtual String valueDescription() const { return String(); } |
421 virtual float valueForRange() const { return 0.0f; } | 419 virtual float valueForRange() const { return 0.0f; } |
422 virtual float maxValueForRange() const { return 0.0f; } | 420 virtual float maxValueForRange() const { return 0.0f; } |
423 virtual float minValueForRange() const { return 0.0f; } | 421 virtual float minValueForRange() const { return 0.0f; } |
424 virtual void selectedChildren(AccessibilityChildrenVector&) { } | |
425 virtual String stringValue() const { return String(); } | 422 virtual String stringValue() const { return String(); } |
426 | 423 |
427 // ARIA attributes. | 424 // ARIA attributes. |
428 virtual AXObject* activeDescendant() const { return 0; } | 425 virtual AXObject* activeDescendant() const { return 0; } |
429 virtual String ariaDescribedByAttribute() const { return String(); } | 426 virtual String ariaDescribedByAttribute() const { return String(); } |
430 virtual void ariaFlowToElements(AccessibilityChildrenVector&) const { } | 427 virtual void ariaFlowToElements(AccessibilityChildrenVector&) const { } |
431 virtual void ariaControlsElements(AccessibilityChildrenVector&) const { } | 428 virtual void ariaControlsElements(AccessibilityChildrenVector&) const { } |
432 virtual void ariaDescribedbyElements(AccessibilityChildrenVector& describedb
y) const { }; | 429 virtual void ariaDescribedbyElements(AccessibilityChildrenVector& describedb
y) const { }; |
433 virtual void ariaLabelledbyElements(AccessibilityChildrenVector& labelledby)
const { }; | 430 virtual void ariaLabelledbyElements(AccessibilityChildrenVector& labelledby)
const { }; |
434 virtual void ariaOwnsElements(AccessibilityChildrenVector& owns) const { }; | 431 virtual void ariaOwnsElements(AccessibilityChildrenVector& owns) const { }; |
435 virtual bool ariaHasPopup() const { return false; } | 432 virtual bool ariaHasPopup() const { return false; } |
436 bool ariaIsMultiline() const; | 433 bool ariaIsMultiline() const; |
437 virtual String ariaLabeledByAttribute() const { return String(); } | 434 virtual String ariaLabeledByAttribute() const { return String(); } |
438 bool ariaPressedIsPresent() const; | 435 bool ariaPressedIsPresent() const; |
439 virtual AccessibilityRole ariaRoleAttribute() const { return UnknownRole; } | 436 virtual AccessibilityRole ariaRoleAttribute() const { return UnknownRole; } |
440 virtual bool ariaRoleHasPresentationalChildren() const { return false; } | 437 virtual bool ariaRoleHasPresentationalChildren() const { return false; } |
441 const AtomicString& invalidStatus() const; | |
442 virtual bool isARIAGrabbed() { return false; } | 438 virtual bool isARIAGrabbed() { return false; } |
443 virtual bool isPresentationalChildOfAriaRole() const { return false; } | 439 virtual bool isPresentationalChildOfAriaRole() const { return false; } |
444 virtual bool shouldFocusActiveDescendant() const { return false; } | 440 virtual bool shouldFocusActiveDescendant() const { return false; } |
445 bool supportsARIAAttributes() const; | 441 bool supportsARIAAttributes() const; |
446 virtual bool supportsARIADragging() const { return false; } | 442 virtual bool supportsARIADragging() const { return false; } |
447 virtual bool supportsARIADropping() const { return false; } | 443 virtual bool supportsARIADropping() const { return false; } |
448 virtual bool supportsARIAFlowTo() const { return false; } | 444 virtual bool supportsARIAFlowTo() const { return false; } |
449 virtual bool supportsARIAOwns() const { return false; } | 445 virtual bool supportsARIAOwns() const { return false; } |
450 bool supportsRangeValue() const; | 446 bool supportsRangeValue() const; |
451 | 447 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 | 576 |
581 bool m_detached; | 577 bool m_detached; |
582 }; | 578 }; |
583 | 579 |
584 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 580 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
585 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) | 581 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) |
586 | 582 |
587 } // namespace WebCore | 583 } // namespace WebCore |
588 | 584 |
589 #endif // AXObject_h | 585 #endif // AXObject_h |
OLD | NEW |