mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Rename SpecifiedExplicitSize to ExplicitSize
This commit is contained in:
parent
2f69e7ff8c
commit
153ec64c15
2 changed files with 8 additions and 8 deletions
|
@ -191,7 +191,7 @@ ${helpers.single_keyword("background-origin",
|
|||
}
|
||||
}
|
||||
|
||||
impl HasViewportPercentage for SpecifiedExplicitSize {
|
||||
impl HasViewportPercentage for ExplicitSize {
|
||||
fn has_viewport_percentage(&self) -> bool {
|
||||
return self.width.has_viewport_percentage() || self.height.has_viewport_percentage();
|
||||
}
|
||||
|
@ -199,12 +199,12 @@ ${helpers.single_keyword("background-origin",
|
|||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
pub struct SpecifiedExplicitSize {
|
||||
pub struct ExplicitSize {
|
||||
pub width: specified::LengthOrPercentageOrAuto,
|
||||
pub height: specified::LengthOrPercentageOrAuto,
|
||||
}
|
||||
|
||||
impl ToCss for SpecifiedExplicitSize {
|
||||
impl ToCss for ExplicitSize {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
try!(self.width.to_css(dest));
|
||||
try!(dest.write_str(" "));
|
||||
|
@ -232,7 +232,7 @@ ${helpers.single_keyword("background-origin",
|
|||
#[derive(Clone, PartialEq, Debug)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
pub enum SpecifiedValue {
|
||||
Explicit(SpecifiedExplicitSize),
|
||||
Explicit(ExplicitSize),
|
||||
Cover,
|
||||
Contain,
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ ${helpers.single_keyword("background-origin",
|
|||
}
|
||||
#[inline]
|
||||
pub fn get_initial_specified_value() -> SpecifiedValue {
|
||||
SpecifiedValue::Explicit(SpecifiedExplicitSize {
|
||||
SpecifiedValue::Explicit(ExplicitSize {
|
||||
width: specified::LengthOrPercentageOrAuto::Auto,
|
||||
height: specified::LengthOrPercentageOrAuto::Auto,
|
||||
})
|
||||
|
@ -311,7 +311,7 @@ ${helpers.single_keyword("background-origin",
|
|||
height = try!(specified::LengthOrPercentageOrAuto::parse(input));
|
||||
}
|
||||
|
||||
Ok(SpecifiedValue::Explicit(SpecifiedExplicitSize {
|
||||
Ok(SpecifiedValue::Explicit(ExplicitSize {
|
||||
width: width,
|
||||
height: height,
|
||||
}))
|
||||
|
|
|
@ -742,7 +742,7 @@ mod shorthand_serialization {
|
|||
|
||||
let size = single_vec_variant_value!(size,
|
||||
size::single_value::SpecifiedValue::Explicit(
|
||||
size::single_value::SpecifiedExplicitSize {
|
||||
size::single_value::ExplicitSize {
|
||||
width: LengthOrPercentageOrAuto::Length(Length::from_px(70f32)),
|
||||
height: LengthOrPercentageOrAuto::Length(Length::from_px(50f32))
|
||||
}
|
||||
|
@ -797,7 +797,7 @@ mod shorthand_serialization {
|
|||
|
||||
let size = single_vec_variant_value!(size,
|
||||
size::single_value::SpecifiedValue::Explicit(
|
||||
size::single_value::SpecifiedExplicitSize {
|
||||
size::single_value::ExplicitSize {
|
||||
width: LengthOrPercentageOrAuto::Length(Length::from_px(70f32)),
|
||||
height: LengthOrPercentageOrAuto::Length(Length::from_px(50f32))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue