Commit 18d2f317 authored by hyatt's avatar hyatt
Browse files

Dump the use of MapWindowPoints on Win32 and just let the outermost HWND be...

Dump the use of MapWindowPoints on Win32 and just let the outermost HWND be the viewport point of reference for events and such.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d6df5850
2006-09-28 Dave Hyatt <hyatt@apple.com>
Just eliminate MapWindowPoints usage and use the HWND as
the viewport.
* platform/win/MouseEventWin.cpp:
(WebCore::positionForEvent):
* platform/win/ScrollViewWin.cpp:
(WebCore::ScrollView::viewportToContents):
(WebCore::ScrollView::contentsToViewport):
2006-09-27 David Hyatt <hyatt@apple.com>
 
Fix for bug 9222, cursor is wrong when mousing over overflow scrollbars in textareas. Make sure
......@@ -36,7 +36,6 @@ const PlatformMouseEvent::CurrentEventTag PlatformMouseEvent::currentEvent = {};
static IntPoint positionForEvent(HWND hWnd, LPARAM lParam)
{
POINT point = {LOWORD(lParam), HIWORD(lParam)};
MapWindowPoints(hWnd, GetAncestor(hWnd, GA_ROOT), &point, 1);
return point;
}
......
......@@ -139,18 +139,14 @@ int ScrollView::contentsHeight() const
return m_data->contentsSize.height();
}
IntPoint ScrollView::viewportToContents(const IntPoint& contentsPoint)
IntPoint ScrollView::viewportToContents(const IntPoint& viewportPoint)
{
POINT point = contentsPoint;
MapWindowPoints(GetAncestor(containingWindow(), GA_ROOT), containingWindow(), &point, 1);
return IntPoint(point) + scrollOffset();
return IntPoint(viewportPoint) + scrollOffset();
}
IntPoint ScrollView::contentsToViewport(const IntPoint& viewportPoint)
IntPoint ScrollView::contentsToViewport(const IntPoint& contentsPoint)
{
POINT point = viewportPoint - scrollOffset();
MapWindowPoints(containingWindow(), GetAncestor(containingWindow(), GA_ROOT), &point, 1);
return point;
return contentsPoint - scrollOffset();
}
IntSize ScrollView::scrollOffset() const
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment