layout: Fix border widths of table wrapper with collapsed borders (#35097)

For a table wrapper in collapsed-borders mode we were just halving the
border widths from the computed style. However, it needs to actually
receive half of the resulting collapsed border, which can be bigger.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-01-21 07:14:17 -08:00 committed by GitHub
parent acfd2e6de4
commit a54add0159
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 146 additions and 165 deletions

View file

@ -84,9 +84,10 @@ use crate::cell::ArcRefCell;
use crate::flow::BlockContainer;
use crate::formatting_contexts::IndependentFormattingContext;
use crate::fragment_tree::BaseFragmentInfo;
use crate::geom::{PhysicalSides, PhysicalVec};
use crate::geom::PhysicalVec;
use crate::layout_box_base::LayoutBoxBase;
use crate::style_ext::BorderStyleColor;
use crate::table::layout::TableLayout;
pub type TableSize = Size2D<usize, UnknownUnit>;
@ -336,5 +337,9 @@ pub(crate) struct CollapsedBorderLine {
pub(crate) struct SpecificTableGridInfo {
pub collapsed_borders: PhysicalVec<Vec<CollapsedBorderLine>>,
pub track_sizes: PhysicalVec<Vec<Au>>,
pub wrapper_border: PhysicalSides<Au>,
}
pub(crate) struct TableLayoutStyle<'a> {
table: &'a Table,
layout: Option<&'a TableLayout<'a>>,
}