Bug 26900 - AX: Manual spell check with Command-; does not bring up suggestions
Summary: AX: Manual spell check with Command-; does not bring up suggestions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-01 13:36 PDT by chris fleizach
Modified: 2009-07-01 15:01 PDT (History)
0 users

See Also:


Attachments
patch (12.27 KB, patch)
2009-07-01 14:39 PDT, chris fleizach
bdakin: 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 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