Closed Bug 1821450 Opened 9 months ago Closed 7 months ago

Simplify the contain keyword for ray function


(Core :: Layout, enhancement)




115 Branch
Tracking Status
firefox115 --- fixed


(Reporter: boris, Assigned: boris)


(Blocks 1 open bug, )


(Keywords: dev-doc-complete)


(1 file, 1 obsolete file)

Per spec issue:, there is a update for contain keyword. Basically it simplify the math calculation and has some impact on the behavior of animations. We should update the implementation once this spec issue gets resolved.

Blocks: 1598151
Keywords: dev-doc-needed
Assignee: nobody → boris.chiou

Per the spec change, when using contain keyword, the path’s length is reduced
by half the width or half the height of the element’s border box, whichever is
larger, and floored at zero.

Tests are in WPT: css/motion/offset-path-ray-contain-00*.html.

Note that these tests are failed because we haven't synced with WPT repo.
After our WPT gets synced, all tests will be passed.

For motion ray() with contain keyword, we are always using
the width and height of the border-box. So this patch makes us easier to
get the border-box dimension from TransformReferenceBox no matter what
transform-box we set.

Attachment #9332940 - Attachment is obsolete: true
Pushed by
Update the calculation of contain keyword in ray(). r=emilio
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
Regressions: 1836831

Doc updates can be tracked via this issue:

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