Bug 130444 - [iOS] WebPDFViewPlaceholder divides-by-zero with an empty document
Summary: [iOS] WebPDFViewPlaceholder divides-by-zero with an empty document
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-03-18 23:37 PDT by Tim Horton
Modified: 2014-03-19 08:39 PDT (History)
2 users (show)

See Also:


Attachments
patch (5.87 KB, patch)
2014-03-18 23:44 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
patch (6.32 KB, patch)
2014-03-18 23:45 PDT, Tim Horton
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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