<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@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#c9">comment #9</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=255661&action=diff" name="attach_255661" title="Patch">attachment 255661</a> <a href="attachment.cgi?id=255661&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=255661&action=review">https://bugs.webkit.org/attachment.cgi?id=255661&action=review</a>
>
> >> Source/WebKit2/UIProcess/WKImagePreviewViewController.mm:57
> >> + CGSize screenSize = UIApplication.sharedApplication.delegate.window.bounds.size;
> >
> > -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.
>
> Also, -delegate itself may return nil. And also, we normally don’t use dot
> notation to invoke class methods, so this should begin [UIApplication
> sharedApplication]. It’s also misleading to call something that is the size
> of a window screenSize. If we want the size of a screen we can use UIScreen
> 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>