Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REGRESSION: Thumbnail turns blank after choose A3/Tabloid paper size …
…in Print Screen https://bugs.webkit.org/show_bug.cgi?id=255210 rdar://107503946 Reviewed by Wenson Hsieh. iOS print preview thumbnail generation uses `CGBitmapContextCreateImage` to create the bitmap image. However, with some combinations of page scale size with paper size, the resulting image dimension becomes too large, resulting in the function returning null and no thumbnail being generated. This PR fixes this by scaling down the dimensions before the image is created to ensure the maximum possible size of the image is constrained. This limit is the size at which the thumbnail itself is rendered, so the scaling is safe to do. * Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::drawToImage): Canonical link: https://commits.webkit.org/262780@main
- Loading branch information