Bug 130444

Summary: [iOS] WebPDFViewPlaceholder divides-by-zero with an empty document
Product: WebKit Reporter: Tim Horton <thorton>
Component: WebKit Misc.Assignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: sam, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
none
patch sam: review+

Description Tim Horton 2014-03-18 23:37:44 PDT
If the document consists only of invalid pages, WebPDFViewPlaceholder will divide-by-zero when computing its destination size.
WKPDFView will just crash when it hits an invalid page, so we should avoid that as well.

<rdar://problem/15580682>
Comment 1 Tim Horton 2014-03-18 23:44:33 PDT
Created attachment 227159 [details]
patch
Comment 2 Tim Horton 2014-03-18 23:45:52 PDT
Created attachment 227160 [details]
patch
Comment 3 Tim Horton 2014-03-19 08:39:46 PDT
http://trac.webkit.org/changeset/165896