From a69578993aeca0790ffaed95a9fa08375887bfbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 10 May 2023 14:14:03 +0000 Subject: [PATCH] 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 --- components/style/values/specified/box.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/style/values/specified/box.rs b/components/style/values/specified/box.rs index b70351fca41..a1d18c40b7d 100644 --- a/components/style/values/specified/box.rs +++ b/components/style/values/specified/box.rs @@ -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,