mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: use Au
in BoxFragment
(#31794)
* use au in BoxFragement * review fix
This commit is contained in:
parent
0b863de846
commit
95e69fe4ff
13 changed files with 98 additions and 100 deletions
|
@ -63,16 +63,6 @@ impl<T> FlexRelativeSides<T> {
|
|||
cross: self.cross_start + self.cross_end,
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(#29819): Check if this function can be removed after we convert everything to Au.
|
||||
pub fn map<U>(&self, f: impl Fn(&T) -> U) -> FlexRelativeSides<U> {
|
||||
FlexRelativeSides {
|
||||
main_start: f(&self.main_start),
|
||||
main_end: f(&self.main_end),
|
||||
cross_start: f(&self.cross_start),
|
||||
cross_end: f(&self.cross_end),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// One of the two bits set by the `flex-direction` property
|
||||
|
|
|
@ -856,9 +856,9 @@ impl FlexLine<'_> {
|
|||
item.box_.style().clone(),
|
||||
item_result.fragments,
|
||||
content_rect,
|
||||
flex_context.sides_to_flow_relative(item.padding.map(|t| (*t).into())),
|
||||
flex_context.sides_to_flow_relative(item.border.map(|t| (*t).into())),
|
||||
margin,
|
||||
flex_context.sides_to_flow_relative(item.padding),
|
||||
flex_context.sides_to_flow_relative(item.border),
|
||||
margin.into(),
|
||||
None, /* clearance */
|
||||
collapsed_margin,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue