From fe9d49fccc077bf9fa12d9623b3ebf592a41d6d4 Mon Sep 17 00:00:00 2001 From: Oriol Brufau Date: Mon, 7 Jul 2025 17:25:15 +0200 Subject: [PATCH] layout: Require specific layout info in `BoxFragment::new()` (#37917) It was very easy to forget about using `.with_specific_layout_info()` to set the specific layout info, so it's better to make it a parameter. In fact this already happened in the past: #36993 fixed the missing specific layout info for flex items. This patch fixes it for floats and atomic inlines. It also propagates it in other cases where not doing so was not a big deal because the specific layout info was None, but that was a fragile assumption. Testing: Various WPT improvements Fixes: #37898 Signed-off-by: Oriol Brufau --- components/layout/flexbox/layout.rs | 4 +- components/layout/flow/inline/line.rs | 1 + components/layout/flow/mod.rs | 12 +- .../layout/fragment_tree/box_fragment.rs | 8 +- components/layout/positioned.rs | 2 +- components/layout/table/layout.rs | 10 +- components/layout/taffy/layout.rs | 4 +- .../grid-inline-auto-repeat-001.html.ini | 33 ---- ...line-support-flexible-lengths-001.html.ini | 150 ------------------ ...rt-grid-template-columns-rows-001.html.ini | 81 ---------- ...line-support-named-grid-lines-001.html.ini | 69 -------- .../grid-inline-support-repeat-001.html.ini | 49 +----- ...-columns-rows-resolved-values-001.html.ini | 108 ------------- ...ows-resolved-values-001.tentative.html.ini | 102 ++++++++++++ .../grid-minimum-size-grid-items-021.html.ini | 120 -------------- .../grid-fit-content-percentage.html.ini | 60 ------- 16 files changed, 126 insertions(+), 687 deletions(-) delete mode 100644 tests/wpt/meta/css/css-grid/grid-definition/grid-inline-template-columns-rows-resolved-values-001.html.ini diff --git a/components/layout/flexbox/layout.rs b/components/layout/flexbox/layout.rs index 24fba75d5b7..d31aa8165cf 100644 --- a/components/layout/flexbox/layout.rs +++ b/components/layout/flexbox/layout.rs @@ -299,8 +299,8 @@ impl FlexLineItem<'_> { .sides_to_flow_relative(item_margin) .to_physical(container_writing_mode), None, /* clearance */ - ) - .with_specific_layout_info(self.layout_result.specific_layout_info); + self.layout_result.specific_layout_info, + ); // If this flex item establishes a containing block for absolutely-positioned // descendants, then lay out any relevant absolutely-positioned children. This diff --git a/components/layout/flow/inline/line.rs b/components/layout/flow/inline/line.rs index 14a1531883f..06f8dab2bb7 100644 --- a/components/layout/flow/inline/line.rs +++ b/components/layout/flow/inline/line.rs @@ -460,6 +460,7 @@ impl LineItemLayout<'_, '_> { border.to_physical(ifc_writing_mode), margin.to_physical(ifc_writing_mode), None, /* clearance */ + None, /* specific_layout_info */ ); let offset_from_parent_ifc = LogicalVec2 { diff --git a/components/layout/flow/mod.rs b/components/layout/flow/mod.rs index 66e9c29218a..ef738147e7d 100644 --- a/components/layout/flow/mod.rs +++ b/components/layout/flow/mod.rs @@ -408,6 +408,7 @@ impl OutsideMarker { PhysicalSides::zero(), PhysicalSides::zero(), None, + flow_layout.specific_layout_info, ))) } @@ -1173,6 +1174,7 @@ fn layout_in_flow_non_replaced_block_level_same_formatting_context( pbm.border.to_physical(containing_block_writing_mode), margin.to_physical(containing_block_writing_mode), clearance, + flow_layout.specific_layout_info, ) .with_baselines(flow_layout.baselines) .with_block_margins_collapsed_with_children(block_margins_collapsed_with_children) @@ -1285,9 +1287,9 @@ impl IndependentFormattingContext { pbm.border.to_physical(containing_block_writing_mode), margin.to_physical(containing_block_writing_mode), None, /* clearance */ + layout.specific_layout_info, ) .with_baselines(layout.baselines) - .with_specific_layout_info(layout.specific_layout_info) .with_block_margins_collapsed_with_children(block_margins_collapsed_with_children) } @@ -1603,9 +1605,9 @@ impl IndependentFormattingContext { pbm.border.to_physical(containing_block_writing_mode), margin.to_physical(containing_block_writing_mode), clearance, + layout.specific_layout_info, ) .with_baselines(layout.baselines) - .with_specific_layout_info(layout.specific_layout_info) .with_block_margins_collapsed_with_children(CollapsedBlockMargins::from_margin(&margin)) } } @@ -2241,7 +2243,7 @@ impl IndependentFormattingContext { let margin = pbm.margin.auto_is(Au::zero); let pbm_sums = pbm.padding + pbm.border + margin; - let (fragments, content_rect, baselines) = match &self.contents { + let (fragments, content_rect, baselines, specific_layout_info) = match &self.contents { IndependentFormattingContextContents::Replaced(replaced) => { // Floats and atomic inlines can't collapse margins with their parent, // so don't ignore block margins when resolving a stretch block size. @@ -2261,7 +2263,7 @@ impl IndependentFormattingContext { let fragments = replaced.make_fragments(layout_context, style, content_size); let content_rect = PhysicalRect::new(PhysicalPoint::zero(), content_size); - (fragments, content_rect, None) + (fragments, content_rect, None, None) }, IndependentFormattingContextContents::NonReplaced(non_replaced) => { let writing_mode = self.style().writing_mode; @@ -2344,6 +2346,7 @@ impl IndependentFormattingContext { independent_layout.fragments, content_rect, Some(independent_layout.baselines), + independent_layout.specific_layout_info, ) }, }; @@ -2367,6 +2370,7 @@ impl IndependentFormattingContext { // so there's no need to store it explicitly in the fragment. // And atomic inlines don't have clearance. None, /* clearance */ + specific_layout_info, ); IndependentFloatOrAtomicLayoutResult { diff --git a/components/layout/fragment_tree/box_fragment.rs b/components/layout/fragment_tree/box_fragment.rs index 2bddc99fca9..3a3d9b92732 100644 --- a/components/layout/fragment_tree/box_fragment.rs +++ b/components/layout/fragment_tree/box_fragment.rs @@ -116,6 +116,7 @@ impl BoxFragment { border: PhysicalSides, margin: PhysicalSides, clearance: Option, + specific_layout_info: Option, ) -> BoxFragment { BoxFragment { base: base_fragment_info.into(), @@ -132,7 +133,7 @@ impl BoxFragment { scrollable_overflow: None, resolved_sticky_insets: AtomicRefCell::default(), background_mode: BackgroundMode::Normal, - specific_layout_info: None, + specific_layout_info, } } @@ -185,11 +186,6 @@ impl BoxFragment { self.background_mode = BackgroundMode::None; } - pub fn with_specific_layout_info(mut self, info: Option) -> Self { - self.specific_layout_info = info; - self - } - pub fn with_block_margins_collapsed_with_children( mut self, collapsed_margins: CollapsedBlockMargins, diff --git a/components/layout/positioned.rs b/components/layout/positioned.rs index 186fc78e3bf..91ac3382915 100644 --- a/components/layout/positioned.rs +++ b/components/layout/positioned.rs @@ -673,8 +673,8 @@ impl HoistedAbsolutelyPositionedBox { pbm.border.to_physical(containing_block_writing_mode), margin.to_physical(containing_block_writing_mode), None, /* clearance */ + specific_layout_info, ) - .with_specific_layout_info(specific_layout_info) }; // This is an absolutely positioned element, which means it also establishes a diff --git a/components/layout/table/layout.rs b/components/layout/table/layout.rs index 5748dccee81..2cf8d3a0eaa 100644 --- a/components/layout/table/layout.rs +++ b/components/layout/table/layout.rs @@ -1788,8 +1788,8 @@ impl<'a> TableLayout<'a> { self.pbm.border.to_physical(table_writing_mode), PhysicalSides::zero(), None, /* clearance */ - ) - .with_specific_layout_info(self.specific_layout_info_for_grid()); + self.specific_layout_info_for_grid(), + ); } let mut table_fragments = Vec::new(); @@ -1913,9 +1913,9 @@ impl<'a> TableLayout<'a> { self.pbm.border.to_physical(table_writing_mode), PhysicalSides::zero(), None, /* clearance */ + self.specific_layout_info_for_grid(), ) .with_baselines(baselines) - .with_specific_layout_info(self.specific_layout_info_for_grid()) } fn specific_layout_info_for_grid(&mut self) -> Option { @@ -2359,6 +2359,7 @@ impl<'a> RowFragmentLayout<'a> { PhysicalSides::zero(), /* border */ PhysicalSides::zero(), /* margin */ None, /* clearance */ + None, /* specific_layout_info */ ); row_fragment.set_does_not_paint_background(); @@ -2431,6 +2432,7 @@ impl RowGroupFragmentLayout { PhysicalSides::zero(), /* border */ PhysicalSides::zero(), /* margin */ None, /* clearance */ + None, /* specific_layout_info */ ); row_group_fragment.set_does_not_paint_background(); @@ -2910,9 +2912,9 @@ impl TableSlotCell { layout.border.to_physical(table_style.writing_mode), PhysicalSides::zero(), /* margin */ None, /* clearance */ + specific_layout_info, ) .with_baselines(layout.layout.baselines) - .with_specific_layout_info(specific_layout_info) } } diff --git a/components/layout/taffy/layout.rs b/components/layout/taffy/layout.rs index c5f66eee6d2..45e14a4781d 100644 --- a/components/layout/taffy/layout.rs +++ b/components/layout/taffy/layout.rs @@ -552,12 +552,12 @@ impl TaffyContainer { border, margin, None, /* clearance */ + child_specific_layout_info, ) .with_baselines(Baselines { first: output.first_baselines.y.map(Au::from_f32_px), last: None, - }) - .with_specific_layout_info(child_specific_layout_info); + }); child.positioning_context.layout_collected_children( container_ctx.layout_context, diff --git a/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-auto-repeat-001.html.ini b/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-auto-repeat-001.html.ini index 2167323ce08..79630976da3 100644 --- a/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-auto-repeat-001.html.ini +++ b/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-auto-repeat-001.html.ini @@ -1,36 +1,3 @@ [grid-inline-auto-repeat-001.html] - ['autoFillColumns' with: grid-template-columns: repeat(auto-fill, 10px); and grid-template-rows: 20px;] - expected: FAIL - - ['autoFitColumns' with: grid-template-columns: repeat(auto-fit, 10px); and grid-template-rows: 20px;] - expected: FAIL - - ['autoFillRows' with: grid-template-columns: 20px; and grid-template-rows: repeat(auto-fill, 10px);] - expected: FAIL - - ['autoFitRows' with: grid-template-columns: 20px; and grid-template-rows: repeat(auto-fit, 10px);] - expected: FAIL - - ['autoFillColumns' with: grid-template-columns: repeat(auto-fill, 9px); and grid-template-rows: 20px;] - expected: FAIL - ['autoFitColumns' with: grid-template-columns: repeat(auto-fit, 9px); and grid-template-rows: 20px;] expected: FAIL - - ['autoFillRows' with: grid-template-columns: 20px; and grid-template-rows: repeat(auto-fill, 9px);] - expected: FAIL - - ['autoFitRows' with: grid-template-columns: 20px; and grid-template-rows: repeat(auto-fit, 9px);] - expected: FAIL - - ['autoFillColumns' with: grid-template-columns: repeat(auto-fill, 30px); and grid-template-rows: 20px;] - expected: FAIL - - ['autoFitColumns' with: grid-template-columns: repeat(auto-fit, 30px); and grid-template-rows: 20px;] - expected: FAIL - - ['autoFillRows' with: grid-template-columns: 20px; and grid-template-rows: repeat(auto-fill, 30px);] - expected: FAIL - - ['autoFitRows' with: grid-template-columns: 20px; and grid-template-rows: repeat(auto-fit, 30px);] - expected: FAIL diff --git a/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-flexible-lengths-001.html.ini b/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-flexible-lengths-001.html.ini index df2efebb0bd..9ad09d51226 100644 --- a/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-flexible-lengths-001.html.ini +++ b/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-flexible-lengths-001.html.ini @@ -1,162 +1,12 @@ [grid-inline-support-flexible-lengths-001.html] - ['emptyGrid' with: grid-template-columns: 1fr; and grid-template-rows: 1fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 1fr; and grid-template-rows: 1fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: 2fr; and grid-template-rows: 2fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 2fr; and grid-template-rows: 2fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: 10fr; and grid-template-rows: 10fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 10fr; and grid-template-rows: 10fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: 0.5fr; and grid-template-rows: 0.5fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 0.5fr; and grid-template-rows: 0.5fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: .5fr; and grid-template-rows: .5fr;] - expected: FAIL - - ['grid' with: grid-template-columns: .5fr; and grid-template-rows: .5fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: minmax(100px, 1fr); and grid-template-rows: minmax(100px, 1fr);] - expected: FAIL - - ['grid' with: grid-template-columns: minmax(100px, 1fr); and grid-template-rows: minmax(100px, 1fr);] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: minmax(1fr, 1fr); and grid-template-rows: minmax(1fr, 1fr);] - expected: FAIL - - ['grid' with: grid-template-columns: minmax(1fr, 1fr); and grid-template-rows: minmax(1fr, 1fr);] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: 1fr 1fr; and grid-template-rows: 1fr 1fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 1fr 1fr; and grid-template-rows: 1fr 1fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: 0.25fr 0.75fr; and grid-template-rows: 0.25fr 0.75fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 0.25fr 0.75fr; and grid-template-rows: 0.25fr 0.75fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: 1fr 2fr 1fr; and grid-template-rows: 1fr 2fr 1fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 1fr 2fr 1fr; and grid-template-rows: 1fr 2fr 1fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: auto 1fr 4fr 3fr 2fr; and grid-template-rows: auto 1fr 4fr 3fr 2fr;] - expected: FAIL - - ['grid' with: grid-template-columns: auto 1fr 4fr 3fr 2fr; and grid-template-rows: auto 1fr 4fr 3fr 2fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: 1fr 4fr 100px 3fr 2fr; and grid-template-rows: 1fr 4fr 100px 3fr 2fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 1fr 4fr 100px 3fr 2fr; and grid-template-rows: 1fr 4fr 100px 3fr 2fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: auto 1fr; and grid-template-rows: auto 1fr;] - expected: FAIL - - ['grid' with: grid-template-columns: auto 1fr; and grid-template-rows: auto 1fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: max-content 1fr; and grid-template-rows: max-content 1fr;] - expected: FAIL - - ['grid' with: grid-template-columns: max-content 1fr; and grid-template-rows: max-content 1fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: min-content 1fr; and grid-template-rows: min-content 1fr;] - expected: FAIL - - ['grid' with: grid-template-columns: min-content 1fr; and grid-template-rows: min-content 1fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: 1fr auto; and grid-template-rows: 1fr auto;] - expected: FAIL - - ['grid' with: grid-template-columns: 1fr auto; and grid-template-rows: 1fr auto;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: 300px 1fr; and grid-template-rows: 200px 1fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 300px 1fr; and grid-template-rows: 200px 1fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: 800px 1fr; and grid-template-rows: 600px 1fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 800px 1fr; and grid-template-rows: 600px 1fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: 1000px 1fr; and grid-template-rows: 700px 1fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 1000px 1fr; and grid-template-rows: 700px 1fr;] - expected: FAIL - ['emptyGrid' with: grid-template-columns: calc(50px + 50%) 1fr; and grid-template-rows: calc(50px + 50%) 1fr;] expected: FAIL ['grid' with: grid-template-columns: calc(50px + 50%) 1fr; and grid-template-rows: calc(50px + 50%) 1fr;] expected: FAIL - ['emptyGrid' with: grid-template-columns: minmax(100px, 300px) 1fr; and grid-template-rows: minmax(100px, 200px) 1fr;] - expected: FAIL - - ['grid' with: grid-template-columns: minmax(100px, 300px) 1fr; and grid-template-rows: minmax(100px, 200px) 1fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: repeat(4, 1fr); and grid-template-rows: repeat(4, 1fr);] - expected: FAIL - - ['grid' with: grid-template-columns: repeat(4, 1fr); and grid-template-rows: repeat(4, 1fr);] - expected: FAIL - ['emptyGrid' with: grid-template-columns: [a\] repeat(4, [b\] 1fr [c\]) [d\]; and grid-template-rows: [z\] repeat(4, [y\] 1fr) [x\];] expected: FAIL ['grid' with: grid-template-columns: [a\] repeat(4, [b\] 1fr [c\]) [d\]; and grid-template-rows: [z\] repeat(4, [y\] 1fr) [x\];] expected: FAIL - - ['grid' with: grid-template-columns: fr; and grid-template-rows: fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 1 fr; and grid-template-rows: 1 fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 1free-space; and grid-template-rows: 1free-space;] - expected: FAIL - - ['grid' with: grid-template-columns: -2fr; and grid-template-rows: -2fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 0,5fr; and grid-template-rows: 0,5fr;] - expected: FAIL - - ['grid' with: grid-template-columns: calc(1fr + 100px); and grid-template-rows: calc(1fr + 100px);] - expected: FAIL - - ['grid' with: grid-template-columns: (1fr) auto; and grid-template-rows: (1fr) auto;] - expected: FAIL - - ['grid' with: grid-template-columns: minmax(1fr, 1000px); and grid-template-rows: minmax(1fr, 700px);] - expected: FAIL diff --git a/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-grid-template-columns-rows-001.html.ini b/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-grid-template-columns-rows-001.html.ini index 49e4695054c..0c4517e10ee 100644 --- a/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-grid-template-columns-rows-001.html.ini +++ b/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-grid-template-columns-rows-001.html.ini @@ -1,99 +1,18 @@ [grid-inline-support-grid-template-columns-rows-001.html] - ['grid' with: grid-template-columns: none; and grid-template-rows: none;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: auto; and grid-template-rows: auto;] - expected: FAIL - - ['grid' with: grid-template-columns: auto; and grid-template-rows: auto;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: 25%; and grid-template-rows: 50%;] - expected: FAIL - - ['grid' with: grid-template-columns: 25%; and grid-template-rows: 50%;] - expected: FAIL - ['emptyGrid' with: grid-template-columns: calc(200px + 10%); and grid-template-rows: calc(25% + 50px);] expected: FAIL ['grid' with: grid-template-columns: calc(200px + 10%); and grid-template-rows: calc(25% + 50px);] expected: FAIL - ['emptyGrid' with: grid-template-columns: 1fr; and grid-template-rows: 1fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 1fr; and grid-template-rows: 1fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: max-content; and grid-template-rows: max-content;] - expected: FAIL - - ['grid' with: grid-template-columns: max-content; and grid-template-rows: max-content;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: min-content; and grid-template-rows: min-content;] - expected: FAIL - - ['grid' with: grid-template-columns: min-content; and grid-template-rows: min-content;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: minmax(200px, 400px); and grid-template-rows: minmax(50px, 100px);] - expected: FAIL - - ['grid' with: grid-template-columns: minmax(200px, 400px); and grid-template-rows: minmax(50px, 100px);] - expected: FAIL - ['emptyGrid' with: grid-template-columns: minmax(calc(10% + 200px), calc(800px - 20%)); and grid-template-rows: minmax(calc(20% + 50px), calc(600px - 10%));] expected: FAIL ['grid' with: grid-template-columns: minmax(calc(10% + 200px), calc(800px - 20%)); and grid-template-rows: minmax(calc(20% + 50px), calc(600px - 10%));] expected: FAIL - ['emptyGrid' with: grid-template-columns: 40em 100px 15%; and grid-template-rows: 50px 20em 10%;] - expected: FAIL - - ['grid' with: grid-template-columns: 40em 100px 15%; and grid-template-rows: 50px 20em 10%;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: 200px 1fr; and grid-template-rows: 1fr 100px;] - expected: FAIL - - ['grid' with: grid-template-columns: 200px 1fr; and grid-template-rows: 1fr 100px;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: auto 1fr; and grid-template-rows: auto 1fr;] - expected: FAIL - - ['grid' with: grid-template-columns: auto 1fr; and grid-template-rows: auto 1fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: 1fr 3fr; and grid-template-rows: 2fr 1fr;] - expected: FAIL - - ['grid' with: grid-template-columns: 1fr 3fr; and grid-template-rows: 2fr 1fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: minmax(25px, 75px) 750px; and grid-template-rows: minmax(50px, 150px) 500px;] - expected: FAIL - - ['grid' with: grid-template-columns: minmax(25px, 75px) 750px; and grid-template-rows: minmax(50px, 150px) 500px;] - expected: FAIL - ['emptyGrid' with: grid-template-columns: min-content 1fr calc(20px + 10%) minmax(30em, 50em); and grid-template-rows: min-content 1fr calc(10% + 40px) minmax(3em, 5em);] expected: FAIL ['grid' with: grid-template-columns: min-content 1fr calc(20px + 10%) minmax(30em, 50em); and grid-template-rows: min-content 1fr calc(10% + 40px) minmax(3em, 5em);] expected: FAIL - - ['grid' with: grid-template-columns: foo; and grid-template-rows: bar;] - expected: FAIL - - ['grid' with: grid-template-columns: auto none; and grid-template-rows: none auto;] - expected: FAIL - - ['grid' with: grid-template-columns: 100px, 200px; and grid-template-rows: 300px, 400px;] - expected: FAIL - - ['grid' with: grid-template-columns: minmax(100px, 200px, 300px); and grid-template-rows: minmax(100px, 200px, 300px);] - expected: FAIL diff --git a/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-named-grid-lines-001.html.ini b/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-named-grid-lines-001.html.ini index 5d583ae3b3e..436847f02c3 100644 --- a/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-named-grid-lines-001.html.ini +++ b/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-named-grid-lines-001.html.ini @@ -11,12 +11,6 @@ ['grid' with: grid-template-columns: [F1rst-L1_n3\] auto [L4st-L1_n3\]; and grid-template-rows: [F1rst-L1_n3\] auto [L4st-L1_n3\];] expected: FAIL - ['emptyGrid' with: grid-template-columns: [\] auto [ \]; and grid-template-rows: [ \] auto [\];] - expected: FAIL - - ['grid' with: grid-template-columns: [\] auto [ \]; and grid-template-rows: [ \] auto [\];] - expected: FAIL - ['emptyGrid' with: grid-template-columns: [first\] auto; and grid-template-rows: [first\] auto;] expected: FAIL @@ -112,66 +106,3 @@ ['grid' with: grid-template-columns: [a\] min-content [b\] 1fr [c\] calc(20px + 10%) [d\] minmax(30em, 50em) [e\]; and grid-template-rows: [z\] min-content [y\] 1fr [x\] calc(10% + 40px) [w\] minmax(3em, 5em) [v\];] expected: FAIL - - ['grid' with: grid-template-columns: [a\]; and grid-template-rows: [a\];] - expected: FAIL - - ['grid' with: grid-template-columns: [a b\]; and grid-template-rows: [a b\];] - expected: FAIL - - ['grid' with: grid-template-columns: [a\] none [b\]; and grid-template-rows: [a\] none [b\];] - expected: FAIL - - ['grid' with: grid-template-columns: [a\] [b\]; and grid-template-rows: [a\] [b\];] - expected: FAIL - - ['grid' with: grid-template-columns: a auto b; and grid-template-rows: a auto b;] - expected: FAIL - - ['grid' with: grid-template-columns: (a) auto (b); and grid-template-rows: (a) auto (b);] - expected: FAIL - - ['grid' with: grid-template-columns: 'a' auto 'b'; and grid-template-rows: 'a' auto 'b';] - expected: FAIL - - ['grid' with: grid-template-columns: "a" auto "b"; and grid-template-rows: "a" auto "b";] - expected: FAIL - - ['grid' with: grid-template-columns: [a, b\] auto [a, b\]; and grid-template-rows: [a, b\] auto [a, b\];] - expected: FAIL - - ['grid' with: grid-template-columns: [a\] [b\] auto [c d\] [e\]; and grid-template-rows: [a\] [b\] auto [c d\] [e\];] - expected: FAIL - - ['grid' with: grid-template-columns: [a [b\]\] auto [c\]; and grid-template-rows: [a [b\]\] auto [c\];] - expected: FAIL - - ['grid' with: grid-template-columns: [a\] auto [[b\]\]; and grid-template-rows: [a\] auto [[b\]\];] - expected: FAIL - - ['grid' with: grid-template-columns: [a auto [b\]; and grid-template-rows: [a auto [b\];] - expected: FAIL - - ['grid' with: grid-template-columns: [a 100px\] auto [b\]; and grid-template-rows: [a 100px\] auto [b\];] - expected: FAIL - - ['grid' with: grid-template-columns: [a 50%\] auto [b\]; and grid-template-rows: [a 50%\] auto [b\];] - expected: FAIL - - ['grid' with: grid-template-columns: [5\] auto [10\]; and grid-template-rows: [5\] auto [10\];] - expected: FAIL - - ['grid' with: grid-template-columns: [a.\] auto [b*\]; and grid-template-rows: [a.\] auto [b*\];] - expected: FAIL - - ['grid' with: grid-template-columns: [#a\] auto [$b\]; and grid-template-rows: [#a\] auto [$b\];] - expected: FAIL - - ['grid' with: grid-template-columns: [initial\] auto; and grid-template-rows: [initial\] auto;] - expected: FAIL - - ['grid' with: grid-template-columns: [inherit\] auto; and grid-template-rows: [inherit\] auto;] - expected: FAIL - - ['grid' with: grid-template-columns: [default\] auto; and grid-template-rows: [default\] auto;] - expected: FAIL diff --git a/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-repeat-001.html.ini b/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-repeat-001.html.ini index 6fff419ab43..144a4457e6d 100644 --- a/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-repeat-001.html.ini +++ b/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-support-repeat-001.html.ini @@ -1,40 +1,10 @@ [grid-inline-support-repeat-001.html] - ['emptyGrid' with: grid-template-columns: repeat(1, auto); and grid-template-rows: repeat(1, auto);] - expected: FAIL - - ['grid' with: grid-template-columns: repeat(1, auto); and grid-template-rows: repeat(1, auto);] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: repeat(2, auto); and grid-template-rows: repeat(2, auto);] - expected: FAIL - - ['grid' with: grid-template-columns: repeat(2, auto); and grid-template-rows: repeat(2, auto);] - expected: FAIL - ['emptyGrid' with: grid-template-columns: repeat(2, minmax(50px, calc(50px + 50%))); and grid-template-rows: repeat(2, minmax(50px, calc(50px + 50%)));] expected: FAIL ['grid' with: grid-template-columns: repeat(2, minmax(50px, calc(50px + 50%))); and grid-template-rows: repeat(2, minmax(50px, calc(50px + 50%)));] expected: FAIL - ['emptyGrid' with: grid-template-columns: repeat(5, 10%); and grid-template-rows: repeat(5, 10%);] - expected: FAIL - - ['grid' with: grid-template-columns: repeat(5, 10%); and grid-template-rows: repeat(5, 10%);] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: max-content repeat(2, 25%) 1fr; and grid-template-rows: 100px repeat(2, 25%) 1fr;] - expected: FAIL - - ['grid' with: grid-template-columns: max-content repeat(2, 25%) 1fr; and grid-template-rows: max-content repeat(2, 25%) 1fr;] - expected: FAIL - - ['emptyGrid' with: grid-template-columns: repeat(2, min-content 50px); and grid-template-rows: repeat(2, min-content 50px);] - expected: FAIL - - ['grid' with: grid-template-columns: repeat(2, min-content 50px); and grid-template-rows: repeat(2, min-content 50px);] - expected: FAIL - ['emptyGrid' with: grid-template-columns: repeat(2, [a\] minmax(50px, 100px) [b\] 25em [c\]); and grid-template-rows: repeat(2, [a\] minmax(50px, 100px) [b\] 25em [c\]);] expected: FAIL @@ -71,23 +41,8 @@ ['grid' with: grid-template-columns: [a\] min-content repeat(2, [b\] 1fr [c\] calc(20px + 10%)) [d\] minmax(30em, 50em) [e\]; and grid-template-rows: [z\] min-content repeat(2, [y\] 1fr [x\] calc(10% + 40px)) [w\] minmax(3em, 5em) [v\];] expected: FAIL - ['grid' with: grid-template-columns: repeat(-1, auto); and grid-template-rows: repeat(-1, auto);] + ['emptyGrid' with: grid-template-columns: [a\] repeat(2, [b\] 100px); and grid-template-rows: [a\] repeat(2, [b\] 100px);] expected: FAIL - ['grid' with: grid-template-columns: repeat(auto, 2); and grid-template-rows: repeat(auto, 2);] - expected: FAIL - - ['grid' with: grid-template-columns: repeat 2, auto; and grid-template-rows: repeat 2, auto;] - expected: FAIL - - ['grid' with: grid-template-columns: repeat(2 auto); and grid-template-rows: repeat(2 auto);] - expected: FAIL - - ['grid' with: grid-template-columns: 100px (repeat 2, auto); and grid-template-rows: (repeat 2, auto);] - expected: FAIL - - ['grid' with: grid-template-columns: repeat(2, 50px repeat(2, 100px)); and grid-template-rows: repeat(2, 50px repeat(2, 100px));] - expected: FAIL - - ['grid' with: grid-template-columns: 100px repeat(2, [a\]); and grid-template-rows: 100px repeat(2, [a\]);] + ['grid' with: grid-template-columns: [a\] repeat(2, [b\] 100px); and grid-template-rows: [a\] repeat(2, [b\] 100px);] expected: FAIL diff --git a/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-template-columns-rows-resolved-values-001.html.ini b/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-template-columns-rows-resolved-values-001.html.ini deleted file mode 100644 index 77887328ada..00000000000 --- a/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-template-columns-rows-resolved-values-001.html.ini +++ /dev/null @@ -1,108 +0,0 @@ -[grid-inline-template-columns-rows-resolved-values-001.html] - ['grid' with: grid-template-columns: ; and grid-template-rows: ;] - expected: FAIL - - ['grid' with: grid-template-columns: auto auto; and grid-template-rows: ;] - expected: FAIL - - ['grid' with: grid-template-columns: 60px; and grid-template-rows: ;] - expected: FAIL - - ['grid' with: grid-template-columns: 100px 60px; and grid-template-rows: ;] - expected: FAIL - - ['grid' with: grid-template-columns: ; and grid-template-rows: 50px;] - expected: FAIL - - ['grid' with: grid-template-columns: ; and grid-template-rows: 50px 30px;] - expected: FAIL - - ['grid' with: grid-template-columns: 60px; and grid-template-rows: 50px;] - expected: FAIL - - ['grid' with: grid-template-columns: 60px; and grid-template-rows: 50px 30px;] - expected: FAIL - - ['grid' with: grid-template-columns: 100px 60px; and grid-template-rows: 50px;] - expected: FAIL - - ['gridItemsPositions' with: grid-template-columns: ; and grid-template-rows: ;] - expected: FAIL - - ['gridItemsPositions' with: grid-template-columns: 60px; and grid-template-rows: ;] - expected: FAIL - - ['gridItemsPositions' with: grid-template-columns: 60px 50px; and grid-template-rows: ;] - expected: FAIL - - ['gridItemsPositions' with: grid-template-columns: ; and grid-template-rows: 60px;] - expected: FAIL - - ['gridItemsPositions' with: grid-template-columns: ; and grid-template-rows: 60px 50px;] - expected: FAIL - - ['gridItemsPositions' with: grid-template-columns: 60px; and grid-template-rows: 60px;] - expected: FAIL - - ['gridItemsPositions' with: grid-template-columns: 60px; and grid-template-rows: 60px 50px;] - expected: FAIL - - ['gridItemsPositions' with: grid-template-columns: 60px 50px; and grid-template-rows: 60px;] - expected: FAIL - - ['gridItemsPositions' with: grid-template-columns: 60px 50px; and grid-template-rows: 60px 50px;] - expected: FAIL - - ['gridAutoFlowColumn' with: grid-template-columns: ; and grid-template-rows: ;] - expected: FAIL - - ['gridAutoFlowColumn' with: grid-template-columns: ; and grid-template-rows: auto auto;] - expected: FAIL - - ['gridAutoFlowColumn' with: grid-template-columns: 60px; and grid-template-rows: ;] - expected: FAIL - - ['gridAutoFlowColumn' with: grid-template-columns: 100px 60px; and grid-template-rows: ;] - expected: FAIL - - ['gridAutoFlowColumn' with: grid-template-columns: ; and grid-template-rows: 50px;] - expected: FAIL - - ['gridAutoFlowColumn' with: grid-template-columns: ; and grid-template-rows: 50px 30px;] - expected: FAIL - - ['gridAutoFlowColumn' with: grid-template-columns: 60px; and grid-template-rows: 50px;] - expected: FAIL - - ['gridAutoFlowColumn' with: grid-template-columns: 60px; and grid-template-rows: 50px 30px;] - expected: FAIL - - ['gridAutoFlowColumn' with: grid-template-columns: 100px 60px; and grid-template-rows: 50px;] - expected: FAIL - - ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: ; and grid-template-rows: ;] - expected: FAIL - - ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: 60px; and grid-template-rows: ;] - expected: FAIL - - ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: 60px 70px; and grid-template-rows: ;] - expected: FAIL - - ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: ; and grid-template-rows: 60px;] - expected: FAIL - - ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: ; and grid-template-rows: 60px 70px;] - expected: FAIL - - ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: 60px; and grid-template-rows: 60px;] - expected: FAIL - - ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: 60px; and grid-template-rows: 60px 70px;] - expected: FAIL - - ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: 60px 70px; and grid-template-rows: 60px;] - expected: FAIL - - ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: 60px 70px; and grid-template-rows: 60px 70px;] - expected: FAIL diff --git a/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-template-columns-rows-resolved-values-001.tentative.html.ini b/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-template-columns-rows-resolved-values-001.tentative.html.ini index c51cb6f3e19..b34821d6477 100644 --- a/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-template-columns-rows-resolved-values-001.tentative.html.ini +++ b/tests/wpt/meta/css/css-grid/grid-definition/grid-inline-template-columns-rows-resolved-values-001.tentative.html.ini @@ -4,3 +4,105 @@ ['gridAutoFlowColumn' with: grid-template-columns: ; and grid-template-rows: auto auto;] expected: FAIL + + ['grid' with: grid-template-columns: ; and grid-template-rows: ;] + expected: FAIL + + ['grid' with: grid-template-columns: 60px; and grid-template-rows: ;] + expected: FAIL + + ['grid' with: grid-template-columns: 100px 60px; and grid-template-rows: ;] + expected: FAIL + + ['grid' with: grid-template-columns: ; and grid-template-rows: 50px;] + expected: FAIL + + ['grid' with: grid-template-columns: ; and grid-template-rows: 50px 30px;] + expected: FAIL + + ['grid' with: grid-template-columns: 60px; and grid-template-rows: 50px;] + expected: FAIL + + ['grid' with: grid-template-columns: 60px; and grid-template-rows: 50px 30px;] + expected: FAIL + + ['grid' with: grid-template-columns: 100px 60px; and grid-template-rows: 50px;] + expected: FAIL + + ['gridItemsPositions' with: grid-template-columns: ; and grid-template-rows: ;] + expected: FAIL + + ['gridItemsPositions' with: grid-template-columns: 60px; and grid-template-rows: ;] + expected: FAIL + + ['gridItemsPositions' with: grid-template-columns: 60px 50px; and grid-template-rows: ;] + expected: FAIL + + ['gridItemsPositions' with: grid-template-columns: ; and grid-template-rows: 60px;] + expected: FAIL + + ['gridItemsPositions' with: grid-template-columns: ; and grid-template-rows: 60px 50px;] + expected: FAIL + + ['gridItemsPositions' with: grid-template-columns: 60px; and grid-template-rows: 60px;] + expected: FAIL + + ['gridItemsPositions' with: grid-template-columns: 60px; and grid-template-rows: 60px 50px;] + expected: FAIL + + ['gridItemsPositions' with: grid-template-columns: 60px 50px; and grid-template-rows: 60px;] + expected: FAIL + + ['gridItemsPositions' with: grid-template-columns: 60px 50px; and grid-template-rows: 60px 50px;] + expected: FAIL + + ['gridAutoFlowColumn' with: grid-template-columns: ; and grid-template-rows: ;] + expected: FAIL + + ['gridAutoFlowColumn' with: grid-template-columns: 60px; and grid-template-rows: ;] + expected: FAIL + + ['gridAutoFlowColumn' with: grid-template-columns: 100px 60px; and grid-template-rows: ;] + expected: FAIL + + ['gridAutoFlowColumn' with: grid-template-columns: ; and grid-template-rows: 50px;] + expected: FAIL + + ['gridAutoFlowColumn' with: grid-template-columns: ; and grid-template-rows: 50px 30px;] + expected: FAIL + + ['gridAutoFlowColumn' with: grid-template-columns: 60px; and grid-template-rows: 50px;] + expected: FAIL + + ['gridAutoFlowColumn' with: grid-template-columns: 60px; and grid-template-rows: 50px 30px;] + expected: FAIL + + ['gridAutoFlowColumn' with: grid-template-columns: 100px 60px; and grid-template-rows: 50px;] + expected: FAIL + + ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: ; and grid-template-rows: ;] + expected: FAIL + + ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: 60px; and grid-template-rows: ;] + expected: FAIL + + ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: 60px 70px; and grid-template-rows: ;] + expected: FAIL + + ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: ; and grid-template-rows: 60px;] + expected: FAIL + + ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: ; and grid-template-rows: 60px 70px;] + expected: FAIL + + ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: 60px; and grid-template-rows: 60px;] + expected: FAIL + + ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: 60px; and grid-template-rows: 60px 70px;] + expected: FAIL + + ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: 60px 70px; and grid-template-rows: 60px;] + expected: FAIL + + ['gridAutoFlowColumnItemsPositions' with: grid-template-columns: 60px 70px; and grid-template-rows: 60px 70px;] + expected: FAIL diff --git a/tests/wpt/meta/css/css-grid/grid-items/grid-minimum-size-grid-items-021.html.ini b/tests/wpt/meta/css/css-grid/grid-items/grid-minimum-size-grid-items-021.html.ini index 67341dc9291..5356cd38934 100644 --- a/tests/wpt/meta/css/css-grid/grid-items/grid-minimum-size-grid-items-021.html.ini +++ b/tests/wpt/meta/css/css-grid/grid-items/grid-minimum-size-grid-items-021.html.ini @@ -1,28 +1,4 @@ [grid-minimum-size-grid-items-021.html] - [grid-1.gridTemplateColumns] - expected: FAIL - - [grid-1.gridTemplateRows] - expected: FAIL - - [grid-2.gridTemplateColumns] - expected: FAIL - - [grid-2.gridTemplateRows] - expected: FAIL - - [grid-3.gridTemplateColumns] - expected: FAIL - - [grid-3.gridTemplateRows] - expected: FAIL - - [grid-4.gridTemplateColumns] - expected: FAIL - - [grid-4.gridTemplateRows] - expected: FAIL - [grid-5.height] expected: FAIL @@ -50,30 +26,6 @@ [img-6.height] expected: FAIL - [grid-7.gridTemplateColumns] - expected: FAIL - - [grid-7.gridTemplateRows] - expected: FAIL - - [grid-8.gridTemplateColumns] - expected: FAIL - - [grid-8.gridTemplateRows] - expected: FAIL - - [grid-9.gridTemplateColumns] - expected: FAIL - - [grid-9.gridTemplateRows] - expected: FAIL - - [grid-10.gridTemplateColumns] - expected: FAIL - - [grid-10.gridTemplateRows] - expected: FAIL - [grid-11.height] expected: FAIL @@ -100,75 +52,3 @@ [img-12.height] expected: FAIL - - [grid-13.gridTemplateColumns] - expected: FAIL - - [grid-13.gridTemplateRows] - expected: FAIL - - [grid-14.gridTemplateColumns] - expected: FAIL - - [grid-14.gridTemplateRows] - expected: FAIL - - [grid-15.gridTemplateColumns] - expected: FAIL - - [grid-15.gridTemplateRows] - expected: FAIL - - [grid-16.gridTemplateColumns] - expected: FAIL - - [grid-16.gridTemplateRows] - expected: FAIL - - [grid-17.gridTemplateColumns] - expected: FAIL - - [grid-17.gridTemplateRows] - expected: FAIL - - [grid-18.gridTemplateColumns] - expected: FAIL - - [grid-18.gridTemplateRows] - expected: FAIL - - [grid-19.gridTemplateColumns] - expected: FAIL - - [grid-19.gridTemplateRows] - expected: FAIL - - [grid-20.gridTemplateColumns] - expected: FAIL - - [grid-20.gridTemplateRows] - expected: FAIL - - [grid-21.gridTemplateColumns] - expected: FAIL - - [grid-21.gridTemplateRows] - expected: FAIL - - [grid-22.gridTemplateColumns] - expected: FAIL - - [grid-22.gridTemplateRows] - expected: FAIL - - [grid-23.gridTemplateColumns] - expected: FAIL - - [grid-23.gridTemplateRows] - expected: FAIL - - [grid-24.gridTemplateColumns] - expected: FAIL - - [grid-24.gridTemplateRows] - expected: FAIL diff --git a/tests/wpt/meta/css/css-grid/layout-algorithm/grid-fit-content-percentage.html.ini b/tests/wpt/meta/css/css-grid/layout-algorithm/grid-fit-content-percentage.html.ini index d41dbcf0823..32b5d8d7680 100644 --- a/tests/wpt/meta/css/css-grid/layout-algorithm/grid-fit-content-percentage.html.ini +++ b/tests/wpt/meta/css/css-grid/layout-algorithm/grid-fit-content-percentage.html.ini @@ -28,63 +28,3 @@ [fit-content(calc(0px + 150%))] expected: FAIL - - [fit-content(0%); min-width: 0px] - expected: FAIL - - [fit-content(50%); min-width: 0px] - expected: FAIL - - [fit-content(75%); min-width: 0px] - expected: FAIL - - [fit-content(100%); min-width: 0px] - expected: FAIL - - [fit-content(150%); min-width: 0px] - expected: FAIL - - [fit-content(calc(0px + 0%)); min-width: 0px] - expected: FAIL - - [fit-content(calc(0px + 50%)); min-width: 0px] - expected: FAIL - - [fit-content(calc(0px + 75%)); min-width: 0px] - expected: FAIL - - [fit-content(calc(0px + 100%)); min-width: 0px] - expected: FAIL - - [fit-content(calc(0px + 150%)); min-width: 0px] - expected: FAIL - - [fit-content(0%); min-width: auto] - expected: FAIL - - [fit-content(50%); min-width: auto] - expected: FAIL - - [fit-content(75%); min-width: auto] - expected: FAIL - - [fit-content(100%); min-width: auto] - expected: FAIL - - [fit-content(150%); min-width: auto] - expected: FAIL - - [fit-content(calc(0px + 0%)); min-width: auto] - expected: FAIL - - [fit-content(calc(0px + 50%)); min-width: auto] - expected: FAIL - - [fit-content(calc(0px + 75%)); min-width: auto] - expected: FAIL - - [fit-content(calc(0px + 100%)); min-width: auto] - expected: FAIL - - [fit-content(calc(0px + 150%)); min-width: auto] - expected: FAIL