layout: Use BoxFragment border widths for display list generation (#31292)

Instead of using the border widths from the style, use the ones recorded
by the `BoxFragment`. This is necessary because inline layout can
override these border widths during fragmentation. For instance, when a
box is split across two lines only one fragment should have an inline
start border.
This commit is contained in:
Martin Robinson 2024-02-09 00:21:24 +01:00 committed by GitHub
parent eb6c22fff1
commit f6b81a97f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
75 changed files with 8 additions and 155 deletions

View file

@ -302,11 +302,6 @@ impl InlineBoxLineItem {
border.inline_start = Length::zero();
margin.inline_start = Length::zero();
}
if !self.is_last_fragment_of_ib_split {
padding.inline_end = Length::zero();
border.inline_end = Length::zero();
margin.inline_end = Length::zero();
}
let pbm_sums = &(&padding + &border) + &margin;
state.inline_position += pbm_sums.inline_start;