mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Implement #[compute(clone)] for #[derive(ToComputedValue)]
This commit is contained in:
parent
efc852f6e3
commit
735e093de7
6 changed files with 37 additions and 95 deletions
|
@ -35,16 +35,18 @@ pub enum Image<Gradient, MozImageRect, ImageUrl> {
|
|||
|
||||
/// A CSS gradient.
|
||||
/// https://drafts.csswg.org/css-images/#gradients
|
||||
#[derive(Clone, Debug, HasViewportPercentage, PartialEq)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[derive(Clone, Debug, HasViewportPercentage, PartialEq, ToComputedValue)]
|
||||
pub struct Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle> {
|
||||
/// Gradients can be linear or radial.
|
||||
pub kind: GradientKind<LineDirection, Length, LengthOrPercentage, Position, Angle>,
|
||||
/// The color stops and interpolation hints.
|
||||
pub items: Vec<GradientItem<Color, LengthOrPercentage>>,
|
||||
/// True if this is a repeating gradient.
|
||||
#[compute(clone)]
|
||||
pub repeating: bool,
|
||||
/// Compatibility mode.
|
||||
#[compute(clone)]
|
||||
pub compat_mode: CompatMode,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue