mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Derive ToComputedValue in grid properties.
This commit is contained in:
parent
b9f5388635
commit
5b05aa7c52
1 changed files with 2 additions and 5 deletions
|
@ -291,19 +291,18 @@ ${helpers.predefined_type("object-position",
|
|||
animation_value_type="discrete">
|
||||
use std::fmt;
|
||||
use style_traits::ToCss;
|
||||
use values::computed::ComputedValueAsSpecified;
|
||||
|
||||
pub type SpecifiedValue = computed_value::T;
|
||||
|
||||
pub mod computed_value {
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, ToComputedValue)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
pub enum AutoFlow {
|
||||
Row,
|
||||
Column,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, ToComputedValue)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
pub struct T {
|
||||
pub autoflow: AutoFlow,
|
||||
|
@ -311,8 +310,6 @@ ${helpers.predefined_type("object-position",
|
|||
}
|
||||
}
|
||||
|
||||
impl ComputedValueAsSpecified for SpecifiedValue {}
|
||||
|
||||
impl ToCss for computed_value::T {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
dest.write_str(match self.autoflow {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue