Make xywh() compute to the equivalent inset() function
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox117 | --- | fixed |
People
(Reporter: boris, Assigned: boris)
References
(Blocks 1 open bug, )
Details
Attachments
(2 files)
Per https://drafts.csswg.org/css-shapes-1/#basic-shape-computed-values, we should make inset()/xywh()/rect() compute to the equivalent inset() function
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
Per spec
https://drafts.csswg.org/css-shapes-1/#basic-shape-computed-values, and
the spec issue, https://github.com/w3c/csswg-drafts/issues/9053,
all <basic-shape-rect> functions compute to the equivalent inset() function.
i.e.
xywh(x y w h) computes to
inset(y calc(100% - x - w) calc(100% - y - h) x)
Also, tweak the test, offset-path-shape-xywh-003, because the original
xywh(10% 10% 80% 80%) has to calculate calc(100% - calc(10% + 80%)),
whose result is Percentage(0.099999964) in Rust code, and then it makes us
compute an imprecision inset rect when building the gfx::path, so the result
becomes fuzzy because of the sub-pixel translation.
So change it to xywh(10% 10% 90% 90%) to avoid adding fuzzy tolerance.
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 2•3 years ago
|
||
Now xywh() and inset() should be interpolable, so add some tests for it.
Also, we have a lot of interpolation tests for motion in WPT, so it's
unnecessary to have the similar tests in test_transitions_per_property.html.
Comment 5•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/19f42d47ba8d
https://hg.mozilla.org/mozilla-central/rev/86b90f83c914
Description
•