Bug 123840

Summary: [mac] PDFDocumentImage is too big if PDF has a crop box smaller than the media box
Product: WebKit Reporter: Tim Horton <thorton>
Component: ImagesAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: ap
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch ap: review+

Description Tim Horton 2013-11-05 16:54:26 PST
PDFDocumentImage uses the media box unconditionally when determining the size of the image, which is wrong. It does the right thing (use crop box and fall back to media box if it's not there) in other places, though... so, make this consistent.

Also, if the crop box origin is not 0,0, we double-translate by it, because PDFKit applies translation for us.

<rdar://problem/15308765>
Comment 1 Tim Horton 2013-11-05 16:59:36 PST
Created attachment 216099 [details]
patch
Comment 2 Tim Horton 2013-11-05 17:11:31 PST
http://trac.webkit.org/changeset/158701