Skip to content

Commit

Permalink
style: Cache computed styles of scrollbar part anonymous content.
Browse files Browse the repository at this point in the history
  • Loading branch information
heycam authored and emilio committed Jul 8, 2019
1 parent 1aef82f commit b8873f4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions components/style/properties/properties.mako.rs
Expand Up @@ -2836,6 +2836,19 @@ impl ComputedValues {
pub fn resolve_color(&self, color: computed::Color) -> RGBA {
color.to_rgba(self.get_inherited_text().clone_color())
}

/// Returns which longhand properties have different values in the two
/// ComputedValues.
#[cfg(feature = "gecko_debug")]
pub fn differing_properties(&self, other: &ComputedValues) -> LonghandIdSet {
let mut set = LonghandIdSet::new();
% for prop in data.longhands:
if self.clone_${prop.ident}() != other.clone_${prop.ident}() {
set.insert(LonghandId::${prop.camel_case});
}
% endfor
set
}
}

#[cfg(feature = "servo")]
Expand Down

0 comments on commit b8873f4

Please sign in to comment.