Index: Source/platform/scroll/Scrollbar.h |
diff --git a/Source/platform/scroll/Scrollbar.h b/Source/platform/scroll/Scrollbar.h |
index 34d68c6d2b8373272a345c747053e1e5a071c198..e51e43f9033c4448d63f42c0c4f258ae03ebff68 100644 |
--- a/Source/platform/scroll/Scrollbar.h |
+++ b/Source/platform/scroll/Scrollbar.h |
@@ -28,6 +28,7 @@ |
#include "platform/Timer.h" |
#include "platform/Widget.h" |
+#include "platform/heap/Handle.h" |
#include "platform/scroll/ScrollTypes.h" |
#include "platform/scroll/ScrollbarThemeClient.h" |
#include "wtf/MathExtras.h" |
@@ -39,14 +40,14 @@ class GraphicsContext; |
class IntRect; |
class PlatformGestureEvent; |
class PlatformMouseEvent; |
+class ScrollAnimator; |
class ScrollableArea; |
class ScrollbarTheme; |
-class PLATFORM_EXPORT Scrollbar : public Widget, |
- public ScrollbarThemeClient { |
+class PLATFORM_EXPORT Scrollbar : public Widget, public ScrollbarThemeClient { |
public: |
- static PassRefPtr<Scrollbar> create(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize); |
+ static PassRefPtrWillBeRawPtr<Scrollbar> create(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize); |
virtual ~Scrollbar(); |
@@ -95,7 +96,7 @@ public: |
// Called by the ScrollableArea when the scroll offset changes. |
void offsetDidChange(); |
- void disconnectFromScrollableArea() { m_scrollableArea = 0; } |
+ void disconnectFromScrollableArea(); |
ScrollableArea* scrollableArea() const { return m_scrollableArea; } |
int pressedPos() const { return m_pressedPos; } |
@@ -164,6 +165,13 @@ protected: |
ScrollbarControlSize m_controlSize; |
ScrollbarTheme* m_theme; |
+#if ENABLE(OILPAN) |
+ // To simplify Oilpan finalization, keep a copy of the ScrollableArea's |
+ // scroll animator. Scrollbar is responsible for notifying the animator |
+ // when it is destructed. |
+ RefPtr<ScrollAnimator> m_animator; |
+#endif |
+ |
int m_visibleSize; |
int m_totalSize; |
float m_currentPos; |