Re: [csswg-drafts] [filter-effects] Specify rounding behaviour of feMorphology radius attribute (#3619)

Blink is looking to change its behavior in M84 (see https://chromium-review.googlesource.com/c/chromium/src/+/2132426 ). Previous to this change the radii were calculated in css pixels, then floored to integer css pixels, then sent through the CTM to get to physical pixels and then floored again to integer physical pixels to do the actual effect. To avoid the double flooring this is being changed to remove the intermediate floor in css pixels and round instead of floor in physical pixels. So the new behavior is map the radii through to physical pixels and then round the radii just before applying the effect to the physical pixels.

After a quick look at the Firefox implementation it wan't immediately clear at what stage the conversion to integer was happening (in css or physical pixels). In general it seems best to put off any conversion to integer until actually doing the effect to physical pixels.

The consensus locally seems to be that the old behavior of flooring probably isn't a good idea. Effectively taking the ceiling as Firefox does seems to have some merit as it always provides some effect if a radius is non-zero. We ended up picking rounding (before finding this issue) since it picks the closest integer. Another possibility is for anything greater than zero but less than one to go up to one but for other values to round.

-- 
GitHub Notification of comment by bungeman
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3619#issuecomment-612037579 using your GitHub account

Received on Friday, 10 April 2020 13:52:06 UTC