diff --git a/components/style/matching.rs b/components/style/matching.rs index bf31369ba3a..fceea1150ce 100644 --- a/components/style/matching.rs +++ b/components/style/matching.rs @@ -329,8 +329,8 @@ trait PrivateMatchMethods: TElement { // We need to cascade the children in order to ensure the // correct propagation of text-decoration-line, which is a reset // property. - if old_values.flags.contains(HAS_TEXT_DECORATION_LINE) != - new_values.flags.contains(HAS_TEXT_DECORATION_LINE) { + if old_values.flags.contains(HAS_TEXT_DECORATION_LINES) != + new_values.flags.contains(HAS_TEXT_DECORATION_LINES) { return ChildCascadeRequirement::MustCascadeChildren; } ChildCascadeRequirement::CanSkipCascade diff --git a/components/style/properties/computed_value_flags.rs b/components/style/properties/computed_value_flags.rs index 8e3dc090b77..af666699619 100644 --- a/components/style/properties/computed_value_flags.rs +++ b/components/style/properties/computed_value_flags.rs @@ -9,12 +9,12 @@ use properties::{ComputedValues, StyleBuilder}; bitflags! { /// Misc information about a given computed style. pub flags ComputedValueFlags: u8 { - /// Whether the style or any of the ancestors has a text-decoration + /// Whether the style or any of the ancestors has a text-decoration-line /// property that should get propagated to descendants. /// - /// text-decoration is a reset property, but gets propagated in the + /// text-decoration-line is a reset property, but gets propagated in the /// frame/box tree. - const HAS_TEXT_DECORATION_LINE = 1 << 0, + const HAS_TEXT_DECORATION_LINES = 1 << 0, } } @@ -35,9 +35,9 @@ impl ComputedValueFlags { // layout_parent_style, but the way it works in Gecko means it's not // needed (we'd recascade a bit more when it changes, but that's fine), // and this way it simplifies the code for text styles and similar. - if parent_style.flags.contains(HAS_TEXT_DECORATION_LINE) || + if parent_style.flags.contains(HAS_TEXT_DECORATION_LINES) || !this_style.get_text().clone_text_decoration_line().is_empty() { - ret.insert(HAS_TEXT_DECORATION_LINE); + ret.insert(HAS_TEXT_DECORATION_LINES); } ret