Dump the use of MapWindowPoints on Win32 and just let the outermost HWND be the viewp...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Sep 2006 08:49:38 +0000 (08:49 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Sep 2006 08:49:38 +0000 (08:49 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16612 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/win/MouseEventWin.cpp
WebCore/platform/win/ScrollViewWin.cpp

index 26c5eb20c79884b6759aa4c66215e051165b785d..53ef13e3290890604b6e2f6fed2d7928fe99390f 100644 (file)
@@ -1,3 +1,14 @@
+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
index e8233ba62fdc9b2a08aa2fe11d30d6f92b4d2499..92454290aff6b4869d35c08f9b610f1ac77f90ce 100644 (file)
@@ -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;
 }
 
index 2a87b6b718eb406480cc4536ab2e0b8a8d8e6a93..4d9c089e7a22df0e7f47998ab87e9ea35453e639 100644 (file)
@@ -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