mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
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:
parent
e1213f9dbc
commit
e1de46c691
12 changed files with 10 additions and 19 deletions
|
@ -986,7 +986,7 @@ impl BoxFragment {
|
||||||
return Some(StackingContextType::FloatStackingContainer);
|
return Some(StackingContextType::FloatStackingContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
if box_style.display.is_atomic_inline_level() {
|
if self.is_atomic_inline_level() {
|
||||||
return Some(StackingContextType::AtomicInlineStackingContainer);
|
return Some(StackingContextType::AtomicInlineStackingContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ use style::computed_values::overflow_x::T as ComputedOverflow;
|
||||||
use style::computed_values::position::T as ComputedPosition;
|
use style::computed_values::position::T as ComputedPosition;
|
||||||
use style::logical_geometry::WritingMode;
|
use style::logical_geometry::WritingMode;
|
||||||
use style::properties::ComputedValues;
|
use style::properties::ComputedValues;
|
||||||
|
use style::values::specified::box_::DisplayOutside;
|
||||||
|
|
||||||
use super::{BaseFragment, BaseFragmentInfo, CollapsedBlockMargins, Fragment};
|
use super::{BaseFragment, BaseFragmentInfo, CollapsedBlockMargins, Fragment};
|
||||||
use crate::formatting_contexts::Baselines;
|
use crate::formatting_contexts::Baselines;
|
||||||
|
@ -348,6 +349,12 @@ impl BoxFragment {
|
||||||
self.style.is_inline_box(self.base.flags)
|
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.
|
/// Whether this is a table wrapper box.
|
||||||
/// <https://www.w3.org/TR/css-tables-3/#table-wrapper-box>
|
/// <https://www.w3.org/TR/css-tables-3/#table-wrapper-box>
|
||||||
pub(crate) fn is_table_wrapper(&self) -> bool {
|
pub(crate) fn is_table_wrapper(&self) -> bool {
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
[grid-gutters-015.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[grid-container-baseline-synthesized-001.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[grid-container-baseline-synthesized-002.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[grid-container-baseline-synthesized-003.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[grid-container-baseline-synthesized-004.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[grid-container-scrollbars-sizing-002.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[independent-tracks-from-parent-grid.html]
|
|
||||||
expected: FAIL
|
|
2
tests/wpt/meta/css/css-grid/subgrid/repeat-auto-fill-005.html.ini
vendored
Normal file
2
tests/wpt/meta/css/css-grid/subgrid/repeat-auto-fill-005.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[repeat-auto-fill-005.html]
|
||||||
|
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
||||||
[subgrid-baseline-012.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[subgrid-no-items-on-edges-001.html]
|
|
||||||
expected: FAIL
|
|
Loading…
Add table
Add a link
Reference in a new issue