Skip to content

Commit

Permalink
Make LineItems a token stream on the root
Browse files Browse the repository at this point in the history
  • Loading branch information
mrobinson committed Oct 19, 2023
1 parent 634a5d9 commit 184bdb0
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 139 deletions.
12 changes: 6 additions & 6 deletions components/layout_2020/flow/construct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,8 @@ where
self.ongoing_inline_boxes_stack.push(InlineBox {
base_fragment_info: info.into(),
style: info.style.clone(),
first_fragment: true,
last_fragment: false,
is_first_fragment: true,
is_last_fragment: false,
children: vec![],
});

Expand All @@ -498,7 +498,7 @@ where
.ongoing_inline_boxes_stack
.pop()
.expect("no ongoing inline level box found");
inline_box.last_fragment = true;
inline_box.is_last_fragment = true;
ArcRefCell::new(InlineLevelBox::InlineBox(inline_box))
} else {
self.ongoing_inline_formatting_context.ends_with_whitespace = false;
Expand Down Expand Up @@ -537,13 +537,13 @@ where
let fragmented = InlineBox {
base_fragment_info: ongoing.base_fragment_info,
style: ongoing.style.clone(),
first_fragment: ongoing.first_fragment,
is_first_fragment: ongoing.is_first_fragment,
// The fragmented boxes before the block level element
// are obviously not the last fragment.
last_fragment: false,
is_last_fragment: false,
children: std::mem::take(&mut ongoing.children),
};
ongoing.first_fragment = false;
ongoing.is_first_fragment = false;
fragmented
});

Expand Down

0 comments on commit 184bdb0

Please sign in to comment.