<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:bdakin@apple.com" title="Beth Dakin <bdakin@apple.com>"> <span class="fn">Beth Dakin</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Allow the UIDelegate to customize an image preview"
href="https://bugs.webkit.org/show_bug.cgi?id=146557">bug 146557</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Allow the UIDelegate to customize an image preview"
href="https://bugs.webkit.org/show_bug.cgi?id=146557#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Allow the UIDelegate to customize an image preview"
href="https://bugs.webkit.org/show_bug.cgi?id=146557">bug 146557</a>
from <span class="vcard"><a class="email" href="mailto:bdakin@apple.com" title="Beth Dakin <bdakin@apple.com>"> <span class="fn">Beth Dakin</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=146557#c2">comment #2</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=256030&action=diff" name="attach_256030" title="Patch">attachment 256030</a> <a href="attachment.cgi?id=256030&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=256030&action=review">https://bugs.webkit.org/attachment.cgi?id=256030&action=review</a>
>
> > Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:60
> > +- (void)_webView:(WKWebView *)webView willPreviewImageWithURL:(NSURL *)imageURL;
> > +- (void)_webView:(WKWebView *)webView commitPreviewedImageWithURL:(NSURL *)imageURL;
>
> Please add WK_AVAILABLE macros.
> </span >
Added.
<span class="quote">> > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3216
> > + id<WKUIDelegatePrivate> uiDelegate = static_cast<id <WKUIDelegatePrivate>>([_webView UIDelegate]);
>
> space after id
> </span >
Fixed.
<span class="quote">> > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3237
> > + if (absoluteImageURL.isEmpty() || !WebCore::protocolIsInHTTPFamily(absoluteImageURL))
>
> At some point we should consider data: URL images.
> </span >
I added them! Still need to follow-up with Sam to make sure it's okay.
<span class="quote">> > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3241
> > + NSURL *targetURL = [NSURL _web_URLWithWTFString:_positionInformation.imageURL];
>
> No real need for the temporary, just like below.
> </span >
Fixed.
<span class="quote">> > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3252
> > + id<WKUIDelegatePrivate> uiDelegate = static_cast<id <WKUIDelegatePrivate>>([_webView UIDelegate]);
>
> space after id
> </span >
Fixed.
<span class="quote">> > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2162
> > + info.imageURL = [(NSURL *)element->document().completeURL(downcast<HTMLImageElement>(*element).src()) absoluteString];
>
> What happens if it's a srcset image?</span >
Good eye! They were broken. I fixed them by getting the URL from the RenderImage's CachedImage instead.
<a href="http://trac.webkit.org/changeset/186236">http://trac.webkit.org/changeset/186236</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>