[Webkit-unassigned] [Bug 146350] Add support for image previews

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 26 15:46:33 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=146350

--- Comment #9 from mitz at webkit.org <mitz at webkit.org> ---
Comment on attachment 255661
  --> https://bugs.webkit.org/attachment.cgi?id=255661
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=255661&action=review

>> 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150626/f72b6060/attachment.html>


More information about the webkit-unassigned mailing list