diff --git a/components/style/matching.rs b/components/style/matching.rs index c3c5e37c165..2b95f2ba611 100644 --- a/components/style/matching.rs +++ b/components/style/matching.rs @@ -410,6 +410,15 @@ trait PrivateMatchMethods: TElement { return ChildCascadeRequirement::MustCascadeChildren } + // Line break suppression may also be affected if the display + // type changes from ruby to non-ruby. + #[cfg(feature = "gecko")] + { + if old_display.is_ruby_type() != new_display.is_ruby_type() { + return ChildCascadeRequirement::MustCascadeChildren + } + } + // Children with justify-items: auto may depend on our // justify-items property value. // diff --git a/components/style/style_adjuster.rs b/components/style/style_adjuster.rs index c2044c143b5..a4d9f5acd00 100644 --- a/components/style/style_adjuster.rs +++ b/components/style/style_adjuster.rs @@ -13,7 +13,11 @@ use properties::longhands::float::computed_value::T as float; use properties::longhands::overflow_x::computed_value::T as overflow; use properties::longhands::position::computed_value::T as position; -/// An unsized struct that implements all the adjustment methods. +/// A struct that implements all the adjustment methods. +/// +/// NOTE(emilio): If new adjustments are introduced that depend on reset +/// properties of the parent, you may need tweaking the +/// `ChildCascadeRequirement` code in `matching.rs`. pub struct StyleAdjuster<'a, 'b: 'a> { style: &'a mut StyleBuilder<'b>, } @@ -331,6 +335,10 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { /// If a