Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(762)

Unified Diff: Source/platform/scroll/Scrollbar.cpp

Issue 1215973002: Oilpan: improve ScrollableArea handling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review-induced improvements Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/scroll/Scrollbar.h ('k') | Source/web/ViewportAnchor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scroll/Scrollbar.cpp
diff --git a/Source/platform/scroll/Scrollbar.cpp b/Source/platform/scroll/Scrollbar.cpp
index 12f8fc35ad36fe271873cbabd050cf3e6591e6b2..b6fcb3e3c1ee25b5e53fbd028bc3a4624b1d82de 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()
{
- 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);
-#endif
+DEFINE_TRACE(Scrollbar)
+{
+ visitor->trace(m_scrollableArea);
+ Widget::trace(visitor);
}
void Scrollbar::setFrameRect(const IntRect& frameRect)
@@ -155,9 +143,9 @@ void Scrollbar::offsetDidChange()
void Scrollbar::disconnectFromScrollableArea()
{
+#if !ENABLE(OILPAN)
+ // TODO(Oilpan): remove method once transitioned.
m_scrollableArea = nullptr;
-#if ENABLE(OILPAN)
- m_animator = nullptr;
#endif
}
« no previous file with comments | « Source/platform/scroll/Scrollbar.h ('k') | Source/web/ViewportAnchor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698