AX: click point for AXHeadings often returns point on empty space (results in wrong...
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Oct 2011 18:04:54 +0000 (18:04 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Oct 2011 18:04:54 +0000 (18:04 +0000)
commitf9fa8056d0cb0f43d7f8e6bc439639e8375cdb0b
tree561b6c3e69a04e3ef59a7a3888affa684f0a9dd9
parent095dcd2bd2e8bc00ef1590fb8c56e3f452bb4a5a
AX: click point for AXHeadings often returns point on empty space (results in wrong context menu)
https://bugs.webkit.org/show_bug.cgi?id=69262

Source/WebCore:

When the contextual menu is opened for a heading, often it will open on empty space because
the heading is wider than the content inside. The click point should thus use the content
inside the heading as the click point.

To accomplish this we need to query whether we have children using children() which is a non-const
method, hence the removal of const from clickPoint().

Reviewed by John Sullivan.

Test: platform/mac/accessibility/heading-clickpoint.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::clickPoint):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::clickPoint):
* accessibility/AccessibilityRenderObject.h:

LayoutTests:

Reviewed by John Sullivan.

* platform/mac/accessibility/heading-clickpoint-expected.txt: Added.
* platform/mac/accessibility/heading-clickpoint.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.h