Bug 138333

Summary: Implement action menus for editable text with spelling suggestions
Product: WebKit Reporter: Beth Dakin <bdakin>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, bdakin, commit-queue, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch thorton: review+

Description Beth Dakin 2014-11-03 16:12:52 PST
Implement action menus for editable text with spelling suggestions

rdar://problem/18742371
Comment 1 Beth Dakin 2014-11-03 16:22:26 PST
Created attachment 240881 [details]
Patch
Comment 2 WebKit Commit Bot 2014-11-03 16:24:10 PST
Attachment 240881 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/mac/WKActionMenuController.mm:374:  This { should be at the end of the previous line  [whitespace/braces] [4]
Total errors found: 1 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Tim Horton 2014-11-03 16:39:47 PST
Comment on attachment 240881 [details]
Patch

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

> Source/WebKit2/UIProcess/mac/WKActionMenuController.mm:570
> +                Vector<String> guesses;

Please push this down into _defaultMenuItemsForEditableTextWithSuggestions.

> Source/WebKit2/UIProcess/mac/WKActionMenuController.mm:575
> +                    for (unsigned i = 0; i < guesses.size(); i++) {

Modern for loop here, please?

> Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:1185
> +    HitTestResult result = m_page->mainFrame().eventHandler().hitTestResultAtPoint(m_page->mainFrame().view()->windowToContents(point), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowChildFrameContent | HitTestRequest::IgnoreClipping);

We already have a mainFrame local reference, why are we getting it from m_page repeatedly here?
Comment 4 Beth Dakin 2014-11-03 17:06:35 PST
Thank you! Fixed all. http://trac.webkit.org/changeset/175498