mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add box construction for 'inline-block'…
… and other atomic inline-level boxes.
This commit is contained in:
parent
303b36f17b
commit
da36fcddb0
2 changed files with 38 additions and 29 deletions
|
@ -188,6 +188,17 @@ fn traverse_pseudo_element_contents<'dom, Node>(
|
|||
}
|
||||
}
|
||||
|
||||
impl<Node> Contents<Node> {
|
||||
/// Returns true iff the `try_from` impl below would return `Err(_)`
|
||||
pub fn is_replaced(&self) -> bool {
|
||||
match self {
|
||||
Contents::OfElement(_) |
|
||||
Contents::OfPseudoElement(_) => false,
|
||||
Contents::Replaced(_) => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<Node> std::convert::TryFrom<Contents<Node>> for NonReplacedContents<Node> {
|
||||
type Error = ReplacedContent;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue