<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Add support for image previews"
href="https://bugs.webkit.org/show_bug.cgi?id=146350#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Add support for image previews"
href="https://bugs.webkit.org/show_bug.cgi?id=146350">bug 146350</a>
from <span class="vcard"><a class="email" href="mailto:thorton@apple.com" title="Tim Horton <thorton@apple.com>"> <span class="fn">Tim Horton</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=255647&action=diff" name="attach_255647" title="Patch">attachment 255647</a> <a href="attachment.cgi?id=255647&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=255647&action=review">https://bugs.webkit.org/attachment.cgi?id=255647&action=review</a>
<span class="quote">> Source/WebKit2/UIProcess/WKImagePreviewViewController.h:32
> +@interface WKImagePreviewViewController : UIViewController {</span >
no need for the curly braces
<span class="quote">> Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:53
> + _imageView = [[UIImageView alloc] initWithFrame:CGRectZero];</span >
This is leaking, no?
<span class="quote">> Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:54
> + [_imageView setImage:[[UIImage alloc] initWithCGImage:_image.get()]];</span >
This too, probably?
<span class="quote">> Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:56
> + CGSize screenSize = [[[UIApplication sharedApplication] delegate] window].bounds.size;</span >
More dots, less square brackets.
<span class="quote">> Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:70
> + CGRect bounds = self.view.bounds;
> + _imageView.frame = bounds;</span >
No need for the temporary.
<span class="quote">> Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:73
> +static CGSize _scaleSizeWithinSize(CGSize source, CGSize destination)</span >
Is this one of those GeometryUtilities (or whatever) things? If not, can it be?
<span class="quote">> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3146
> + SFSafariViewController *previewViewController = [allocSFSafariViewControllerInstance() initWithURL:targetURL];</span >
Seems likely that this leaks too?
<span class="quote">> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3157
> + return [[WKImagePreviewViewController alloc] initWithCGImage:_positionInformation.image->makeCGImageCopy()];</span >
And this?
<span class="quote">> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2142
> + RefPtr<ShareableBitmap> sharedBitmap = ShareableBitmap::createShareable(IntSize(image->size()), ShareableBitmap::SupportsAlpha);</span >
Please always null-check the result of ShareableBitmap::ctreateShareable.</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>