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

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

Issue 1603253003: Add dedicated windowToViewport method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 48942f4e4305682e757159c6d0d40677c4fdd819..f6ce243fc8a09fbafb159eecfbceb2694bb10e19 100644
--- a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
+++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
@@ -81,7 +81,7 @@ Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orient
// alone when sizing).
int thickness = m_theme.scrollbarThickness(controlSize);
if (m_hostWindow)
- thickness = m_hostWindow->screenToViewport(thickness);
+ thickness = m_hostWindow->windowToViewport(thickness);
Widget::setFrameRect(IntRect(0, 0, thickness, thickness));
m_currentPos = scrollableAreaCurrentPos();
@@ -482,7 +482,7 @@ int Scrollbar::scrollbarThickness() const
int thickness = orientation() == HorizontalScrollbar ? height() : width();
if (!thickness || !m_hostWindow)
return thickness;
- return m_hostWindow->screenToViewport(m_theme.scrollbarThickness(controlSize()));
+ return m_hostWindow->windowToViewport(m_theme.scrollbarThickness(controlSize()));
}

Powered by Google App Engine
This is Rietveld 408576698