mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
style: Derive ToResolvedValue.
Differential Revision: https://phabricator.services.mozilla.com/D26783
This commit is contained in:
parent
6ac777ebf2
commit
a47dcb5707
53 changed files with 359 additions and 108 deletions
|
@ -27,6 +27,7 @@ use style_traits::{CssWriter, ToCss};
|
|||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
#[css(comma, function)]
|
||||
|
@ -42,8 +43,18 @@ pub struct Matrix<T> {
|
|||
#[allow(missing_docs)]
|
||||
#[cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#[css(comma, function = "matrix3d")]
|
||||
#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
|
||||
ToComputedValue, ToCss, ToShmem)]
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
MallocSizeOf,
|
||||
PartialEq,
|
||||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
pub struct Matrix3D<T> {
|
||||
pub m11: T, pub m12: T, pub m13: T, pub m14: T,
|
||||
pub m21: T, pub m22: T, pub m23: T, pub m24: T,
|
||||
|
@ -90,6 +101,7 @@ impl<T: Into<f64>> From<Matrix3D<T>> for Transform3D<f64> {
|
|||
ToAnimatedZero,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
#[repr(C)]
|
||||
|
@ -120,7 +132,7 @@ fn is_same<N: PartialEq>(x: &N, y: &N) -> bool {
|
|||
}
|
||||
|
||||
#[derive(
|
||||
Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToShmem,
|
||||
Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
|
||||
)]
|
||||
/// A single operation in the list of a `transform` value
|
||||
pub enum TransformOperation<Angle, Number, Length, Integer, LengthPercentage>
|
||||
|
@ -227,7 +239,7 @@ where
|
|||
}
|
||||
|
||||
#[derive(
|
||||
Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToShmem,
|
||||
Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
|
||||
)]
|
||||
/// A value of the `transform` property
|
||||
pub struct Transform<T>(#[css(if_empty = "none", iterable)] pub Vec<T>);
|
||||
|
@ -558,6 +570,7 @@ pub fn get_normalized_vector_and_angle<T: Zero>(
|
|||
SpecifiedValueInfo,
|
||||
ToAnimatedZero,
|
||||
ToComputedValue,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
/// A value of the `Rotate` property
|
||||
|
@ -628,6 +641,7 @@ where
|
|||
SpecifiedValueInfo,
|
||||
ToAnimatedZero,
|
||||
ToComputedValue,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
/// A value of the `Scale` property
|
||||
|
@ -677,6 +691,7 @@ impl<Number: ToCss + PartialEq> ToCss for Scale<Number> {
|
|||
ToAnimatedZero,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
/// A value of the `translate` property
|
||||
|
@ -719,6 +734,7 @@ where
|
|||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
pub enum TransformStyle {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue