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