mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
impl From<&'_ DefiniteContainingBlock> for ContainingBlock
This commit is contained in:
parent
14ddf39215
commit
f09c14aa6b
2 changed files with 19 additions and 15 deletions
|
@ -44,6 +44,16 @@ struct DefiniteContainingBlock<'a> {
|
|||
style: &'a ComputedValues,
|
||||
}
|
||||
|
||||
impl<'a> From<&'_ DefiniteContainingBlock<'a>> for ContainingBlock<'a> {
|
||||
fn from(definite: &DefiniteContainingBlock<'a>) -> Self {
|
||||
ContainingBlock {
|
||||
inline_size: definite.size.inline,
|
||||
block_size: LengthOrAuto::LengthPercentage(definite.size.block),
|
||||
style: definite.style,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// https://drafts.csswg.org/css2/visuren.html#relative-positioning
|
||||
fn relative_adjustement(
|
||||
style: &ComputedValues,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue