Bug 137891 - Add action menu support
Summary: Add action menu support
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-10-20 12:54 PDT by Beth Dakin
Modified: 2014-10-20 14:00 PDT (History)
7 users (show)

See Also:


Attachments
Patch (39.27 KB, patch)
2014-10-20 12:56 PDT, Beth Dakin
no flags Details | Formatted Diff | Diff
Patch with slightly different WK2 spin (39.78 KB, patch)
2014-10-20 13:41 PDT, Beth Dakin
andersca: 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-10-20 12:54:37 PDT
WK2 should support action menus.

rdar://problem/18451638
rdar://problem/18694470
Comment 1 Beth Dakin 2014-10-20 12:56:03 PDT
Created attachment 240141 [details]
Patch
Comment 2 WebKit Commit Bot 2014-10-20 12:59:04 PDT
Attachment 240141 [details] did not pass style-queue:


ERROR: Source/WebKit2/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
ERROR: Source/WebCore/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 2 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Beth Dakin 2014-10-20 13:01:31 PDT
(In reply to comment #2)
> Attachment 240141 [details] did not pass style-queue:
> 
> 
> ERROR: Source/WebKit2/ChangeLog:1:  ChangeLog entry has no bug number 
> [changelog/bugnumber] [5]
> ERROR: Source/WebCore/ChangeLog:1:  ChangeLog entry has no bug number 
> [changelog/bugnumber] [5]
> Total errors found: 2 in 13 files
> 
> 
> If any of these errors are false positives, please file a bug against
> check-webkit-style.

Oops! Fixed this.
Comment 4 Beth Dakin 2014-10-20 13:41:07 PDT
Created attachment 240143 [details]
Patch with slightly different WK2 spin
Comment 5 Anders Carlsson 2014-10-20 13:46:52 PDT
Comment on attachment 240143 [details]
Patch with slightly different WK2 spin

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

> Source/WebKit2/UIProcess/API/mac/WKView.mm:3710
> +    NSMutableArray *menuItems = [NSMutableArray array];
> +
> +    if (!hitTestResult)
> +        return menuItems;
> +
> +    if (!hitTestResult->absoluteLinkURL().isEmpty())
> +        return [self _defaultMenuItemsForLink];

I'd write this as 

if (WebHitTestResult* hitTestResult = _data->_page->activeActionMenuHitTestResult()) {
    if (!hitTestResult->absoluteLinkURL().isEmpty())
        return [self _defaultMenuItemsForLink];
}

return @[]
Comment 6 Beth Dakin 2014-10-20 14:00:45 PDT
Thanks Anders! http://trac.webkit.org/changeset/174908