[fxtf-drafts] Resolve whether to change UserSpaceOnUse spec (#538)

progers has just created a new issue for https://github.com/w3c/fxtf-drafts:

== Resolve whether to change UserSpaceOnUse spec ==
The spec for UserSpaceOnUse ([link](https://drafts.fxtf.org/css-masking-1/#element-attrdef-clippath-clippathunits)) states that clip-path contents use a coordinate system based on the referencing element, not the referenced clip-path:
> userSpaceOnUse: The contents of the [clipPath](https://drafts.fxtf.org/css-masking-1/#elementdef-clippath) represent values in the current [user coordinate system](https://drafts.csswg.org/css-transforms-1/#user-coordinate-system) in place at the time when the clipPath element is referenced (i.e., the user coordinate system for the element referencing the clipPath element via the [clip-path](https://drafts.fxtf.org/css-masking-1/#propdef-clip-path) property).

A simple example is the following testcase:
```
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
  <svg id="inner" x="0" y="0" width="200" height="200">
    <clipPath id="myclip" clipPathUnits="userSpaceOnUse">
      <rect x="0" y="0" width="50%" height="50%" />
    </clipPath>
  </svg>
  <rect width="500" height="500" fill="green" clip-path="url(#myclip)" />
</svg>
```

Batik follows the spec and the clip is sized to 250x250 (50% of the viewport)
Chromium, Webkit, Gecko, and Inkscape disagree with the spec and the clip is sized to 100x100 (50% of #inner).

One path forward is to measure if the current spec is web-compatible. This could be done by looking at httparchive data for relative units in clipPath, or by collecting metrics from a browser for how often this occurs in the wild.

Additional links: [chromium's tracking bug](https://crbug.com/294900), [gecko's tracking bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1834644) (see also [this discussion](https://bugzilla.mozilla.org/show_bug.cgi?id=866655)). Aspects of this issue were raised in https://github.com/w3c/fxtf-drafts/issues/249. This recently came up in interop-2023 and we excluded the two tests of this behavior (https://github.com/web-platform-tests/interop/issues/608).

Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/538 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 21 November 2023 21:02:36 UTC