W3C home > Mailing lists > Public > public-fxtf-archive@w3.org > June 2019

Re: [fxtf-drafts] [filter-effects-1] feDropShadowElement definition does not match implementations (#343)

From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
Date: Fri, 14 Jun 2019 01:11:17 +0000
To: public-fxtf-archive@w3.org
Message-ID: <issue_comment.created-501931829-1560474676-sysbot+gh@w3.org>
Because it's a single primitive, the clipping should logically be performed at the end of the operation. And that's a nicer result for authors, anyway. But this means that the equivalent representation needs to include calculations for the filter region of the intermediate steps that is large enough to avoid premature clipping.

The following code (apply the offset prior to blurring, and set an explicit filter region on the offset to avoid clipping at that stage) creates a fairly close rendering match in Chrome (the blurring algorithm isn't exactly the same, but the blurring algorithm is also not defined in the spec):

```xml
        <filter id="proposedDropShadow">
            <feOffset in2="SourceAlpha" dx="50" dy="50"
                      width="calc(120% + 50)" height="calc(120% + 50)"/>
            <feGaussianBlur stdDeviation="30" result="offsetblur" />
            <feFlood flood-color="green" flood-opacity="1"/>
            <feComposite in2="offsetblur" operator="in"/>
            <feMerge>
                <feMergeNode/>
                <feMergeNode in="SourceGraphic"/>
            </feMerge>
        </filter>
```

But… Firefox still clips the `feOffset` result, even if I replace the `calc()` expressions with equivalent large single values (e.g., 250% or 500px). But maybe that's worth a separate issue discussion.

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/343#issuecomment-501931829 using your GitHub account
Received on Friday, 14 June 2019 01:11:18 UTC

This archive was generated by hypermail 2.3.1 : Friday, 14 June 2019 01:11:19 UTC