Bug 191021 - Web Inspector: Styles: missing contextmenu items for links
Summary: Web Inspector: Styles: missing contextmenu items for links
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-10-29 00:10 PDT by Devin Rousso
Modified: 2018-10-31 16:58 PDT (History)
5 users (show)

See Also:


Attachments
Patch (4.04 KB, patch)
2018-10-29 00:11 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (6.85 KB, patch)
2018-10-29 19:58 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2018-10-29 00:10:00 PDT
The contextmenu of styles with links should show the usual "Open in New Tab" and "Copy Link Address" options.
Comment 1 Devin Rousso 2018-10-29 00:11:39 PDT
Created attachment 353277 [details]
Patch
Comment 2 Joseph Pecoraro 2018-10-29 16:38:49 PDT
Comment on attachment 353277 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js:97
>      contextMenu.appendItem(WI.UIString("Open in New Tab"), () => {

Hmm, Safari doesn't show "Open in New Tab" if the link is a `javascript:` link. I think we should probably do the same for `javascript:` / `data:` and maybe all non-http/https links.

> Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js:117
>      contextMenu.appendItem(WI.UIString("Copy Link Address"), () => {

Hmm, Safari shows "Copy Link" instead of "Copy Link Address". I think we should probably update our text.

> Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js:708
> +        WI.appendContextMenuItemsForURL(contextMenu, token.value);

Does this work with both an absolute and relative URL?
Comment 3 Devin Rousso 2018-10-29 19:58:18 PDT
Created attachment 353349 [details]
Patch
Comment 4 WebKit Commit Bot 2018-10-31 16:57:37 PDT
Comment on attachment 353349 [details]
Patch

Clearing flags on attachment: 353349

Committed r237660: <https://trac.webkit.org/changeset/237660>
Comment 5 WebKit Commit Bot 2018-10-31 16:57:39 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-10-31 16:58:34 PDT
<rdar://problem/45716821>