Bug 110925 - PDFPlugin: PDF orientation isn't respected when printing or print-previewing
Summary: PDFPlugin: PDF orientation isn't respected when printing or print-previewing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: PDF (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-02-26 16:49 PST by Tim Horton
Modified: 2013-02-28 11:19 PST (History)
1 user (show)

See Also:


Attachments
print (1.62 KB, patch)
2013-02-26 17:32 PST, Tim Horton
ap: 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 2013-02-26 16:49:31 PST
<rdar://problem/13008621>
Comment 1 Tim Horton 2013-02-26 17:32:07 PST
Created attachment 190400 [details]
print
Comment 2 Tim Horton 2013-02-26 17:32:07 PST
Created attachment 190401
Comment 3 Alexey Proskuryakov 2013-02-26 19:16:06 PST
Comment on attachment 190400 [details]
print

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

> Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:812
> +    NSInteger rotation = [pdfPage rotation];
> +    if (rotation == 90 || rotation == 270)
> +        std::swap(cropBox.size.width, cropBox.size.height);

Please add a comment about why this is the right thing to do (which is because we always autorotate). When we looked at this code previously, we both agreed that it was wrong, so it's not at all obvious what's going on.
Comment 4 Tim Horton 2013-02-28 11:19:08 PST
http://trac.webkit.org/changeset/144333