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

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

Issue 2290233007: Move convertViewportToWindow and convertWindowToViewport from (Closed)
Patch Set: add client to WebSharedWorkerImpl Created 4 years, 3 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..519b3b8f2d41a00f3966e146ff8896fc9dea6249 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(*scrollableArea->getWidget(), thickness);
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_scrollableArea->getWidget(), m_theme.scrollbarThickness(controlSize()));
}
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp ('k') | third_party/WebKit/Source/web/ChromeClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698