Bug 138333 - Implement action menus for editable text with spelling suggestions
Summary: Implement action menus for editable text with spelling suggestions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-03 16:12 PST by Beth Dakin
Modified: 2014-11-03 17:06 PST (History)
4 users (show)

See Also:


Attachments
Patch (12.01 KB, patch)
2014-11-03 16:22 PST, Beth Dakin
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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