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

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

Issue 2290233007: Move convertViewportToWindow and convertWindowToViewport from (Closed)
Patch Set: Created 4 years, 4 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
Index: third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
index c2744a7e4bde5d7ebff4619414c95b95648a7262..d061e3044960373747a998933f30a987d47af7eb 100644
--- a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
+++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
@@ -67,7 +67,7 @@ Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orient
// alone when sizing).
int thickness = m_theme.scrollbarThickness(controlSize);
if (m_hostWindow)
- thickness = m_hostWindow->windowToViewportScalar(thickness);
+ thickness = m_hostWindow->windowToViewportScalar(thickness, scrollableArea->getWidget());
Widget::setFrameRect(IntRect(0, 0, thickness, thickness));
m_currentPos = scrollableAreaCurrentPos();
@@ -503,7 +503,7 @@ int Scrollbar::scrollbarThickness() const
int thickness = orientation() == HorizontalScrollbar ? height() : width();
if (!thickness || !m_hostWindow)
return thickness;
- return m_hostWindow->windowToViewportScalar(m_theme.scrollbarThickness(controlSize()));
+ return m_hostWindow->windowToViewportScalar(m_theme.scrollbarThickness(controlSize()), m_scrollableArea->getWidget());
}

Powered by Google App Engine
This is Rietveld 408576698