mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Move represents_keyword to the css attributes.
Bug: 1457635 Reviewed-by: xidorn MozReview-Commit-ID: 21yuU4h34AQ
This commit is contained in:
parent
a375baf84b
commit
c508d8576d
8 changed files with 24 additions and 69 deletions
|
@ -1947,11 +1947,11 @@ pub struct FontSynthesis {
|
|||
/// If a `font-weight` is requested that the font family does not contain,
|
||||
/// the user agent may synthesize the requested weight from the weights
|
||||
/// that do exist in the font family.
|
||||
#[value_info(represents_keyword)]
|
||||
#[css(represents_keyword)]
|
||||
pub weight: bool,
|
||||
/// If a font-style is requested that the font family does not contain,
|
||||
/// the user agent may synthesize the requested style from the normal face in the font family.
|
||||
#[value_info(represents_keyword)]
|
||||
#[css(represents_keyword)]
|
||||
pub style: bool,
|
||||
}
|
||||
|
||||
|
|
|
@ -424,14 +424,14 @@ pub enum AutoFlow {
|
|||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
|
||||
ToComputedValue)]
|
||||
ToComputedValue, ToCss)]
|
||||
/// Controls how the auto-placement algorithm works
|
||||
/// specifying exactly how auto-placed items get flowed into the grid
|
||||
pub struct GridAutoFlow {
|
||||
/// Specifiy how auto-placement algorithm fills each `row` or `column` in turn
|
||||
pub autoflow: AutoFlow,
|
||||
/// Specify use `dense` packing algorithm or not
|
||||
#[value_info(represents_keyword)]
|
||||
#[css(represents_keyword)]
|
||||
pub dense: bool,
|
||||
}
|
||||
|
||||
|
@ -446,20 +446,6 @@ impl GridAutoFlow {
|
|||
}
|
||||
}
|
||||
|
||||
impl ToCss for GridAutoFlow {
|
||||
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
|
||||
where
|
||||
W: Write,
|
||||
{
|
||||
self.autoflow.to_css(dest)?;
|
||||
|
||||
if self.dense {
|
||||
dest.write_str(" dense")?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl Parse for GridAutoFlow {
|
||||
/// [ row | column ] || dense
|
||||
fn parse<'i, 't>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue