Fix: display: inline-grid considered an atomic inline (#36298)

This change ensures that `display: inline-grid` is considered an atomic
inline

- Add `is_atomic_inline_level()` logic to `box_fragment.rs` to improve
accuracy.
- Update `stacking_context.rs` to use the new `is_atomic_inline_level()`
method instead of the one from stylo.
- Update `repeat-auto-fill-005.html` test expectation.
- Remove .ini expectations for tests that are no longer failing.

Testing: covered by WPT
Fixes:  #35310

---------

Signed-off-by: Barigbue <barigbuenbira@gmail.com>
This commit is contained in:
Barigbue Nbira 2025-04-03 20:48:19 +01:00 committed by GitHub
parent e1213f9dbc
commit e1de46c691
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 10 additions and 19 deletions

View file

@ -986,7 +986,7 @@ impl BoxFragment {
return Some(StackingContextType::FloatStackingContainer);
}
if box_style.display.is_atomic_inline_level() {
if self.is_atomic_inline_level() {
return Some(StackingContextType::AtomicInlineStackingContainer);
}

View file

@ -12,6 +12,7 @@ use style::computed_values::overflow_x::T as ComputedOverflow;
use style::computed_values::position::T as ComputedPosition;
use style::logical_geometry::WritingMode;
use style::properties::ComputedValues;
use style::values::specified::box_::DisplayOutside;
use super::{BaseFragment, BaseFragmentInfo, CollapsedBlockMargins, Fragment};
use crate::formatting_contexts::Baselines;
@ -348,6 +349,12 @@ impl BoxFragment {
self.style.is_inline_box(self.base.flags)
}
/// Whether this is an atomic inline-level box.
/// <https://drafts.csswg.org/css-display-3/#atomic-inline>
pub(crate) fn is_atomic_inline_level(&self) -> bool {
self.style.get_box().display.outside() == DisplayOutside::Inline && !self.is_inline_box()
}
/// Whether this is a table wrapper box.
/// <https://www.w3.org/TR/css-tables-3/#table-wrapper-box>
pub(crate) fn is_table_wrapper(&self) -> bool {

View file

@ -1,2 +0,0 @@
[grid-gutters-015.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[grid-container-baseline-synthesized-001.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[grid-container-baseline-synthesized-002.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[grid-container-baseline-synthesized-003.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[grid-container-baseline-synthesized-004.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[grid-container-scrollbars-sizing-002.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[independent-tracks-from-parent-grid.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[repeat-auto-fill-005.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[subgrid-baseline-012.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[subgrid-no-items-on-edges-001.html]
expected: FAIL