Bug 26900

Summary: AX: Manual spell check with Command-; does not bring up suggestions
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
patch bdakin: review+

Description chris fleizach 2009-07-01 13:36:34 PDT
Manual spell check with Command-; whilst finding the mis spelled word does not bring up suggestions within the context menu.
When on a mis spelled word with command-;, pressing Vo-Shift-M for the context menu does not result in any suggestions within the menu.
Comment 1 chris fleizach 2009-07-01 14:39:50 PDT
Created attachment 32142 [details]
patch
Comment 2 Beth Dakin 2009-07-01 14:45:47 PDT
Comment on attachment 32142 [details]
patch

> +IntPoint AccessibilityRenderObject::clickPoint() const
> +{
> +    // if we're asked to perform a show menu on an editable web area,
> +    // the click point should be where the selection is
> +    if (isWebArea() && !isReadOnly()) {
> +        VisibleSelection visSelection = selection();
> +        VisiblePositionRange range = VisiblePositionRange(visSelection.visibleStart(), visSelection.visibleEnd());
> +        IntRect bounds = boundsForVisiblePositionRange(range);
> +#if PLATFORM(MAC)
> +        bounds.setLocation(m_renderer->document()->view()->screenToContents(bounds.location()));
> +#endif        
> +        return IntPoint(bounds.x() + (bounds.width() / 2), bounds.y() - (bounds.height() / 2));
> +    }
> +
> +    return AccessibilityObject::clickPoint();
> +}

This is just a style nit-pick, but how about you do the generic case as an early return like:

if (!isWebArea() || isReadOnly())
    return AccessibilityObject::clickPoint();

VisibleSelection visSelection = selection();
…




r=me!
Comment 3 chris fleizach 2009-07-01 14:50:16 PDT
will fix...
Comment 4 chris fleizach 2009-07-01 15:01:32 PDT
http://trac.webkit.org/changeset/45452