| 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 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class AXObject; | 42 class AXObject; |
| 43 class AXObjectCache; | 43 class AXObjectCache; |
| 44 class AXObjectCacheImpl; | 44 class AXObjectCacheImpl; |
| 45 class Element; | 45 class Element; |
| 46 class FrameView; | 46 class FrameView; |
| 47 class IntPoint; | 47 class IntPoint; |
| 48 class Node; | 48 class Node; |
| 49 class RenderObject; | 49 class LayoutObject; |
| 50 class ScrollableArea; | 50 class ScrollableArea; |
| 51 class Widget; | 51 class Widget; |
| 52 | 52 |
| 53 typedef unsigned AXID; | 53 typedef unsigned AXID; |
| 54 | 54 |
| 55 enum AccessibilityRole { | 55 enum AccessibilityRole { |
| 56 UnknownRole = 0, | 56 UnknownRole = 0, |
| 57 AlertDialogRole, | 57 AlertDialogRole, |
| 58 AlertRole, | 58 AlertRole, |
| 59 AnnotationRole, // No mapping to ARIA role | 59 AnnotationRole, // No mapping to ARIA role |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 virtual void detachFromParent() { m_parent = 0; } | 549 virtual void detachFromParent() { m_parent = 0; } |
| 550 virtual AXObject* observableObject() const { return 0; } | 550 virtual AXObject* observableObject() const { return 0; } |
| 551 virtual AXObject* scrollBar(AccessibilityOrientation) { return 0; } | 551 virtual AXObject* scrollBar(AccessibilityOrientation) { return 0; } |
| 552 | 552 |
| 553 // Properties of the object's owning document or page. | 553 // Properties of the object's owning document or page. |
| 554 virtual double estimatedLoadingProgress() const { return 0; } | 554 virtual double estimatedLoadingProgress() const { return 0; } |
| 555 AXObject* focusedUIElement() const; | 555 AXObject* focusedUIElement() const; |
| 556 | 556 |
| 557 // DOM and Render tree access. | 557 // DOM and Render tree access. |
| 558 virtual Node* node() const { return 0; } | 558 virtual Node* node() const { return 0; } |
| 559 virtual RenderObject* renderer() const { return 0; } | 559 virtual LayoutObject* renderer() const { return 0; } |
| 560 virtual Document* document() const; | 560 virtual Document* document() const; |
| 561 virtual FrameView* documentFrameView() const; | 561 virtual FrameView* documentFrameView() const; |
| 562 virtual Element* anchorElement() const { return 0; } | 562 virtual Element* anchorElement() const { return 0; } |
| 563 virtual Element* actionElement() const { return 0; } | 563 virtual Element* actionElement() const { return 0; } |
| 564 virtual Widget* widgetForAttachmentView() const { return 0; } | 564 virtual Widget* widgetForAttachmentView() const { return 0; } |
| 565 String language() const; | 565 String language() const; |
| 566 bool hasAttribute(const QualifiedName&) const; | 566 bool hasAttribute(const QualifiedName&) const; |
| 567 const AtomicString& getAttribute(const QualifiedName&) const; | 567 const AtomicString& getAttribute(const QualifiedName&) const; |
| 568 | 568 |
| 569 // Selected text. | 569 // Selected text. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 599 // Text metrics. Most of these should be deprecated, needs major cleanup. | 599 // Text metrics. Most of these should be deprecated, needs major cleanup. |
| 600 virtual VisiblePosition visiblePositionForIndex(int) const { return VisibleP
osition(); } | 600 virtual VisiblePosition visiblePositionForIndex(int) const { return VisibleP
osition(); } |
| 601 int lineForPosition(const VisiblePosition&) const; | 601 int lineForPosition(const VisiblePosition&) const; |
| 602 virtual int index(const VisiblePosition&) const { return -1; } | 602 virtual int index(const VisiblePosition&) const { return -1; } |
| 603 virtual void lineBreaks(Vector<int>&) const { } | 603 virtual void lineBreaks(Vector<int>&) const { } |
| 604 | 604 |
| 605 // Static helper functions. | 605 // Static helper functions. |
| 606 static bool isARIAControl(AccessibilityRole); | 606 static bool isARIAControl(AccessibilityRole); |
| 607 static bool isARIAInput(AccessibilityRole); | 607 static bool isARIAInput(AccessibilityRole); |
| 608 static AccessibilityRole ariaRoleToWebCoreRole(const String&); | 608 static AccessibilityRole ariaRoleToWebCoreRole(const String&); |
| 609 static IntRect boundingBoxForQuads(RenderObject*, const Vector<FloatQuad>&); | 609 static IntRect boundingBoxForQuads(LayoutObject*, const Vector<FloatQuad>&); |
| 610 static const AtomicString& roleName(AccessibilityRole); | 610 static const AtomicString& roleName(AccessibilityRole); |
| 611 | 611 |
| 612 protected: | 612 protected: |
| 613 AXID m_id; | 613 AXID m_id; |
| 614 AccessibilityChildrenVector m_children; | 614 AccessibilityChildrenVector m_children; |
| 615 mutable bool m_haveChildren; | 615 mutable bool m_haveChildren; |
| 616 AccessibilityRole m_role; | 616 AccessibilityRole m_role; |
| 617 AXObjectInclusion m_lastKnownIsIgnoredValue; | 617 AXObjectInclusion m_lastKnownIsIgnoredValue; |
| 618 LayoutRect m_explicitElementRect; | 618 LayoutRect m_explicitElementRect; |
| 619 | 619 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 644 // functions called here may only search up the tree (ancestors), not down. | 644 // functions called here may only search up the tree (ancestors), not down. |
| 645 void updateCachedAttributeValuesIfNeeded() const; | 645 void updateCachedAttributeValuesIfNeeded() const; |
| 646 }; | 646 }; |
| 647 | 647 |
| 648 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 648 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
| 649 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) | 649 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) |
| 650 | 650 |
| 651 } // namespace blink | 651 } // namespace blink |
| 652 | 652 |
| 653 #endif // AXObject_h | 653 #endif // AXObject_h |
| OLD | NEW |