The Filter Effects spec describes the filter region in terms of how it applies to SVG elements, but its behavior on CSS boxes is not well defined.
In particular, if the CSS box to which the filter is being applies has ink overflow, I can't find a definition of how the filter region is computed. The behavior that Gecko and Blink have is to use the ink overflow bounds for userSpaceOnUse, and border box for objectBoundingBox, but I don't believe that's actually written down.
Using the ink overflow box is also a little surprising, because it's not precisely defined. E.g. UAs differ on the exact extent of box-shadow, for example.
Basic test that has different behavior in WebKit and other browsers: https://codepen.io/smfr/pen/WbwJBNr
I intend to make WebKit match other browsers, but I think the spec needs edits to make the behavior explicit.
The Filter Effects spec describes the filter region in terms of how it applies to SVG elements, but its behavior on CSS boxes is not well defined.
In particular, if the CSS box to which the filter is being applies has ink overflow, I can't find a definition of how the
filter regionis computed. The behavior that Gecko and Blink have is to use the ink overflow bounds foruserSpaceOnUse, and border box forobjectBoundingBox, but I don't believe that's actually written down.Using the ink overflow box is also a little surprising, because it's not precisely defined. E.g. UAs differ on the exact extent of box-shadow, for example.
Basic test that has different behavior in WebKit and other browsers: https://codepen.io/smfr/pen/WbwJBNr
I intend to make WebKit match other browsers, but I think the spec needs edits to make the behavior explicit.