style: Remove unused PropertyDeclarationBlock::set_importance.

Bug: 1466963
Reviewed-by: xidorn
MozReview-Commit-ID: 1YrlOvktag9
This commit is contained in:
Emilio Cobos Álvarez 2018-06-05 21:13:04 +02:00
parent e052666153
commit 6ca324f8b5
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -564,23 +564,6 @@ impl PropertyDeclarationBlock {
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>
///
/// Returns whether any declaration was actually removed.