| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 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 12 matching lines...) Expand all Loading... |
| 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef AXScrollView_h | 26 #ifndef AXScrollView_h |
| 27 #define AXScrollView_h | 27 #define AXScrollView_h |
| 28 | 28 |
| 29 #include "modules/accessibility/AXObject.h" | 29 #include "modules/accessibility/AXObject.h" |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 class AXObjectCache; |
| 33 class AXScrollbar; | 34 class AXScrollbar; |
| 34 class Scrollbar; | 35 class Scrollbar; |
| 35 class FrameView; | 36 class FrameView; |
| 36 | 37 |
| 37 class AXScrollView final : public AXObject { | 38 class AXScrollView final : public AXObject { |
| 38 public: | 39 public: |
| 39 static PassRefPtr<AXScrollView> create(FrameView*); | 40 static PassRefPtr<AXScrollView> create(FrameView*, AXObjectCache*); |
| 40 virtual AccessibilityRole roleValue() const override { return ScrollAreaRole
; } | 41 virtual AccessibilityRole roleValue() const override { return ScrollAreaRole
; } |
| 41 FrameView* scrollView() const { return m_scrollView; } | 42 FrameView* scrollView() const { return m_scrollView; } |
| 42 | 43 |
| 43 virtual ~AXScrollView(); | 44 virtual ~AXScrollView(); |
| 44 virtual void detach() override; | 45 virtual void detach() override; |
| 45 | 46 |
| 46 protected: | 47 protected: |
| 47 virtual ScrollableArea* getScrollableAreaIfScrollable() const override; | 48 virtual ScrollableArea* getScrollableAreaIfScrollable() const override; |
| 48 virtual void scrollTo(const IntPoint&) const override; | 49 virtual void scrollTo(const IntPoint&) const override; |
| 49 | 50 |
| 50 private: | 51 private: |
| 51 explicit AXScrollView(FrameView*); | 52 AXScrollView(FrameView*, AXObjectCache*); |
| 52 | 53 |
| 53 virtual bool computeAccessibilityIsIgnored() const override; | 54 virtual bool computeAccessibilityIsIgnored() const override; |
| 54 virtual bool isAXScrollView() const override { return true; } | 55 virtual bool isAXScrollView() const override { return true; } |
| 55 virtual bool isEnabled() const override { return true; } | 56 virtual bool isEnabled() const override { return true; } |
| 56 | 57 |
| 57 virtual bool isAttachment() const override; | 58 virtual bool isAttachment() const override; |
| 58 virtual Widget* widgetForAttachmentView() const override; | 59 virtual Widget* widgetForAttachmentView() const override; |
| 59 | 60 |
| 60 virtual AXObject* scrollBar(AccessibilityOrientation) override; | 61 virtual AXObject* scrollBar(AccessibilityOrientation) override; |
| 61 virtual void addChildren() override; | 62 virtual void addChildren() override; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 89 RefPtr<AXObject> m_horizontalScrollbar; | 90 RefPtr<AXObject> m_horizontalScrollbar; |
| 90 RefPtr<AXObject> m_verticalScrollbar; | 91 RefPtr<AXObject> m_verticalScrollbar; |
| 91 bool m_childrenDirty; | 92 bool m_childrenDirty; |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 DEFINE_AX_OBJECT_TYPE_CASTS(AXScrollView, isAXScrollView()); | 95 DEFINE_AX_OBJECT_TYPE_CASTS(AXScrollView, isAXScrollView()); |
| 95 | 96 |
| 96 } // namespace blink | 97 } // namespace blink |
| 97 | 98 |
| 98 #endif // AXScrollView_h | 99 #endif // AXScrollView_h |
| OLD | NEW |