mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Use the LonghandIdSet to check whether a property is set
This commit is contained in:
parent
ac2fd024b5
commit
d486def53b
2 changed files with 6 additions and 3 deletions
|
@ -239,6 +239,11 @@ impl PropertyDeclarationBlock {
|
|||
!self.declarations_importance.all_true()
|
||||
}
|
||||
|
||||
/// Returns whether this block contains a declaration of a given longhand.
|
||||
pub fn contains(&self, id: LonghandId) -> bool {
|
||||
self.longhands.contains(id)
|
||||
}
|
||||
|
||||
/// Get a declaration for a given property.
|
||||
///
|
||||
/// NOTE: This is linear time.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue