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

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

Issue 1486743002: Clean up some remaining obsolete coordinate-space naming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Mac compile 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/scroll/ScrollbarTheme.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp
index 601dc30aa70d2280b0bbfe66cb227aa844199924..06d83b2099750d992d0d8d788149164d139a3f47 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp
@@ -130,13 +130,13 @@ bool ScrollbarTheme::paint(const ScrollbarThemeClient* scrollbar, GraphicsContex
return true;
}
-ScrollbarPart ScrollbarTheme::hitTest(const ScrollbarThemeClient* scrollbar, const IntPoint& position)
+ScrollbarPart ScrollbarTheme::hitTest(const ScrollbarThemeClient* scrollbar, const IntPoint& positionInRootFrame)
{
ScrollbarPart result = NoPart;
if (!scrollbar->enabled())
return result;
- IntPoint testPosition = scrollbar->convertFromContainingWindow(position);
+ IntPoint testPosition = scrollbar->convertFromRootFrame(positionInRootFrame);
testPosition.move(scrollbar->x(), scrollbar->y());
if (!scrollbar->frameRect().contains(testPosition))
@@ -193,7 +193,7 @@ bool ScrollbarTheme::shouldCenterOnThumb(const ScrollbarThemeClient* scrollbar,
bool ScrollbarTheme::shouldSnapBackToDragOrigin(const ScrollbarThemeClient* scrollbar, const PlatformMouseEvent& evt)
{
- IntPoint mousePosition = scrollbar->convertFromContainingWindow(evt.position());
+ IntPoint mousePosition = scrollbar->convertFromRootFrame(evt.position());
mousePosition.move(scrollbar->x(), scrollbar->y());
return Platform::current()->scrollbarBehavior()->shouldSnapBackToDragOrigin(mousePosition, trackRect(scrollbar), scrollbar->orientation() == HorizontalScrollbar);
}

Powered by Google App Engine
This is Rietveld 408576698