aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/values/generics/motion.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move Stylo to its own repo (#31350)Delan Azabani2024-02-271-205/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove packages that were moved to external repo * Add workspace dependencies pointing to 2023-06-14 branch * Fix servo-tidy.toml errors * Update commit to include #31346 * Update commit to include servo/stylo#2 * Move css-properties.json lookup to target/doc/stylo * Remove dependency on vendored mako in favour of pypi dependency This also removes etc/ci/generate_workflow.py, which has been unused since at least 9e71bd6a7010d6e5723831696ae0ebe26b47682f. * Add temporary code to debug Windows test failures * Fix failures on Windows due to custom target dir * Update commit to include servo/stylo#3 * Fix license in tests/unit/style/build.rs * Document how to build with local Stylo in Cargo.toml
* style: Add at <position> into ray() in style systemBoris Chiou2023-11-241-19/+45
| | | | | | | | | | | | 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. Differential Revision: https://phabricator.services.mozilla.com/D179860
* style: Return Err() in to_animated_zero() for offset-pathBoris Chiou2023-11-241-3/+8
| | | | | | | | 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. Differential Revision: https://phabricator.services.mozilla.com/D179859
* style: Update the syntax of offset-positionBoris Chiou2023-11-241-0/+49
| | | | | | | | | | | | | | | Now it supports "normal" keyword. Also, offset-position doesn't create stacking context and it doesn't have offset transform, so we can simplify CompareMotionValues() a little bit. Note: We don't have to add test in [1] because Blink added one to WPT upstream repo already. [1] css/motion/parsing/offset-position-parsing-valid.html Note: the usage of offset-position is in other bugs. Differential Revision: https://phabricator.services.mozilla.com/D179623
* style: Make <ray-size> optional and default to 'closest-side'Boris Chiou2023-11-061-0/+9
| | | | | | | | | | | | | | | Per the spec update, the new syntax is: `ray() = ray( <angle> && <ray-size>? && contain? )` And for `<ray-size>`: "If no <ray-size> is specified it defaults to closest-side." So `<ray-size>` is optional and we omit it if it's default value, for serialization. By the way, offset=* properties are supported only in Gecko, so we don't need a servo function to check the preference. Differential Revision: https://phabricator.services.mozilla.com/D171625
* style: Implement ipdl reads without needing default ctorsEmilio Cobos Álvarez2023-11-061-1/+0
| | | | Differential Revision: https://phabricator.services.mozilla.com/D149743
* style: Use Serde for SVGOffsetPath.Boris Chiou2020-02-121-0/+3
| | | | Differential Revision: https://phabricator.services.mozilla.com/D60087
* style: Use serde to serialize LengthPercentage and StyleRayFunction.Boris Chiou2019-11-041-0/+4
| | | | | | | | | We need to pass these two types into the compositor, so we need a better way to serialize these rust types. We use serde and bincode to serialize/deserialize them, and use ByteBuf to pass the &[u8] data through IPC. We define StyleVecU8 for FFI usage only. Differential Revision: https://phabricator.services.mozilla.com/D50688
* style: Support ray() in offset-path and make it animatable.Boris Chiou2019-10-091-0/+110
1. Add `generics::motion::OffsetPath`, and use specified `Angle` and computed `Angle` to define specified `OffsetPath` and computed `OffsetPath`. 2. Add `ray` function into `OffsetPath`. We also tweak the degree from 150deg to 135deg in wpt (e.g. offset-path-ray-001.html and others) to avoid floating point precision issues. For example: ``` // offset-path: ray(150deg ...); // offset-distance: 20px; matrix: { {0.500000 0.866025 0.000000 0.000000}, {-0.866025 0.500000 0.000000 0.000000}, {0.000000 0.000000 1.000000 0.000000}, {10.000000 17.320509 0.000000 1.000000} } // rotate(60deg) translate(20px) matrix: { {0.500000 0.866025 0.000000 0.000000}, {-0.866025 0.500000 0.000000 0.000000}, {0.000000 0.000000 1.000000 0.000000}, {10.000000 17.320507 0.000000 1.000000} } ``` Their translate parts, 17.320509 vs 17.320507, are almost the same (only tiny difference), which may cause the reftest failed. Differential Revision: https://phabricator.services.mozilla.com/D42721