AX: event.target should sometimes be a descendant element on AXPress-triggered mouse...
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Dec 2014 22:59:22 +0000 (22:59 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Dec 2014 22:59:22 +0000 (22:59 +0000)
commit0ab7e187b63488a77c97b1227338f1ab9d28c760
treea7c7b7f14855b8ef6138f5ca95b132097f869c5d
parent830fdd838ebf47f413499f39f94168d899ba484f
AX: event.target should sometimes be a descendant element on AXPress-triggered mouse clicks
https://bugs.webkit.org/show_bug.cgi?id=135689

Reviewed by Mario Sanchez Prada.

Source/WebCore:

When trying to find the right sub-node to target, we need to go back up the parent chain to find
an Element, in case we land on a Text node for example.

Test: accessibility/press-target-uses-text-descendant-node.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):

LayoutTests:

* accessibility/press-target-uses-text-descendant-node-expected.txt: Added.
* accessibility/press-target-uses-text-descendant-node.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/accessibility/press-target-uses-text-descendant-node-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/press-target-uses-text-descendant-node.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp