| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 class VisibleSelection; | 56 class VisibleSelection; |
| 57 class Widget; | 57 class Widget; |
| 58 | 58 |
| 59 class AccessibilityRenderObject : public AccessibilityNodeObject { | 59 class AccessibilityRenderObject : public AccessibilityNodeObject { |
| 60 protected: | 60 protected: |
| 61 explicit AccessibilityRenderObject(RenderObject*); | 61 explicit AccessibilityRenderObject(RenderObject*); |
| 62 public: | 62 public: |
| 63 static PassRefPtr<AccessibilityRenderObject> create(RenderObject*); | 63 static PassRefPtr<AccessibilityRenderObject> create(RenderObject*); |
| 64 virtual ~AccessibilityRenderObject(); | 64 virtual ~AccessibilityRenderObject(); |
| 65 | 65 |
| 66 RenderObject* m_renderer; | |
| 67 | |
| 68 // Public, overridden from AccessibilityObject. | 66 // Public, overridden from AccessibilityObject. |
| 69 virtual RenderObject* renderer() const { return m_renderer; } | 67 virtual RenderObject* renderer() const { return m_renderer; } |
| 70 virtual LayoutRect elementRect() const; | 68 virtual LayoutRect elementRect() const; |
| 71 | 69 |
| 72 // DEPRECATED - investigate and remove. | 70 // DEPRECATED - investigate and remove. |
| 73 virtual int layoutCount() const; | 71 virtual int layoutCount() const; |
| 74 | 72 |
| 75 void setRenderer(RenderObject*); | 73 void setRenderer(RenderObject*); |
| 76 RenderBoxModelObject* renderBoxModelObject() const; | 74 RenderBoxModelObject* renderBoxModelObject() const; |
| 77 RenderView* topRenderer() const; | 75 RenderView* topRenderer() const; |
| 78 Document* topDocument() const; | 76 Document* topDocument() const; |
| 79 HTMLLabelElement* labelElementContainer() const; | 77 HTMLLabelElement* labelElementContainer() const; |
| 80 bool shouldNotifyActiveDescendant() const; | 78 bool shouldNotifyActiveDescendant() const; |
| 81 bool needsToUpdateChildren() const { return m_childrenDirty; } | 79 bool needsToUpdateChildren() const { return m_childrenDirty; } |
| 82 ScrollableArea* getScrollableAreaIfScrollable() const; | 80 ScrollableArea* getScrollableAreaIfScrollable() const; |
| 83 virtual AccessibilityRole determineAccessibilityRole(); | 81 virtual AccessibilityRole determineAccessibilityRole(); |
| 84 | 82 |
| 85 protected: | 83 protected: |
| 84 RenderObject* m_renderer; |
| 85 mutable LayoutRect m_cachedElementRect; |
| 86 mutable LayoutRect m_cachedFrameRect; |
| 87 mutable IntPoint m_cachedScrollPosition; |
| 88 mutable bool m_cachedElementRectDirty; |
| 89 |
| 86 // | 90 // |
| 87 // Overridden from AccessibilityObject. | 91 // Overridden from AccessibilityObject. |
| 88 // | 92 // |
| 89 | 93 |
| 90 virtual void init(); | 94 virtual void init(); |
| 91 virtual void detach(); | 95 virtual void detach(); |
| 92 virtual bool isDetached() const { return !m_renderer; } | 96 virtual bool isDetached() const { return !m_renderer; } |
| 93 virtual bool isAccessibilityRenderObject() const { return true; } | 97 virtual bool isAccessibilityRenderObject() const { return true; } |
| 94 | 98 |
| 95 // Check object role or purpose. | 99 // Check object role or purpose. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 virtual AccessibilityOrientation orientation() const; | 137 virtual AccessibilityOrientation orientation() const; |
| 134 virtual void tabChildren(AccessibilityChildrenVector&); | 138 virtual void tabChildren(AccessibilityChildrenVector&); |
| 135 virtual String text() const; | 139 virtual String text() const; |
| 136 virtual int textLength() const; | 140 virtual int textLength() const; |
| 137 virtual AccessibilityObject* titleUIElement() const; | 141 virtual AccessibilityObject* titleUIElement() const; |
| 138 virtual KURL url() const; | 142 virtual KURL url() const; |
| 139 virtual void visibleChildren(AccessibilityChildrenVector&); | 143 virtual void visibleChildren(AccessibilityChildrenVector&); |
| 140 | 144 |
| 141 // Properties of interactive elements. | 145 // Properties of interactive elements. |
| 142 virtual const String& actionVerb() const; | 146 virtual const String& actionVerb() const; |
| 143 LayoutRect checkboxOrRadioRect() const; | |
| 144 virtual void selectedChildren(AccessibilityChildrenVector&); | 147 virtual void selectedChildren(AccessibilityChildrenVector&); |
| 145 virtual String stringValue() const; | 148 virtual String stringValue() const; |
| 146 | 149 |
| 147 // ARIA attributes. | 150 // ARIA attributes. |
| 148 virtual AccessibilityObject* activeDescendant() const; | 151 virtual AccessibilityObject* activeDescendant() const; |
| 149 virtual void ariaFlowToElements(AccessibilityChildrenVector&) const; | 152 virtual void ariaFlowToElements(AccessibilityChildrenVector&) const; |
| 150 virtual bool ariaHasPopup() const; | 153 virtual bool ariaHasPopup() const; |
| 151 virtual void ariaOwnsElements(AccessibilityChildrenVector&) const; | 154 virtual void ariaOwnsElements(AccessibilityChildrenVector&) const; |
| 152 virtual bool ariaRoleHasPresentationalChildren() const; | 155 virtual bool ariaRoleHasPresentationalChildren() const; |
| 153 virtual void determineARIADropEffects(Vector<String>&); | 156 virtual void determineARIADropEffects(Vector<String>&); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 164 virtual const AtomicString& ariaLiveRegionRelevant() const; | 167 virtual const AtomicString& ariaLiveRegionRelevant() const; |
| 165 virtual bool ariaLiveRegionAtomic() const; | 168 virtual bool ariaLiveRegionAtomic() const; |
| 166 virtual bool ariaLiveRegionBusy() const; | 169 virtual bool ariaLiveRegionBusy() const; |
| 167 | 170 |
| 168 // Accessibility Text. | 171 // Accessibility Text. |
| 169 virtual String textUnderElement() const; | 172 virtual String textUnderElement() const; |
| 170 | 173 |
| 171 // Accessibility Text - (To be deprecated). | 174 // Accessibility Text - (To be deprecated). |
| 172 virtual String helpText() const; | 175 virtual String helpText() const; |
| 173 | 176 |
| 174 // Position and size. | 177 // Location and click point in frame-relative coordinates. |
| 175 virtual LayoutRect boundingBoxRect() const; | 178 virtual void checkCachedElementRect() const; |
| 179 virtual void updateCachedElementRect() const; |
| 180 virtual void markCachedElementRectDirty() const; |
| 176 virtual IntPoint clickPoint(); | 181 virtual IntPoint clickPoint(); |
| 177 | 182 |
| 178 // Hit testing. | 183 // Hit testing. |
| 179 virtual AccessibilityObject* accessibilityHitTest(const IntPoint&) const; | 184 virtual AccessibilityObject* accessibilityHitTest(const IntPoint&) const; |
| 180 virtual AccessibilityObject* elementAccessibilityHitTest(const IntPoint&) co
nst; | 185 virtual AccessibilityObject* elementAccessibilityHitTest(const IntPoint&) co
nst; |
| 181 | 186 |
| 182 // High-level accessibility tree access. Other modules should only use these
functions. | 187 // High-level accessibility tree access. Other modules should only use these
functions. |
| 183 virtual AccessibilityObject* parentObject() const; | 188 virtual AccessibilityObject* parentObject() const; |
| 184 virtual AccessibilityObject* parentObjectIfExists() const; | 189 virtual AccessibilityObject* parentObjectIfExists() const; |
| 185 | 190 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 void offsetBoundingBoxForRemoteSVGElement(LayoutRect&) const; | 270 void offsetBoundingBoxForRemoteSVGElement(LayoutRect&) const; |
| 266 void addHiddenChildren(); | 271 void addHiddenChildren(); |
| 267 void addTextFieldChildren(); | 272 void addTextFieldChildren(); |
| 268 void addImageMapChildren(); | 273 void addImageMapChildren(); |
| 269 void addCanvasChildren(); | 274 void addCanvasChildren(); |
| 270 void addAttachmentChildren(); | 275 void addAttachmentChildren(); |
| 271 void addRemoteSVGChildren(); | 276 void addRemoteSVGChildren(); |
| 272 void ariaSelectedRows(AccessibilityChildrenVector&); | 277 void ariaSelectedRows(AccessibilityChildrenVector&); |
| 273 bool elementAttributeValue(const QualifiedName&) const; | 278 bool elementAttributeValue(const QualifiedName&) const; |
| 274 bool inheritsPresentationalRole() const; | 279 bool inheritsPresentationalRole() const; |
| 280 LayoutRect computeElementRect() const; |
| 275 }; | 281 }; |
| 276 | 282 |
| 277 inline AccessibilityRenderObject* toAccessibilityRenderObject(AccessibilityObjec
t* object) | 283 inline AccessibilityRenderObject* toAccessibilityRenderObject(AccessibilityObjec
t* object) |
| 278 { | 284 { |
| 279 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isAccessibilityRenderObj
ect()); | 285 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isAccessibilityRenderObj
ect()); |
| 280 return static_cast<AccessibilityRenderObject*>(object); | 286 return static_cast<AccessibilityRenderObject*>(object); |
| 281 } | 287 } |
| 282 | 288 |
| 283 inline const AccessibilityRenderObject* toAccessibilityRenderObject(const Access
ibilityObject* object) | 289 inline const AccessibilityRenderObject* toAccessibilityRenderObject(const Access
ibilityObject* object) |
| 284 { | 290 { |
| 285 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isAccessibilityRenderObj
ect()); | 291 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isAccessibilityRenderObj
ect()); |
| 286 return static_cast<const AccessibilityRenderObject*>(object); | 292 return static_cast<const AccessibilityRenderObject*>(object); |
| 287 } | 293 } |
| 288 | 294 |
| 289 // This will catch anyone doing an unnecessary cast. | 295 // This will catch anyone doing an unnecessary cast. |
| 290 void toAccessibilityRenderObject(const AccessibilityRenderObject*); | 296 void toAccessibilityRenderObject(const AccessibilityRenderObject*); |
| 291 | 297 |
| 292 } // namespace WebCore | 298 } // namespace WebCore |
| 293 | 299 |
| 294 #endif // AccessibilityRenderObject_h | 300 #endif // AccessibilityRenderObject_h |
| OLD | NEW |