Fixed <rdar://problem/4097289> -[WebView elementAtPoint:] failing when WebView is...
authorrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 May 2005 01:28:14 +0000 (01:28 +0000)
committerrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 May 2005 01:28:14 +0000 (01:28 +0000)
Code to determine the correct frame under the window point was
converting the point incorrectly.

        Reviewed by Chris.

        * WebView.subproj/WebView.m:
        (-[WebView _frameViewAtWindowPoint:]):

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

WebKit/ChangeLog
WebKit/WebView.subproj/WebView.m

index 636f160b6c89976c33dd94895f196d295269c331..c72bce35975062a5806236497130a15797fde7a9 100644 (file)
@@ -1,3 +1,15 @@
+2005-05-24  Richard Williamson   <rjw@apple.com>
+
+       Fixed <rdar://problem/4097289> -[WebView elementAtPoint:] failing when WebView is nested and offset
+
+       Code to determine the correct frame under the window point was
+       converting the point incorrectly.
+
+        Reviewed by Chris.
+
+        * WebView.subproj/WebView.m:
+        (-[WebView _frameViewAtWindowPoint:]):
+
 2005-05-23  John Sullivan  <sullivan@apple.com>
 
         Reviewed by Kevin.
index a9295b76279f7d423ea8bed9fe5ce3fe6be8c90e..a5e19a2fba7a38bb9fef94e6d2ded6487e22e1c9 100644 (file)
@@ -2714,7 +2714,7 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
 
 - (WebFrameView *)_frameViewAtWindowPoint:(NSPoint)point
 {
-    NSView *view = [self hitTest:[[self superview] convertPoint:point toView:nil]];
+    NSView *view = [self hitTest:[[self superview] convertPoint:point fromView:nil]];
     return (WebFrameView *)[view _web_superviewOfClass:[WebFrameView class] stoppingAtClass:[self class]];
 }