Bug 69262 - AX: click point for AXHeadings often returns point on empty space (results in wrong context menu)
Summary: AX: click point for AXHeadings often returns point on empty space (results in...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: chris fleizach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-03 08:41 PDT by chris fleizach
Modified: 2011-10-03 11:09 PDT (History)
1 user (show)

See Also:


Attachments
patch (7.96 KB, patch)
2011-10-03 09:40 PDT, chris fleizach
sullivan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description chris fleizach 2011-10-03 08:41:10 PDT
With VoiceOver, if you move to a heading (<h*> tag) and then try to open the contextual menu, often you will open a contextual menu on empty white space

that's because the click point is the mid point while the content of the heading is much smaller
Comment 1 chris fleizach 2011-10-03 09:40:37 PDT
Created attachment 109492 [details]
patch
Comment 2 John Sullivan 2011-10-03 10:07:23 PDT
Comment on attachment 109492 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=109492&action=review

> Source/WebCore/accessibility/AccessibilityObject.h:-510
> -    virtual LayoutPoint clickPoint() const;

You should mention in the ChangeLog why you had to remove the const. I presume you did so because AccessibilityObject::children() is non-const? Could you change AccessibilityObject::children() to be const instead?
Comment 3 chris fleizach 2011-10-03 10:10:42 PDT
(In reply to comment #2)
> (From update of attachment 109492 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=109492&action=review
> 
> > Source/WebCore/accessibility/AccessibilityObject.h:-510
> > -    virtual LayoutPoint clickPoint() const;
> 
> You should mention in the ChangeLog why you had to remove the const. I presume you did so because AccessibilityObject::children() is non-const? Could you change AccessibilityObject::children() to be const instead?

children() ensures that the objects children are up to date when called so it would be risky to change that to non-const. I will add a comment why it was changed. I'll start thinking about how to possibly make children() const
Comment 4 chris fleizach 2011-10-03 11:04:06 PDT
http://trac.webkit.org/changeset/96520
Comment 5 Adam Barth 2011-10-03 11:07:00 PDT
> http://trac.webkit.org/changeset/96520

You don't seem to have landed the tests for this patch in http://trac.webkit.org/changeset/96520
Comment 6 chris fleizach 2011-10-03 11:09:31 PDT
(In reply to comment #5)
> > http://trac.webkit.org/changeset/96520
> 
> You don't seem to have landed the tests for this patch in http://trac.webkit.org/changeset/96520

Fixed in

http://trac.webkit.org/changeset/96522