mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
make size of DefiniteContainingBlock use app units (#31369)
This commit is contained in:
parent
7f00661d1c
commit
d5c9e569bf
4 changed files with 27 additions and 18 deletions
|
@ -25,6 +25,7 @@ mod style_ext;
|
|||
pub mod table;
|
||||
pub mod traversal;
|
||||
|
||||
use app_units::Au;
|
||||
pub use flow::BoxTree;
|
||||
pub use fragment_tree::FragmentTree;
|
||||
use style::properties::ComputedValues;
|
||||
|
@ -39,15 +40,15 @@ pub struct ContainingBlock<'a> {
|
|||
}
|
||||
|
||||
struct DefiniteContainingBlock<'a> {
|
||||
size: LogicalVec2<Length>,
|
||||
size: LogicalVec2<Au>,
|
||||
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),
|
||||
inline_size: definite.size.inline.into(),
|
||||
block_size: LengthOrAuto::LengthPercentage(definite.size.block.into()),
|
||||
style: definite.style,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue