MouseEvent.offsetX/Y should just return 0,0 for simulated clicks.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Feb 2014 18:44:10 +0000 (18:44 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Feb 2014 18:44:10 +0000 (18:44 +0000)
commit3af4d7cc37ce5f650d0d64f1b832165ea66d2c34
tree4d310b68da887ed6ac331ea6dc61d641ae698b9f
parentb257af8732d4018370ee29a3513c2882c4ea39ba
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: https://svn.webkit.org/repository/webkit/trunk@164871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/relative-offset-of-simulated-click-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/relative-offset-of-simulated-click.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/MouseRelatedEvent.cpp