Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0ad581ba4f4a68ed4ccdad22996301ffde891b2f
https://github.com/WebKit/WebKit/commit/0ad581ba4f4a68ed4ccdad22996301ffde891b2f
Author: Richard Robinson <[email protected]>
Date: 2023-04-10 (Mon, 10 Apr 2023)
Changed paths:
M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
Log Message:
-----------
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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes