Specify a viewport for resolving userSpaceOnUse filterUnits
For non-SVG content, SVGViewportResolver won't be able to produce a
viewport, but will return 0x0 which turn means that every part of the
filter region that is percentages computes to zero. Instead allow
setting up a viewport in FilterEffectBuilder and pass that along when
resolving the filter region. For HTML elements use the border box size
as the viewport (matches Gecko) and for use the canvas
dimensions.
Guard behind the flag SvgFilterUserSpaceViewportForNonSvg.
Fixed: 41189886
Change-Id: Ib385340bdc4d30d6d17c447fb99d6db3bc66e8b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5594220
Reviewed-by: Xianzhu Wang wangxianzhu@chromium.org
Commit-Queue: Fredrik Söderquist fs@opera.com
Cr-Commit-Position: refs/heads/main@{#1311889}