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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 22 01:50:41 PST 2021


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

            Bug ID: 220849
           Summary: Full-page (PDF) screenshots in iOS 14 Safari aren't
                    showing -webkit-mask correctly
           Product: WebKit
           Version: Safari 14
          Hardware: iPhone / iPad
                OS: iOS 14
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: henric.trotzig at happo.io

I am trying to take a screenshot of a web page that uses `-webkit-mask` to display icons. If I switch to the "Full page" tab of the screenshot dialog, the icons look bad. Consider the following web page: 

```
<div
  style="
    width: 300px;
    height: 300px;
    background: red;
    -webkit-mask: url('/mask.svg') 50% 50% / contain no-repeat;
  "
></div>
```

If I take a regular screenshot, it looks good: 

https://i.stack.imgur.com/leJTF.png

If I switch to "Full page", the mask isn't applied correctly:

https://i.stack.imgur.com/UW1XU.png

This likely isn't an issue for regular users. But if you're doing screenshot testing (like I am) you want to make sure that the screenshot is as close to what the user sees as possible. This bug is also present in [`WKWebView.createPDF`][3] which makes automation harder.  

For reference, this is the mask.svg being applied: 

```
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" 
d="M7.25 8.75V14H8.75V8.75H14L14 7.25H8.75V2H7.25V7.25H2V8.75H7.25Z" fill="yellow"/>
</svg>
```

-- 
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/20210122/2a245cf3/attachment.htm>


More information about the webkit-unassigned mailing list