Rename HAS_TEXT_DECORATION_LINE to match gecko side name. r=heycam
draft
Rename HAS_TEXT_DECORATION_LINE to match gecko side name. r=heycam
MozReview-Commit-ID: F11LoVS31ho
--- a/servo/components/style/matching.rs
+++ b/servo/components/style/matching.rs
@@ -836,18 +836,18 @@ trait PrivateMatchMethods: TElement {
restyle.damage |= difference.damage;
}
match difference.change {
StyleChange::Unchanged => {
// 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
},
StyleChange::Changed => ChildCascadeRequirement::MustCascadeChildren,
}
}
--- a/servo/components/style/properties/computed_value_flags.rs
+++ b/servo/components/style/properties/computed_value_flags.rs
@@ -4,22 +4,22 @@
//! Misc information about a given computed style.
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,
}
}
impl ComputedValueFlags {
/// Get the computed value flags for the initial style.
pub fn initial() -> Self {
Self::empty()
}
@@ -30,16 +30,16 @@ impl ComputedValueFlags {
parent_style: &ComputedValues,
) -> Self {
let mut ret = Self::empty();
// FIXME(emilio): This feels like it wants to look at the
// 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
}
}