mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Split FlowChildren in IndependentLayout and FlowLayout
The result of doing the layout of an independent formatting context should be unconcerned with margin collapsing.
This commit is contained in:
parent
24b7eadfff
commit
858bc5aca6
6 changed files with 61 additions and 48 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
use crate::context::LayoutContext;
|
||||
use crate::flow::float::FloatBox;
|
||||
use crate::flow::FlowChildren;
|
||||
use crate::flow::FlowLayout;
|
||||
use crate::fragments::{
|
||||
AnonymousFragment, BoxFragment, CollapsedBlockMargins, Fragment, TextFragment,
|
||||
};
|
||||
|
@ -88,7 +88,7 @@ impl InlineFormattingContext {
|
|||
containing_block: &ContainingBlock,
|
||||
tree_rank: usize,
|
||||
absolutely_positioned_fragments: &mut Vec<AbsolutelyPositionedFragment<'a>>,
|
||||
) -> FlowChildren {
|
||||
) -> FlowLayout {
|
||||
let mut ifc = InlineFormattingContextState {
|
||||
containing_block,
|
||||
partial_inline_boxes_stack: Vec::new(),
|
||||
|
@ -156,9 +156,9 @@ impl InlineFormattingContext {
|
|||
} else {
|
||||
ifc.line_boxes
|
||||
.finish_line(&mut ifc.current_nesting_level, containing_block);
|
||||
return FlowChildren {
|
||||
return FlowLayout {
|
||||
fragments: ifc.line_boxes.boxes,
|
||||
block_size: ifc.line_boxes.next_line_block_position,
|
||||
content_block_size: ifc.line_boxes.next_line_block_position,
|
||||
collapsible_margins_in_children: CollapsedBlockMargins::zero(),
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue