mirror of
https://github.com/servo/servo.git
synced 2025-09-27 15:20:09 +01:00
layout: Avoid fixed table layout when inline-size
is max-content
(#39474)
This undoes #35882 according to the last CSSWG resolution, since this is required by web compat. Testing: Modifying the relevant test Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
e4f3705494
commit
454d6052b4
3 changed files with 9 additions and 6 deletions
|
@ -245,11 +245,14 @@ impl Zero for CellOrTrackMeasure {
|
|||
|
||||
impl<'a> TableLayout<'a> {
|
||||
fn new(table: &'a Table) -> TableLayout<'a> {
|
||||
// The CSSWG resolved that only `inline-size: auto` can prevent fixed table mode.
|
||||
// <https://github.com/w3c/csswg-drafts/issues/10937#issuecomment-2669150397>
|
||||
// The CSSWG resolved that `auto` and `max-content` inline sizes prevent fixed table mode.
|
||||
// <https://github.com/w3c/csswg-drafts/issues/10937>
|
||||
let style = &table.style;
|
||||
let is_in_fixed_mode = style.get_table().table_layout == TableLayoutMode::Fixed &&
|
||||
!style.box_size(style.writing_mode).inline.is_initial();
|
||||
!matches!(
|
||||
style.box_size(style.writing_mode).inline,
|
||||
Size::Initial | Size::MaxContent
|
||||
);
|
||||
Self {
|
||||
table,
|
||||
pbm: PaddingBorderMargin::zero(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue