style: Move represents_keyword to the css attributes.

Bug: 1457635
Reviewed-by: xidorn
MozReview-Commit-ID: 21yuU4h34AQ
This commit is contained in:
Emilio Cobos Álvarez 2018-04-29 04:48:47 +02:00
parent a375baf84b
commit c508d8576d
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
8 changed files with 24 additions and 69 deletions

View file

@ -23,12 +23,13 @@ pub enum BorderImageSideWidth<LengthOrPercentage, Number> {
/// A generic value for the `border-image-slice` property.
#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
ToComputedValue)]
ToComputedValue, ToCss)]
pub struct BorderImageSlice<NumberOrPercentage> {
/// The offsets.
#[css(field_bound)]
pub offsets: Rect<NumberOrPercentage>,
/// Whether to fill the middle part.
#[value_info(represents_keyword)]
#[css(represents_keyword)]
pub fill: bool,
}
@ -86,22 +87,6 @@ where
}
}
impl<N> ToCss for BorderImageSlice<N>
where
N: PartialEq + ToCss,
{
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
where
W: Write,
{
self.offsets.to_css(dest)?;
if self.fill {
dest.write_str(" fill")?;
}
Ok(())
}
}
impl<L> BorderRadius<L> {
/// Returns a new `BorderRadius<L>`.
#[inline]