Chromium Code Reviews| Index: Source/platform/scroll/Scrollbar.cpp |
| diff --git a/Source/platform/scroll/Scrollbar.cpp b/Source/platform/scroll/Scrollbar.cpp |
| index 12f8fc35ad36fe271873cbabd050cf3e6591e6b2..12bd604d0bfa064be66f3a3728a54403af26b7a0 100644 |
| --- a/Source/platform/scroll/Scrollbar.cpp |
| +++ b/Source/platform/scroll/Scrollbar.cpp |
| @@ -80,29 +80,17 @@ Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orient |
| Widget::setFrameRect(IntRect(0, 0, thickness, thickness)); |
| m_currentPos = scrollableAreaCurrentPos(); |
| - |
| -#if ENABLE(OILPAN) |
| - if (m_scrollableArea) |
| - m_animator = m_scrollableArea->scrollAnimator(); |
| -#endif |
| } |
| Scrollbar::~Scrollbar() |
|
haraken
2015/06/29 15:20:22
Can we add ASSERT(!m_scrollableArea) to verify tha
sof
2015/06/29 15:59:42
It doesn't hold in all cases, and I didn't see the
haraken
2015/06/30 10:30:35
It doesn't hold in non-oilpan or/and oilpan? In oi
sof
2015/06/30 11:34:08
It holds in neither setting; with non-Oilpan, the
|
| { |
| - stopTimerIfNeeded(); |
| - |
| m_theme->unregisterScrollbar(this); |
| +} |
| -#if ENABLE(OILPAN) |
| - if (!m_animator) |
| - return; |
| - |
| - ASSERT(m_scrollableArea); |
| - if (m_orientation == VerticalScrollbar) |
| - m_animator->willRemoveVerticalScrollbar(this); |
| - else |
| - m_animator->willRemoveHorizontalScrollbar(this); |
|
haraken
2015/06/29 15:20:22
Help me understand: Who calls these willRemoveScro
sof
2015/06/29 15:59:41
The ScrollableAreas will now enforce this, as they
|
| -#endif |
| +DEFINE_TRACE(Scrollbar) |
| +{ |
| + visitor->trace(m_scrollableArea); |
| + Widget::trace(visitor); |
| } |
| void Scrollbar::setFrameRect(const IntRect& frameRect) |
| @@ -156,9 +144,6 @@ void Scrollbar::offsetDidChange() |
| void Scrollbar::disconnectFromScrollableArea() |
|
haraken
2015/06/29 15:20:22
In oilpan, do we need to call Scrollbar::disconnec
sof
2015/06/29 15:59:41
yes, I think we can get rid of this step once we s
|
| { |
| m_scrollableArea = nullptr; |
|
sof
2015/06/30 11:34:08
Made clearing conditional on !ENABLE(OILPAN) + add
|
| -#if ENABLE(OILPAN) |
| - m_animator = nullptr; |
| -#endif |
| } |
| void Scrollbar::setProportion(int visibleSize, int totalSize) |