<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&#64;apple.com" title="Beth Dakin &lt;bdakin&#64;apple.com&gt;"> <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">&gt; Comment on <span class="bz_obsolete"><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>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <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>
&gt; 
&gt; &gt; Source/WebKit2/UIProcess/WKImagePreviewViewController.h:32
&gt; &gt; +&#64;interface WKImagePreviewViewController : UIViewController {
&gt; 
&gt; no need for the curly braces
&gt; </span >
Fixed.

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

Fixed.

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

Fixed.

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

Fixed.

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

Fixed.

<span class="quote">&gt; &gt; Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:73
&gt; &gt; +static CGSize _scaleSizeWithinSize(CGSize source, CGSize destination)
&gt; 
&gt; Is this one of those GeometryUtilities (or whatever) things? If not, can it
&gt; be?
&gt; </span >

Sort of, but this will be easier to explain in person.

<span class="quote">&gt; &gt; Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3146
&gt; &gt; +        SFSafariViewController *previewViewController = [allocSFSafariViewControllerInstance() initWithURL:targetURL];
&gt; 
&gt; Seems likely that this leaks too?
&gt; </span >

Fixed.

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

Fixed.

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