| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 protected: | 51 protected: |
| 52 AXLayoutObject(LayoutObject*, AXObjectCacheImpl&); | 52 AXLayoutObject(LayoutObject*, AXObjectCacheImpl&); |
| 53 | 53 |
| 54 public: | 54 public: |
| 55 static AXLayoutObject* create(LayoutObject*, AXObjectCacheImpl&); | 55 static AXLayoutObject* create(LayoutObject*, AXObjectCacheImpl&); |
| 56 ~AXLayoutObject() override; | 56 ~AXLayoutObject() override; |
| 57 | 57 |
| 58 // Public, overridden from AXObject. | 58 // Public, overridden from AXObject. |
| 59 LayoutObject* getLayoutObject() const final { return m_layoutObject; } | 59 LayoutObject* getLayoutObject() const final { return m_layoutObject; } |
| 60 LayoutRect elementRect() const override; | |
| 61 LayoutBoxModelObject* getLayoutBoxModelObject() const; | 60 LayoutBoxModelObject* getLayoutBoxModelObject() const; |
| 62 SkMatrix44 transformFromLocalParentFrame() const override; | |
| 63 ScrollableArea* getScrollableAreaIfScrollable() const final; | 61 ScrollableArea* getScrollableAreaIfScrollable() const final; |
| 64 void getRelativeBounds(AXObject** outContainer, FloatRect& outBoundsInContai
ner, SkMatrix44& outContainerTransform) const override; | |
| 65 AccessibilityRole determineAccessibilityRole() override; | 62 AccessibilityRole determineAccessibilityRole() override; |
| 66 AccessibilityRole nativeAccessibilityRoleIgnoringAria() const override; | 63 AccessibilityRole nativeAccessibilityRoleIgnoringAria() const override; |
| 67 void checkCachedElementRect() const; | |
| 68 void updateCachedElementRect() const; | |
| 69 | 64 |
| 70 protected: | 65 protected: |
| 71 LayoutObject* m_layoutObject; | 66 LayoutObject* m_layoutObject; |
| 72 mutable LayoutRect m_cachedElementRect; | 67 |
| 73 mutable LayoutRect m_cachedFrameRect; | 68 LayoutObject* layoutObjectForRelativeBounds() const override { return m_layo
utObject; } |
| 74 mutable IntPoint m_cachedScrollPosition; | |
| 75 mutable bool m_cachedElementRectDirty; | |
| 76 | 69 |
| 77 // | 70 // |
| 78 // Overridden from AXObject. | 71 // Overridden from AXObject. |
| 79 // | 72 // |
| 80 | 73 |
| 81 void init() override; | 74 void init() override; |
| 82 void detach() override; | 75 void detach() override; |
| 83 bool isDetached() const override { return !m_layoutObject; } | 76 bool isDetached() const override { return !m_layoutObject; } |
| 84 bool isAXLayoutObject() const override { return true; } | 77 bool isAXLayoutObject() const override { return true; } |
| 85 | 78 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 137 |
| 145 // AX name calc. | 138 // AX name calc. |
| 146 String textAlternative(bool recursive, bool inAriaLabelledByTraversal, AXObj
ectSet& visited, AXNameFrom&, AXRelatedObjectVector*, NameSources*) const overri
de; | 139 String textAlternative(bool recursive, bool inAriaLabelledByTraversal, AXObj
ectSet& visited, AXNameFrom&, AXRelatedObjectVector*, NameSources*) const overri
de; |
| 147 | 140 |
| 148 // Methods that retrieve or manipulate the current selection. | 141 // Methods that retrieve or manipulate the current selection. |
| 149 | 142 |
| 150 AXRange selection() const override; | 143 AXRange selection() const override; |
| 151 AXRange selectionUnderObject() const override; | 144 AXRange selectionUnderObject() const override; |
| 152 void setSelection(const AXRange&) override; | 145 void setSelection(const AXRange&) override; |
| 153 | 146 |
| 154 // Location and click point in frame-relative coordinates. | |
| 155 void markCachedElementRectDirty() const override; | |
| 156 IntPoint clickPoint() override; | |
| 157 | |
| 158 // Hit testing. | 147 // Hit testing. |
| 159 AXObject* accessibilityHitTest(const IntPoint&) const override; | 148 AXObject* accessibilityHitTest(const IntPoint&) const override; |
| 160 AXObject* elementAccessibilityHitTest(const IntPoint&) const override; | 149 AXObject* elementAccessibilityHitTest(const IntPoint&) const override; |
| 161 | 150 |
| 162 // High-level accessibility tree access. Other modules should only use these
functions. | 151 // High-level accessibility tree access. Other modules should only use these
functions. |
| 163 AXObject* computeParent() const override; | 152 AXObject* computeParent() const override; |
| 164 AXObject* computeParentIfExists() const override; | 153 AXObject* computeParentIfExists() const override; |
| 165 | 154 |
| 166 // Low-level accessibility tree exploration, only for use within the accessi
bility module. | 155 // Low-level accessibility tree exploration, only for use within the accessi
bility module. |
| 167 AXObject* rawFirstChild() const override; | 156 AXObject* rawFirstChild() const override; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 AXRange textControlSelection() const; | 207 AXRange textControlSelection() const; |
| 219 int indexForVisiblePosition(const VisiblePosition&) const; | 208 int indexForVisiblePosition(const VisiblePosition&) const; |
| 220 AXLayoutObject* getUnignoredObjectFromNode(Node&) const; | 209 AXLayoutObject* getUnignoredObjectFromNode(Node&) const; |
| 221 }; | 210 }; |
| 222 | 211 |
| 223 DEFINE_AX_OBJECT_TYPE_CASTS(AXLayoutObject, isAXLayoutObject()); | 212 DEFINE_AX_OBJECT_TYPE_CASTS(AXLayoutObject, isAXLayoutObject()); |
| 224 | 213 |
| 225 } // namespace blink | 214 } // namespace blink |
| 226 | 215 |
| 227 #endif // AXLayoutObject_h | 216 #endif // AXLayoutObject_h |
| OLD | NEW |