| Index: third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
|
| diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
|
| index 85016be74b5a15c2f326a65e4254a439ceac12f6..14086dc9317f532ec5a0990aaaec68201984456a 100644
|
| --- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
|
| +++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
|
| @@ -54,7 +54,7 @@ struct SameSizeAsScrollableArea {
|
| #if ENABLE(ASSERT) && ENABLE(OILPAN)
|
| VerifyEagerFinalization verifyEager;
|
| #endif
|
| - void* pointer;
|
| + OwnPtrWillBeMember<void*> pointer[2];
|
| unsigned bitfields : 16;
|
| IntPoint origin;
|
| };
|
| @@ -93,29 +93,28 @@ ScrollableArea::~ScrollableArea()
|
|
|
| void ScrollableArea::clearScrollAnimators()
|
| {
|
| - m_animators.clear();
|
| +#if OS(MACOSX) && ENABLE(OILPAN)
|
| + if (m_scrollAnimator)
|
| + m_scrollAnimator->dispose();
|
| +#endif
|
| + m_scrollAnimator.clear();
|
| + m_programmaticScrollAnimator.clear();
|
| }
|
|
|
| ScrollAnimatorBase* ScrollableArea::scrollAnimator() const
|
| {
|
| - if (!m_animators)
|
| - m_animators = adoptPtr(new ScrollableAreaAnimators);
|
| -
|
| - if (!m_animators->scrollAnimator)
|
| - m_animators->scrollAnimator = ScrollAnimatorBase::create(const_cast<ScrollableArea*>(this));
|
| + if (!m_scrollAnimator)
|
| + m_scrollAnimator = ScrollAnimatorBase::create(const_cast<ScrollableArea*>(this));
|
|
|
| - return m_animators->scrollAnimator.get();
|
| + return m_scrollAnimator.get();
|
| }
|
|
|
| ProgrammaticScrollAnimator* ScrollableArea::programmaticScrollAnimator() const
|
| {
|
| - if (!m_animators)
|
| - m_animators = adoptPtr(new ScrollableAreaAnimators);
|
| -
|
| - if (!m_animators->programmaticScrollAnimator)
|
| - m_animators->programmaticScrollAnimator = ProgrammaticScrollAnimator::create(const_cast<ScrollableArea*>(this));
|
| + if (!m_programmaticScrollAnimator)
|
| + m_programmaticScrollAnimator = ProgrammaticScrollAnimator::create(const_cast<ScrollableArea*>(this));
|
|
|
| - return m_animators->programmaticScrollAnimator.get();
|
| + return m_programmaticScrollAnimator.get();
|
| }
|
|
|
| void ScrollableArea::setScrollOrigin(const IntPoint& origin)
|
| @@ -584,4 +583,10 @@ IntSize ScrollableArea::excludeScrollbars(const IntSize& size) const
|
|
|
| }
|
|
|
| +DEFINE_TRACE(ScrollableArea)
|
| +{
|
| + visitor->trace(m_scrollAnimator);
|
| + visitor->trace(m_programmaticScrollAnimator);
|
| +}
|
| +
|
| } // namespace blink
|
|
|