Skip rule node which contains only inherited properties for rule cache.

This commit is contained in:
Xidorn Quan 2018-01-05 09:54:59 +11:00
parent 782e3fe4e4
commit 3593392788
6 changed files with 75 additions and 7 deletions

View file

@ -283,6 +283,12 @@ impl PropertyDeclarationBlock {
self.longhands.contains(id)
}
/// Returns whether this block contains any reset longhand.
#[inline]
pub fn contains_any_reset(&self) -> bool {
self.longhands.contains_any_reset()
}
/// Get a declaration for a given property.
///
/// NOTE: This is linear time.