WebCore:
authorddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 25 Jun 2006 20:37:37 +0000 (20:37 +0000)
committerddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 25 Jun 2006 20:37:37 +0000 (20:37 +0000)
commitc5042c9b8c9d94479cda74315c8b6fa0b32d4b30
tree46bff5a7821edc31a5d5ae1705cbb8f5d509acb7
parent90189e70888009555924c34488dfcb50bac15e1d
WebCore:

        Reviewed by Darin.

        Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8707:
        event.clientX and event.clientY should be relative to the viewport, not the canvas

        Make sure clientX and clientY take into account the scroll offsets
        of the view.

        * dom/EventTargetNode.cpp:
        (WebCore::EventTargetNode::dispatchMouseEvent):
        * dom/MouseEvent.cpp:
        (WebCore::MouseEvent::MouseEvent):
        * dom/MouseEvent.h:
        * dom/MouseRelatedEvent.cpp:
        (WebCore::MouseRelatedEvent::MouseRelatedEvent):
        (WebCore::MouseRelatedEvent::initCoordinates):
        * dom/MouseRelatedEvent.h:
        * dom/WheelEvent.cpp:
        (WebCore::WheelEvent::WheelEvent):
        * page/FrameView.cpp:
        (WebCore::FrameView::dispatchDragEvent):

LayoutTests:

        Reviewed by Darin.

        Test cases for
        <http://bugzilla.opendarwin.org/show_bug.cgi?id=8707>
        event.clientX and event.clientY should be relative to the viewport, not the canvas

        * fast/dom/window-xy-properties-expected.txt: Added.
        * fast/dom/window-xy-properties.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/window-xy-properties-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/window-xy-properties.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/dom/EventTargetNode.cpp
WebCore/dom/MouseEvent.cpp
WebCore/dom/MouseEvent.h
WebCore/dom/MouseRelatedEvent.cpp
WebCore/dom/MouseRelatedEvent.h
WebCore/dom/WheelEvent.cpp
WebCore/page/FrameView.cpp