Bug 139423 - Copy and Lookup menu items should be disabled when something is not copyable
Summary: Copy and Lookup menu items should be disabled when something is not copyable
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-12-08 16:58 PST by Beth Dakin
Modified: 2014-12-08 17:30 PST (History)
6 users (show)

See Also:


Attachments
Patch (11.90 KB, patch)
2014-12-08 17:05 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-12-08 16:58:53 PST
Copy and Lookup menu items should be disabled when something is not selectable

rdar://problem/19149219
Comment 1 Beth Dakin 2014-12-08 17:05:32 PST
Created attachment 242864 [details]
Patch
Comment 2 Tim Horton 2014-12-08 17:12:45 PST
Comment on attachment 242864 [details]
Patch

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

> Source/WebCore/rendering/HitTestResult.cpp:549
> +    Node* node = innerNode();

It seems like we need to run over all of the nodes in the range that we expand out to, not just the HitTestResult's innerNode (for user-select: none).

> Source/WebKit2/UIProcess/mac/WKActionMenuController.mm:783
> +    if (!hitTestResult->allowsCopy()) {

You can move this into the thing that makes them.

> Source/WebKit/mac/WebView/WebActionMenuController.mm:481
> +    if (!_hitTestResult.allowsCopy()) {

Ditto.
Comment 3 Beth Dakin 2014-12-08 17:30:07 PST
Thank you! http://trac.webkit.org/changeset/176999