Bug 204037

Summary: Long-pressing support.apple.com categories shows a PNG instead of the web page preview, tapping loads image asset only instead of web page
Product: WebKit Reporter: Dean Jackson <dino>
Component: New BugsAssignee: Dean Jackson <dino>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, simon.fraser, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=204058
Attachments:
Description Flags
Patch simon.fraser: review+

Description Dean Jackson 2019-11-08 17:43:00 PST
Clicky Orbing support.apple.com categories shows a PNG instead of the web page preview, tapping loads image asset only instead of web page
Comment 1 Dean Jackson 2019-11-08 17:51:51 PST
Created attachment 383189 [details]
Patch
Comment 2 Dean Jackson 2019-11-08 17:52:12 PST
<rdar://55614939>
Comment 3 Simon Fraser (smfr) 2019-11-09 11:37:33 PST
Comment on attachment 383189 [details]
Patch

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

> Source/WebKit/ChangeLog:10
> +        Sometime recently, Safari started using our ContextMenu API rather than the old SPI. At that
> +        point they accidentally began providing a PreviewViewController that displayed the image

Maybe reword this.

> Source/WebKit/ChangeLog:15
> +        This could be fixed in Safari, but I noticed that we actually tell the delegate that the
> +        type of the activated element is an image, which is why they treat it as such. It's not
> +        clear that because the image also has a link attached, a client should defer to the link.

Are we not able to tell the client "link and image"?
Comment 4 Dean Jackson 2019-11-09 12:16:13 PST
Committed r252309: <https://trac.webkit.org/changeset/252309>
Comment 5 Dean Jackson 2019-11-09 13:04:40 PST
(In reply to Simon Fraser (smfr) from comment #3)
> Comment on attachment 383189 [details]
> 
> Are we not able to tell the client "link and image"?

We do. We don't give them a type, just information on whether there is a link and whether there is an image. The client decides what to do.
Comment 6 Aakash Jain 2019-11-10 05:11:54 PST
(In reply to Dean Jackson from comment #4)
> Committed r252309: <https://trac.webkit.org/changeset/252309>
The newly added API test TestWebKitAPI._WKActivatedElementInfo.InfoForLinkAroundImage is failing consistently on iOS. EWS status-bubble for api-ios was also red and indicated this failure. 

Tracked in Bug 204058.