Bug 1822118 - display: inline list-item is also a line participant. r=dshin

So the line break suppression flags should be propagated through it.

Otherwise ruby invariants might break, leading to a nullptr crash in
this case.

On debug builds the assertion was this one:

  https://searchfox.org/mozilla-central/rev/e6cb503ac22402421186e7488d4250cc1c5fecab/layout/generic/nsRubyBaseContainerFrame.cpp#631

Differential Revision: https://phabricator.services.mozilla.com/D177093
This commit is contained in:
Emilio Cobos Álvarez 2023-05-10 14:14:03 +00:00
parent fed9a70b55
commit 78b50f098d
3 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,11 @@
<style>
.a {
min-width: 641em;
display: list-item inline;
}
</style>
A
<ruby>
<rp class="a">
<rt>
<fieldset class="a">

View File

@ -817,4 +817,5 @@ load 1799749.html
pref(layout.css.content-visibility.enabled,true) asserts(1-4) load 1807958.html # asserts from integer overflow & bogus sizes
load 1816574.html
load 1821603.html
load 1822118.html
load 1825434.html

View File

@ -308,8 +308,10 @@ impl Display {
/// participant, which means it may lay its children on the same
/// line as itself.
pub fn is_line_participant(&self) -> bool {
if self.is_inline_flow() {
return true;
}
match *self {
Display::Inline => true,
#[cfg(feature = "gecko")]
Display::Contents | Display::Ruby | Display::RubyBaseContainer => true,
_ => false,