Created attachment 190400 [details]
Created attachment 190401
Comment on attachment 190400 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=190400&action=review
> + 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.