mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Add some attributes for SpecifiedValueInfo to help deriving more from types.
Bug: 1434130 Reviewed-by: emilio MozReview-Commit-ID: IyohSTbUO31
This commit is contained in:
parent
0021c70c08
commit
0f7f9eebc0
17 changed files with 137 additions and 36 deletions
|
@ -570,6 +570,7 @@ pub type GridTemplateComponent = GenericGridTemplateComponent<LengthOrPercentage
|
|||
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo)]
|
||||
/// rect(<top>, <left>, <bottom>, <right>) used by clip and image-region
|
||||
#[css(function = "rect")]
|
||||
pub struct ClipRect {
|
||||
/// <top> (<length> | <auto>)
|
||||
pub top: Option<Length>,
|
||||
|
@ -757,7 +758,9 @@ impl AllowQuirks {
|
|||
/// An attr(...) rule
|
||||
///
|
||||
/// `[namespace? `|`]? ident`
|
||||
#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, ToComputedValue)]
|
||||
#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
|
||||
ToComputedValue)]
|
||||
#[css(function)]
|
||||
pub struct Attr {
|
||||
/// Optional namespace prefix and URL.
|
||||
pub namespace: Option<(Prefix, Namespace)>,
|
||||
|
@ -852,5 +855,3 @@ impl ToCss for Attr {
|
|||
dest.write_str(")")
|
||||
}
|
||||
}
|
||||
|
||||
impl SpecifiedValueInfo for Attr {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue