MouseEvent.offsetX/Y should just return 0,0 for simulated clicks.
<https://webkit.org/b/129477>
Source/WebCore:
There's no need to compute the exact target-relative coordinates for
simulated mouse events, e.g those fired by HTMLElement.click().
The offsetX/Y properties are not supported by Firefox.
Test: fast/events/relative-offset-of-simulated-click.html
Reviewed by Alexey Proskuryakov.
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::offsetX):
(WebCore::MouseRelatedEvent::offsetY):
LayoutTests:
Add a test documenting the behavior of offsetX/Y on the simulated
mouse events that get sent by HTMLElement.click().
Reviewed by Alexey Proskuryakov.
* fast/events/relative-offset-of-simulated-click-expected.txt: Added.
* fast/events/relative-offset-of-simulated-click.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5 files changed