Skip to content
Permalink
Browse files

style: Cache computed styles of scrollbar part anonymous content.

  • Loading branch information...
heycam authored and emilio committed Jun 27, 2019
1 parent 1aef82f commit b8873f44aa0801e3b45e2664ac6f8b666036ed74
Showing with 13 additions and 0 deletions.
  1. +13 −0 components/style/properties/properties.mako.rs
@@ -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")]

0 comments on commit b8873f4

Please sign in to comment.
You can’t perform that action at this time.