[Webkit-unassigned] [Bug 15780] New: WebFrameLoaderClient: WebActionElementKey wrong if view is scrolled

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 31 16:12:23 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=15780

           Summary: WebFrameLoaderClient: WebActionElementKey wrong if view
                    is scrolled
           Product: WebKit
           Version: 523.x+ (nightly)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Major
          Priority: P2
         Component: WebKit Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: justin at cam.org


The actionDictionary sent to various WebPolicyDelegate methods is supposed to
provide the element that has been clicked, under the WebActionElementKey. If
the web view is scrolled, this element is calculated incorrectly.

Reproduction: load a long document into a smallish frame. Set up a delegate
that implements
webView:decidePolicyForNavigationAction:request:frame:decisionListener:. Scroll
down to the bottom of the page and click a link. In the delegate, examine
[[actionInformation objectForKey:WebActionElementKey] WebElementDOMNodeKey].
The node returned will be distant from the actual mouse click by the same
vertical amount as the view is scrolled.

In WebFrameLoaderClient.mm (line 1117 as of writing, rev. 26758), method
WebFrameLoaderClient::actionDictionary(), an IntPoint is constructed using
mouseEvent->clientX() and mouseEvent->clientY(). These values do not take
scrolling into account. An apparently correct result can be obtained if the
IntPoint is constructed using mouseEvent->layerX() and mouseEvent->layerY().

The error seems to have been present since rev. 17597.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list