Index: Source/platform/scroll/Scrollbar.h |
diff --git a/Source/platform/scroll/Scrollbar.h b/Source/platform/scroll/Scrollbar.h |
index 20979ff328b90fd6980364552842af5700a93e25..db9870049a2a30aa7260512c4099427978bfbf2c 100644 |
--- a/Source/platform/scroll/Scrollbar.h |
+++ b/Source/platform/scroll/Scrollbar.h |
@@ -46,7 +46,6 @@ class ScrollableArea; |
class ScrollbarTheme; |
class PLATFORM_EXPORT Scrollbar : public Widget, public ScrollbarThemeClient { |
- |
public: |
static PassRefPtrWillBeRawPtr<Scrollbar> create(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize); |
@@ -153,6 +152,13 @@ public: |
virtual DisplayItemClient displayItemClient() const override { return toDisplayItemClient(this); } |
virtual String debugName() const override { return m_orientation == HorizontalScrollbar ? "HorizontalScrollbar" : "VerticalScrollbar"; } |
+ // Promptly unregister from the theme manager + run finalizers of derived Scrollbars. |
+ EAGERLY_FINALIZE(); |
+#if ENABLE(OILPAN) |
+ DECLARE_EAGER_FINALIZATION_OPERATOR_NEW(); |
+#endif |
+ DECLARE_VIRTUAL_TRACE(); |
+ |
protected: |
Scrollbar(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize, ScrollbarTheme* = 0); |
@@ -167,18 +173,11 @@ protected: |
ScrollDirectionPhysical pressedPartScrollDirectionPhysical(); |
ScrollGranularity pressedPartScrollGranularity(); |
- ScrollableArea* m_scrollableArea; |
+ RawPtrWillBeMember<ScrollableArea> m_scrollableArea; |
ScrollbarOrientation m_orientation; |
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; |