[Webkit-unassigned] [Bug 220849] Full-page (PDF) screenshots in iOS 14 Safari aren't showing -webkit-mask correctly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 28 11:58:39 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=220849

--- Comment #5 from Henric Trotzig <henric.trotzig at happo.io> ---
If anyone has an idea for a workaround I could use, I'd be very happy! I'll walk you through my usecase and the issue I'm facing: 

I have a screenshot testing service where I use an iPhone simulator to take (automated) screenshots of web components and pages. In iOS 12, the screenshots you get back from calling `WKWebView.takeSnapshots` contain the entire document, including things rendered outside the viewport. In iOS 13, the behavior changed so that screenshots only included the content in the viewport, everything else came out as fully transparent pixels.

The change in behavior is similar to a change done to Chrome/Chromium, as reported in this issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1003629 (also discussed in the puppeteer repo: https://github.com/puppeteer/puppeteer/issues/5080). That issue was resolved after a while by setting a blink flag (`mainFrameClipsContent=false`) which brought back the old behavior. 

Apart from using WKWebView.createPDF option, there are other workarounds for this issue, including scrolling the page and stitching together a single image (hard because of dynamic content that can shift the layout, plus slow), resizing the browser window (makes using `vh` units in css impossible). 

Let me know if you want me to file this as a separate issue, I realize I'm threadjacking here.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210128/35f0d405/attachment-0001.htm>


More information about the webkit-unassigned mailing list