mirror of
https://github.com/servo/servo.git
synced 2025-09-19 19:30:10 +01:00
add custom debug formatting for display
Signed-off-by: s-maurice <51819025+s-maurice@users.noreply.github.com>
This commit is contained in:
parent
93615e14e5
commit
83daac57fd
1 changed files with 11 additions and 2 deletions
|
@ -18,7 +18,7 @@ use crate::Atom;
|
||||||
use cssparser::Parser;
|
use cssparser::Parser;
|
||||||
use num_traits::FromPrimitive;
|
use num_traits::FromPrimitive;
|
||||||
use selectors::parser::SelectorParseErrorKind;
|
use selectors::parser::SelectorParseErrorKind;
|
||||||
use std::fmt::{self, Write};
|
use std::fmt::{self, Debug, Formatter, Write};
|
||||||
use style_traits::{CssWriter, KeywordsCollectFn, ParseError};
|
use style_traits::{CssWriter, KeywordsCollectFn, ParseError};
|
||||||
use style_traits::{SpecifiedValueInfo, StyleParseErrorKind, ToCss};
|
use style_traits::{SpecifiedValueInfo, StyleParseErrorKind, ToCss};
|
||||||
|
|
||||||
|
@ -121,7 +121,6 @@ pub enum DisplayInside {
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone,
|
Clone,
|
||||||
Copy,
|
Copy,
|
||||||
Debug,
|
|
||||||
Eq,
|
Eq,
|
||||||
FromPrimitive,
|
FromPrimitive,
|
||||||
Hash,
|
Hash,
|
||||||
|
@ -657,6 +656,16 @@ impl SpecifiedValueInfo for Display {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Debug for Display {
|
||||||
|
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||||
|
f.debug_struct("Display")
|
||||||
|
.field("List Item", &self.is_list_item())
|
||||||
|
.field("Inside", &self.inside())
|
||||||
|
.field("Outside", &self.outside())
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// A specified value for the `vertical-align` property.
|
/// A specified value for the `vertical-align` property.
|
||||||
pub type VerticalAlign = GenericVerticalAlign<LengthPercentage>;
|
pub type VerticalAlign = GenericVerticalAlign<LengthPercentage>;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue