mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Define offset-path and implement it in style system.
Define OffsetPath & SVGPathData on the servo-side, and StyleMotion & StyleSVGPath on the gecko-side. We parse the SVG Path string into a vector of PathCommand. To build the gfx::Path, we will convert it into gfx::Path later in a different patch. The basic flow is: - Parse SVG Path String into SVGPathData (in Rust). - Use cbindgen to make sure the layout of PathCommand and StylePathCommand, and then set the Box[PathCommand] into nsTArray<StylePathCommand>. - Try to convert nsTArray<StylePathCommand> into gfx::Path. (This part will be implemented in a different patch.) Finally, we use the gfx::Path to create a motion path transform. The layout implementation is in the later patch. Depends on D2962 Differential Revision: https://phabricator.services.mozilla.com/D2963
This commit is contained in:
parent
249b865eb8
commit
dce2e2927f
8 changed files with 742 additions and 3 deletions
|
@ -356,6 +356,17 @@ ${helpers.predefined_type(
|
|||
servo_restyle_damage="reflow_out_of_flow"
|
||||
)}
|
||||
|
||||
// Motion Path Module Level 1
|
||||
${helpers.predefined_type(
|
||||
"offset-path",
|
||||
"OffsetPath",
|
||||
"computed::OffsetPath::none()",
|
||||
animation_value_type="none",
|
||||
gecko_pref="layout.css.motion-path.enabled",
|
||||
flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
|
||||
spec="https://drafts.fxtf.org/motion-1/#offset-path-property"
|
||||
)}
|
||||
|
||||
// CSSOM View Module
|
||||
// https://www.w3.org/TR/cssom-view-1/
|
||||
${helpers.single_keyword("scroll-behavior",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue