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

Unified Diff: third_party/WebKit/Source/platform/exported/WebScrollbarThemeClientImpl.cpp

Issue 1511003003: Use refs for non-null GraphicsContext, Scrollbar, etc. in scrollbar related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarRemove
Patch Set: yet another mac fix Created 5 years 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
Index: third_party/WebKit/Source/platform/exported/WebScrollbarThemeClientImpl.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebScrollbarThemeClientImpl.cpp b/third_party/WebKit/Source/platform/exported/WebScrollbarThemeClientImpl.cpp
index 5d0b0106945516d84ca55b87eae49a888b174f35..6c7513b1f38e191d7c165b9fd95405fb4576456c 100644
--- a/third_party/WebKit/Source/platform/exported/WebScrollbarThemeClientImpl.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebScrollbarThemeClientImpl.cpp
@@ -31,15 +31,15 @@
namespace blink {
-WebScrollbarThemeClientImpl::WebScrollbarThemeClientImpl(WebScrollbar* scrollbar)
+WebScrollbarThemeClientImpl::WebScrollbarThemeClientImpl(WebScrollbar& scrollbar)
: m_scrollbar(scrollbar)
{
- ScrollbarTheme::theme()->registerScrollbar(this);
+ ScrollbarTheme::theme().registerScrollbar(*this);
}
WebScrollbarThemeClientImpl::~WebScrollbarThemeClientImpl()
{
- ScrollbarTheme::theme()->unregisterScrollbar(this);
+ ScrollbarTheme::theme().unregisterScrollbar(*this);
}
int WebScrollbarThemeClientImpl::x() const
@@ -64,12 +64,12 @@ int WebScrollbarThemeClientImpl::height() const
IntSize WebScrollbarThemeClientImpl::size() const
{
- return m_scrollbar->size();
+ return m_scrollbar.size();
}
IntPoint WebScrollbarThemeClientImpl::location() const
{
- return m_scrollbar->location();
+ return m_scrollbar.location();
}
Widget* WebScrollbarThemeClientImpl::parent() const
@@ -111,13 +111,13 @@ void WebScrollbarThemeClientImpl::invalidateRect(const IntRect&)
ScrollbarOverlayStyle WebScrollbarThemeClientImpl::scrollbarOverlayStyle() const
{
- return static_cast<ScrollbarOverlayStyle>(m_scrollbar->scrollbarOverlayStyle());
+ return static_cast<ScrollbarOverlayStyle>(m_scrollbar.scrollbarOverlayStyle());
}
void WebScrollbarThemeClientImpl::getTickmarks(Vector<IntRect>& tickmarks) const
{
WebVector<WebRect> webTickmarks;
- m_scrollbar->getTickmarks(webTickmarks);
+ m_scrollbar.getTickmarks(webTickmarks);
tickmarks.resize(webTickmarks.size());
for (size_t i = 0; i < webTickmarks.size(); ++i)
tickmarks[i] = webTickmarks[i];
@@ -125,7 +125,7 @@ void WebScrollbarThemeClientImpl::getTickmarks(Vector<IntRect>& tickmarks) const
bool WebScrollbarThemeClientImpl::isScrollableAreaActive() const
{
- return m_scrollbar->isScrollableAreaActive();
+ return m_scrollbar.isScrollableAreaActive();
}
IntPoint WebScrollbarThemeClientImpl::convertFromRootFrame(const IntPoint& pointInRootFrame) const
@@ -137,22 +137,22 @@ IntPoint WebScrollbarThemeClientImpl::convertFromRootFrame(const IntPoint& point
bool WebScrollbarThemeClientImpl::isCustomScrollbar() const
{
- return m_scrollbar->isCustomScrollbar();
+ return m_scrollbar.isCustomScrollbar();
}
ScrollbarOrientation WebScrollbarThemeClientImpl::orientation() const
{
- return static_cast<ScrollbarOrientation>(m_scrollbar->orientation());
+ return static_cast<ScrollbarOrientation>(m_scrollbar.orientation());
}
bool WebScrollbarThemeClientImpl::isLeftSideVerticalScrollbar() const
{
- return m_scrollbar->isLeftSideVerticalScrollbar();
+ return m_scrollbar.isLeftSideVerticalScrollbar();
}
int WebScrollbarThemeClientImpl::value() const
{
- return m_scrollbar->value();
+ return m_scrollbar.value();
}
float WebScrollbarThemeClientImpl::currentPos() const
@@ -167,27 +167,27 @@ int WebScrollbarThemeClientImpl::visibleSize() const
int WebScrollbarThemeClientImpl::totalSize() const
{
- return m_scrollbar->totalSize();
+ return m_scrollbar.totalSize();
}
int WebScrollbarThemeClientImpl::maximum() const
{
- return m_scrollbar->maximum();
+ return m_scrollbar.maximum();
}
ScrollbarControlSize WebScrollbarThemeClientImpl::controlSize() const
{
- return static_cast<ScrollbarControlSize>(m_scrollbar->controlSize());
+ return static_cast<ScrollbarControlSize>(m_scrollbar.controlSize());
}
ScrollbarPart WebScrollbarThemeClientImpl::pressedPart() const
{
- return static_cast<ScrollbarPart>(m_scrollbar->pressedPart());
+ return static_cast<ScrollbarPart>(m_scrollbar.pressedPart());
}
ScrollbarPart WebScrollbarThemeClientImpl::hoveredPart() const
{
- return static_cast<ScrollbarPart>(m_scrollbar->hoveredPart());
+ return static_cast<ScrollbarPart>(m_scrollbar.hoveredPart());
}
void WebScrollbarThemeClientImpl::styleChanged()
@@ -201,7 +201,7 @@ void WebScrollbarThemeClientImpl::visibilityChanged()
bool WebScrollbarThemeClientImpl::enabled() const
{
- return m_scrollbar->enabled();
+ return m_scrollbar.enabled();
}
void WebScrollbarThemeClientImpl::setEnabled(bool)
@@ -211,27 +211,27 @@ void WebScrollbarThemeClientImpl::setEnabled(bool)
bool WebScrollbarThemeClientImpl::isOverlayScrollbar() const
{
- return m_scrollbar->isOverlay();
+ return m_scrollbar.isOverlay();
}
bool WebScrollbarThemeClientImpl::isAlphaLocked() const
{
- return m_scrollbar->isAlphaLocked();
+ return m_scrollbar.isAlphaLocked();
}
void WebScrollbarThemeClientImpl::setIsAlphaLocked(bool flag)
{
- m_scrollbar->setIsAlphaLocked(flag);
+ m_scrollbar.setIsAlphaLocked(flag);
}
float WebScrollbarThemeClientImpl::elasticOverscroll() const
{
- return m_scrollbar->elasticOverscroll();
+ return m_scrollbar.elasticOverscroll();
}
void WebScrollbarThemeClientImpl::setElasticOverscroll(float elasticOverscroll)
{
- return m_scrollbar->setElasticOverscroll(elasticOverscroll);
+ return m_scrollbar.setElasticOverscroll(elasticOverscroll);
}
bool WebScrollbarThemeClientImpl::trackNeedsRepaint() const

Powered by Google App Engine
This is Rietveld 408576698