WKPDFView paints rotated pages squished
[WebKit-https.git] / Source / WebKit2 / UIProcess / ios / WKPDFView.mm
index 746fbccda0a95188381ec8506ca0b976cf95c949..dc144f9e24de0fd0dd78032ba54fb0e9fde524c6 100644 (file)
@@ -239,7 +239,7 @@ typedef struct {
         if (!page)
             continue;
 
-        CGSize pageSize = [page size];
+        CGSize pageSize = [page cropBoxAccountForRotation].size;
         pageFrame.size.height = pageSize.height / pageSize.width * pageFrame.size.width;
         CGRect pageFrameWithMarginApplied = CGRectInset(pageFrame, pdfPageMargin, pdfPageMargin);