mirror of
https://github.com/servo/servo.git
synced 2025-07-13 02:13:40 +01:00
Auto merge of #19382 - emilio:pdb-deindent, r=canaltinova
style: Deindent some property declaration code. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19382) <!-- Reviewable:end -->
This commit is contained in:
commit
ac6e04ebfb
1 changed files with 42 additions and 40 deletions
|
@ -470,13 +470,16 @@ impl PropertyDeclarationBlock {
|
|||
if !definitely_new {
|
||||
let mut index_to_remove = None;
|
||||
for (i, slot) in self.declarations.iter_mut().enumerate() {
|
||||
if slot.id() == declaration.id() {
|
||||
if slot.id() != declaration.id() {
|
||||
continue;
|
||||
}
|
||||
|
||||
let important = self.declarations_importance.get(i as u32);
|
||||
match (important, importance.important()) {
|
||||
(false, true) => {}
|
||||
|
||||
(true, false) => {
|
||||
// For declarations set from the OM, less-important
|
||||
// For declarations set from the OM, more-important
|
||||
// declarations are overridden.
|
||||
if !matches!(source, DeclarationSource::CssOm) {
|
||||
return false
|
||||
|
@ -520,7 +523,6 @@ impl PropertyDeclarationBlock {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(index) = index_to_remove {
|
||||
self.declarations.remove(index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue