Closed Bug 1786161 Opened 2 years ago Closed 7 months ago

[css-shapes-1] Implement rect() function

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: sebo, Assigned: boris)

References

(Blocks 3 open bugs, )

Details

(Keywords: dev-doc-complete)

Attachments

(2 files)

The CSS Shapes 1 specification defines a rect() function to create a rectangular shape as insets from the reference box similar to the inset() function.

This bug is meant to implement that function.

Sebastian

Severity: -- → S3
Assignee: nobody → boris.chiou
Blocks: motion-1

Note that rect() computes to the equivalent inset() function as well.
i.e. Given rect(t r b l), the equivalent function is
inset(t calc(100% - r) calc(100% - b) l).

The implementation is straightforward, and we don't have to change
anything in cpp because it is always inset() when building the gfx::Path.

The tests for clip-path will be added in the following patch.

Also, move the interpolation of xywh() into
clip-path-interpolation-xywh-rect.html.

Pushed by bchiou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/014ccd272ac6
Support rect() function. r=devtools-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/fbce1db481ca
Add rect() tests for clip-path. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/41169 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
Upstream PR merged by moz-wptsync-bot

MDN doc updates for this feature can be tracked via this issue: https://github.com/mdn/content/issues/28287 (in review).
Thanks Boris for all your help!

Blocks: 1868722
You need to log in before you can comment on or make changes to this bug.