2007-11-02 Mark Rowe <mrowe@apple.com>
authormrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Nov 2007 14:07:04 +0000 (14:07 +0000)
committermrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Nov 2007 14:07:04 +0000 (14:07 +0000)
        Reviewed by Darin Adler.

        Fix http://bugs.webkit.org/show_bug.cgi?id=15780
        Bug 15780: WebFrameLoaderClient: WebActionElementKey wrong if view is scrolled

        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::actionDictionary): Retrieve the mouse event coordinates
        in the page coordinate system rather than the client area coordinate system.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27376 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/WebCoreSupport/WebFrameLoaderClient.mm

index 7213adcdcfc342a914505052bbff7c3287af0dce..485d04e833948a00f67fee4e6be411ba70043494 100644 (file)
@@ -1,3 +1,14 @@
+2007-11-02  Mark Rowe  <mrowe@apple.com>
+
+        Reviewed by Darin Adler.
+
+        Fix http://bugs.webkit.org/show_bug.cgi?id=15780
+        Bug 15780: WebFrameLoaderClient: WebActionElementKey wrong if view is scrolled
+
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::actionDictionary): Retrieve the mouse event coordinates
+        in the page coordinate system rather than the client area coordinate system.
+
 2007-11-01  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Oliver Hunt.
index 2db84f939e2cd00a44c804197c1da8eb83eb8337..d2b8a5e3dfd1d8be66ac125f5088b7d10c87b392 100644 (file)
@@ -1114,7 +1114,7 @@ NSDictionary *WebFrameLoaderClient::actionDictionary(const NavigationAction& act
             modifierFlags |= NSCommandKeyMask;
     }
     if (const MouseEvent* mouseEvent = findMouseEvent(event)) {
-        IntPoint point(mouseEvent->clientX(), mouseEvent->clientY());
+        IntPoint point(mouseEvent->pageX(), mouseEvent->pageY());
         WebElementDictionary *element = [[WebElementDictionary alloc]
             initWithHitTestResult:core(m_webFrame.get())->eventHandler()->hitTestResultAtPoint(point, false)];
         NSDictionary *result = [NSDictionary dictionaryWithObjectsAndKeys: