Summary: | AX: Manual spell check with Command-; does not bring up suggestions | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | chris fleizach <cfleizach> | ||||
Component: | Accessibility | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | ||||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
chris fleizach
2009-07-01 13:36:34 PDT
Created attachment 32142 [details]
patch
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! will fix... |