Bug 199940 - Add a menu item to toggle between showing and hiding link previews
Summary: Add a menu item to toggle between showing and hiding link previews
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-07-19 05:44 PDT by Dean Jackson
Modified: 2019-07-19 14:18 PDT (History)
2 users (show)

See Also:


Attachments
Patch (16.87 KB, patch)
2019-07-19 05:56 PDT, Dean Jackson
no flags Details | Formatted Diff | Diff
Patch (18.11 KB, patch)
2019-07-19 07:45 PDT, Dean Jackson
no flags Details | Formatted Diff | Diff
Patch (19.38 KB, patch)
2019-07-19 08:07 PDT, Dean Jackson
bdakin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2019-07-19 05:44:44 PDT
Add a menu item to toggle between showing and hiding link previews
Comment 1 Dean Jackson 2019-07-19 05:45:14 PDT
<rdar://problem/53032288>
Comment 2 Dean Jackson 2019-07-19 05:56:00 PDT
Created attachment 374460 [details]
Patch
Comment 3 Dean Jackson 2019-07-19 07:45:40 PDT
Created attachment 374465 [details]
Patch
Comment 4 Dean Jackson 2019-07-19 08:07:25 PDT
Created attachment 374466 [details]
Patch
Comment 5 Beth Dakin 2019-07-19 10:13:53 PDT
Comment on attachment 374466 [details]
Patch

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

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:7674
> +    if (!originalMenu)

Is there ever a case when a menu would no items would be represented by a nil menu? I just want to make sure that if a client removes ALL of the menu items, we still provide this one.
Comment 6 Dean Jackson 2019-07-19 12:15:28 PDT
Comment on attachment 374466 [details]
Patch

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

>> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:7674
>> +    if (!originalMenu)
> 
> Is there ever a case when a menu would no items would be represented by a nil menu? I just want to make sure that if a client removes ALL of the menu items, we still provide this one.

Good point! Yes, if they remove all the items (which they technically shouldn't do) we have to provide this one.

I used to have code where we'd provide all the default actions if they removed everything. I'll make sure that still happens, since that's what HI wanted.
Comment 7 Dean Jackson 2019-07-19 14:18:22 PDT
Committed r247652: <https://trac.webkit.org/changeset/247652>