mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Review nits
This commit is contained in:
parent
607df04849
commit
6763e7e4ae
3 changed files with 7 additions and 9 deletions
|
@ -189,14 +189,13 @@ impl BlockContainer {
|
|||
contains_floats: builder.contains_floats,
|
||||
outer_content_sizes_of_children: ContentSizes::zero(),
|
||||
};
|
||||
let request_childrens_outer_content_sizes = request_content_sizes;
|
||||
let iter = builder.block_level_boxes.into_par_iter();
|
||||
let iter = iter.mapfold_reduce_into(
|
||||
&mut target,
|
||||
|target, (intermediate, box_slot): (Intermediate<_>, BoxSlot<'_>)| {
|
||||
let (block_level_box, box_contains_floats) = intermediate.finish(
|
||||
context,
|
||||
if request_childrens_outer_content_sizes {
|
||||
if request_content_sizes {
|
||||
Some(&mut target.outer_content_sizes_of_children)
|
||||
} else {
|
||||
None
|
||||
|
|
|
@ -406,9 +406,10 @@ fn layout_atomic<'box_tree>(
|
|||
.margin()
|
||||
.percentages_relative_to(cbis)
|
||||
.auto_is(Length::zero);
|
||||
ifc.inline_position += padding.inline_start + border.inline_start + margin.inline_start;
|
||||
let pbm = &(&padding + &border) + &margin;
|
||||
ifc.inline_position += pbm.inline_start;
|
||||
let mut start_corner = Vec2 {
|
||||
block: padding.block_start + border.block_start + margin.block_start,
|
||||
block: pbm.block_start,
|
||||
inline: ifc.inline_position - ifc.current_nesting_level.inline_start,
|
||||
};
|
||||
start_corner += &relative_adjustement(
|
||||
|
@ -437,8 +438,7 @@ fn layout_atomic<'box_tree>(
|
|||
Err(non_replaced) => {
|
||||
let box_size = atomic.style.box_size();
|
||||
let inline_size = box_size.inline.percentage_relative_to(cbis).auto_is(|| {
|
||||
let available_size =
|
||||
cbis - padding.inline_sum() - border.inline_sum() - margin.inline_sum();
|
||||
let available_size = cbis - pbm.inline_sum();
|
||||
shrink_to_fit(&atomic.inline_content_sizes, available_size)
|
||||
});
|
||||
let block_size = box_size
|
||||
|
@ -482,8 +482,7 @@ fn layout_atomic<'box_tree>(
|
|||
},
|
||||
};
|
||||
|
||||
ifc.inline_position +=
|
||||
fragment.padding.inline_end + fragment.border.inline_end + fragment.margin.inline_end;
|
||||
ifc.inline_position += pbm.inline_end;
|
||||
ifc.current_nesting_level
|
||||
.fragments_so_far
|
||||
.push(Fragment::Box(fragment));
|
||||
|
|
|
@ -307,7 +307,7 @@ impl<'a> AbsolutelyPositionedFragment<'a> {
|
|||
Ok(replaced) => {
|
||||
// FIXME: implement https://drafts.csswg.org/css2/visudet.html#abs-replaced-width
|
||||
// and https://drafts.csswg.org/css2/visudet.html#abs-replaced-height
|
||||
let block_size = block_size.auto_is(|| Length::zero());
|
||||
let block_size = block_size.auto_is(Length::zero);
|
||||
let fragments = replaced.make_fragments(
|
||||
&self.absolutely_positioned_box.contents.style,
|
||||
Vec2 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue