<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Add support for image previews"
   href="https://bugs.webkit.org/show_bug.cgi?id=146350#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - 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#c9">comment #9</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=255661&amp;action=diff" name="attach_255661" title="Patch">attachment 255661</a> <a href="attachment.cgi?id=255661&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=255661&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=255661&amp;action=review</a>
&gt; 
&gt; &gt;&gt; Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:57
&gt; &gt;&gt; +    CGSize screenSize = UIApplication.sharedApplication.delegate.window.bounds.size;
&gt; &gt; 
&gt; &gt; -window is an optional method in the UIApplicationDelegate protocol. Invoking it without checking if the delegate responds to it first could lead to a crash.
&gt; 
&gt; Also, -delegate itself may return nil. And also, we normally don’t use dot
&gt; notation to invoke class methods, so this should begin [UIApplication
&gt; sharedApplication]. It’s also misleading to call something that is the size
&gt; of a window screenSize. If we want the size of a screen we can use UIScreen
&gt; API to get it.</span >

Thanks, Dan! <a href="http://trac.webkit.org/changeset/186019">http://trac.webkit.org/changeset/186019</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>