mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
layout: Use Au
in ResolvedMargins
and CollapsedMargin
(#31848)
* change ResolvedMargins to use Au instead of length * made suggested changes removed whitespace changes made suggested changes * Update components/layout_2020/flexbox/layout.rs Co-authored-by: Oriol Brufau <obrufau@igalia.com> * Update components/layout_2020/flow/mod.rs Co-authored-by: Oriol Brufau <obrufau@igalia.com> * fixed errors fixed errors fixed formatting fixed errors * modified changes made suggested changes * Update components/layout_2020/fragment_tree/fragment.rs Co-authored-by: Oriol Brufau <obrufau@igalia.com> updated components/layout_2020/fragment_tree/fragment.rs * Update components/layout_2020/flow/mod.rs Co-authored-by: Oriol Brufau <obrufau@igalia.com> * Update components/layout_2020/flow/mod.rs Co-authored-by: Oriol Brufau <obrufau@igalia.com> * updated changes updated changes * unified all the suggested changes here * fixed formatting * reverted unnecessary changes * fixed unnecessary warnings --------- Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
66ad795014
commit
5d518ca8dc
4 changed files with 62 additions and 70 deletions
|
@ -847,7 +847,7 @@ impl FlexLine<'_> {
|
|||
.zip(&item_margins)
|
||||
.map(|(((item, item_result), content_rect), margin)| {
|
||||
let content_rect = flex_context.rect_to_flow_relative(line_size, content_rect);
|
||||
let margin = flex_context.sides_to_flow_relative(*margin);
|
||||
let margin = flex_context.sides_to_flow_relative(*margin).into();
|
||||
let collapsed_margin = CollapsedBlockMargins::from_margin(&margin);
|
||||
(
|
||||
// TODO: We should likely propagate baselines from `display: flex`.
|
||||
|
@ -858,7 +858,7 @@ impl FlexLine<'_> {
|
|||
content_rect,
|
||||
flex_context.sides_to_flow_relative(item.padding),
|
||||
flex_context.sides_to_flow_relative(item.border),
|
||||
margin.into(),
|
||||
margin,
|
||||
None, /* clearance */
|
||||
collapsed_margin,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue