<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#c5">Comment # 5</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: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=146350#c3">comment #3</a>)
<span class="quote">> Comment on <span class="bz_obsolete"><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>
>
> > Source/WebKit2/UIProcess/WKImagePreviewViewController.h:32
> > +@interface WKImagePreviewViewController : UIViewController {
>
> no need for the curly braces
> </span >
Fixed.
<span class="quote">> > Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:53
> > + _imageView = [[UIImageView alloc] initWithFrame:CGRectZero];
>
> This is leaking, no?
> </span >
Fixed.
<span class="quote">> > Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:54
> > + [_imageView setImage:[[UIImage alloc] initWithCGImage:_image.get()]];
>
> This too, probably?
> </span >
Fixed.
<span class="quote">> > Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:56
> > + CGSize screenSize = [[[UIApplication sharedApplication] delegate] window].bounds.size;
>
> More dots, less square brackets.
> </span >
Fixed.
<span class="quote">> > Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:70
> > + CGRect bounds = self.view.bounds;
> > + _imageView.frame = bounds;
>
> No need for the temporary.
> </span >
Fixed.
<span class="quote">> > Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:73
> > +static CGSize _scaleSizeWithinSize(CGSize source, CGSize destination)
>
> Is this one of those GeometryUtilities (or whatever) things? If not, can it
> be?
> </span >
Sort of, but this will be easier to explain in person.
<span class="quote">> > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3146
> > + SFSafariViewController *previewViewController = [allocSFSafariViewControllerInstance() initWithURL:targetURL];
>
> Seems likely that this leaks too?
> </span >
Fixed.
<span class="quote">> > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3157
> > + return [[WKImagePreviewViewController alloc] initWithCGImage:_positionInformation.image->makeCGImageCopy()];
>
> And this?
> </span >
Fixed.
<span class="quote">> > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2142
> > + RefPtr<ShareableBitmap> sharedBitmap = ShareableBitmap::createShareable(IntSize(image->size()), ShareableBitmap::SupportsAlpha);
>
> Please always null-check the result of ShareableBitmap::ctreateShareable.</span >
Fixed.
Thanks Tim!</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>