Closed Bug 1820070 Opened 1 year ago Closed 11 months ago

Apply offset-position to ray()

Categories

(Core :: CSS Transitions and Animations, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: boris, Assigned: boris)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(4 files)

offset-position should be applied to ray() function.

Blocks: motion-1
Duplicate of this bug: 1835165

It's unnecessary to implement ToAnimatedZero for this property and so we
return Err(()), just like other properties which also use basic shapes,
e.g. clip-path, shape-outside.

We reuse PositionOrAuto here, and let "auto" represent the situation when the
author omits "at <position>" because it has a special meaning.

https://drafts.fxtf.org/motion-1/#valdef-ray-at-position

Note: No need to update css/motion/parsing/offset-path-parsing-valid.html
because Blink added some to the upstream repo already.

We apply offset-position and "at <position>" to ray function. However,
only use it on the main thread. For compositor animation, we will finish
it in the following patches.

No need to add tests because there are tests in the WPT upstream repo already:
css/motion/offset-path-ray-011.html
css/motion/offset-path-ray-012.html
css/motion/offset-path-ray-013.html
css/motion/offset-path-ray-014.html

Those tests should cover what we do in this patch.

We send offset-position to the compositor, just like other similar
properties, e.g. offset-rotate, offset-anchor. This includes extracting
this animation value, doing serialization and sending it via IPC.

So now we can run the animation of ray() on the compositor properly.

Assignee: nobody → boris.chiou
Pushed by bchiou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1b4fccd6ecff
Part 1: Return Err() in to_animated_zero() for offset-path. r=emilio
https://hg.mozilla.org/integration/autoland/rev/c9a0635b6d98
Part 2: Add at <position> into ray() in style system. r=emilio
https://hg.mozilla.org/integration/autoland/rev/c53b5d507346
Part 3: Apply "at <position>" and offset-position to ray function. r=emilio
https://hg.mozilla.org/integration/autoland/rev/3a8e0dd854b5
Part 4: Send offset-position to the compositor. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/40408 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Keywords: dev-doc-needed

Corresponding MDN doc updates can be tracked via this issue: https://github.com/mdn/content/issues/27751

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

Attachment

General

Created:
Updated:
Size: