style: display: inline list-item is also a line participant

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 committed by Martin Robinson
parent 0094560541
commit a69578993a

View file

@ -285,8 +285,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,