mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Remove unused PropertyDeclarationBlock::set_importance.
Bug: 1466963 Reviewed-by: xidorn MozReview-Commit-ID: 1YrlOvktag9
This commit is contained in:
parent
e052666153
commit
6ca324f8b5
1 changed files with 0 additions and 17 deletions
|
@ -564,23 +564,6 @@ impl PropertyDeclarationBlock {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the declaration importance for a given property, if found.
|
|
||||||
///
|
|
||||||
/// Returns whether any declaration was updated.
|
|
||||||
pub fn set_importance(&mut self, property: &PropertyId, new_importance: Importance) -> bool {
|
|
||||||
let mut updated_at_least_one = false;
|
|
||||||
for (i, declaration) in self.declarations.iter().enumerate() {
|
|
||||||
if declaration.id().is_or_is_longhand_of(property) {
|
|
||||||
let is_important = new_importance.important();
|
|
||||||
if self.declarations_importance[i] != is_important {
|
|
||||||
self.declarations_importance.set(i, is_important);
|
|
||||||
updated_at_least_one = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
updated_at_least_one
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-removeproperty>
|
/// <https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-removeproperty>
|
||||||
///
|
///
|
||||||
/// Returns whether any declaration was actually removed.
|
/// Returns whether any declaration was actually removed.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue