mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
style: Cache computed styles of scrollbar part anonymous content.
Differential Revision: https://phabricator.services.mozilla.com/D33123
This commit is contained in:
parent
1aef82f806
commit
b8873f44aa
1 changed files with 13 additions and 0 deletions
|
@ -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")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue