<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&#64;apple.com" title="Tim Horton &lt;thorton&#64;apple.com&gt;"> <span class="fn">Tim Horton</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=255647&amp;action=diff" name="attach_255647" title="Patch">attachment 255647</a> <a href="attachment.cgi?id=255647&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=255647&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=255647&amp;action=review</a>

<span class="quote">&gt; Source/WebKit2/UIProcess/WKImagePreviewViewController.h:32
&gt; +&#64;interface WKImagePreviewViewController : UIViewController {</span >

no need for the curly braces

<span class="quote">&gt; Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:53
&gt; +    _imageView = [[UIImageView alloc] initWithFrame:CGRectZero];</span >

This is leaking, no?

<span class="quote">&gt; Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:54
&gt; +    [_imageView setImage:[[UIImage alloc] initWithCGImage:_image.get()]];</span >

This too, probably?

<span class="quote">&gt; Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:56
&gt; +    CGSize screenSize = [[[UIApplication sharedApplication] delegate] window].bounds.size;</span >

More dots, less square brackets.

<span class="quote">&gt; Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:70
&gt; +    CGRect bounds = self.view.bounds;
&gt; +    _imageView.frame = bounds;</span >

No need for the temporary.

<span class="quote">&gt; Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:73
&gt; +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">&gt; Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3146
&gt; +        SFSafariViewController *previewViewController = [allocSFSafariViewControllerInstance() initWithURL:targetURL];</span >

Seems likely that this leaks too?

<span class="quote">&gt; Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3157
&gt; +        return [[WKImagePreviewViewController alloc] initWithCGImage:_positionInformation.image-&gt;makeCGImageCopy()];</span >

And this?

<span class="quote">&gt; Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2142
&gt; +                            RefPtr&lt;ShareableBitmap&gt; sharedBitmap = ShareableBitmap::createShareable(IntSize(image-&gt;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>