style: Cache computed styles of scrollbar part anonymous content.

Differential Revision: https://phabricator.services.mozilla.com/D33123
This commit is contained in:
Cameron McCormack 2019-06-27 07:22:22 +00:00 committed by Emilio Cobos Álvarez
parent 1aef82f806
commit b8873f44aa
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A

View file

@ -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")]