mirror of
https://github.com/servo/servo.git
synced 2025-06-19 14:48:59 +01:00
Fix potential clippy warning for NodeDamage enum variant (#37391)
The default of `enum-variant-name-threshold` is 3, so adding any new variants will lead to the lint being triggered, reference: [enum_variant_names](https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names). This PR fix this potential clippy lint warning for facilitate the addition of new variant in following PR about incremental box tree update. Testing: No logic changed, just covered by existing WPT tests Fixes: None Signed-off-by: sharpshooter_pt <ibluegalaxy_taoj@163.com>
This commit is contained in:
parent
5f1452f9d3
commit
bda3e23c74
24 changed files with 54 additions and 56 deletions
|
@ -940,7 +940,7 @@ impl Document {
|
|||
|
||||
// FIXME(emilio): This is very inefficient, ideally the flag above would
|
||||
// be enough and incremental layout could figure out from there.
|
||||
node.dirty(NodeDamage::OtherNodeDamage);
|
||||
node.dirty(NodeDamage::Other);
|
||||
}
|
||||
|
||||
/// Remove any existing association between the provided id and any elements in this document.
|
||||
|
@ -1516,7 +1516,7 @@ impl Document {
|
|||
.upcast::<Node>()
|
||||
.traverse_preorder(ShadowIncluding::Yes)
|
||||
{
|
||||
node.dirty(NodeDamage::OtherNodeDamage)
|
||||
node.dirty(NodeDamage::Other)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2550,7 +2550,7 @@ impl Document {
|
|||
//
|
||||
// FIXME(emilio): Use the DocumentStylesheetSet invalidation stuff.
|
||||
if let Some(element) = self.GetDocumentElement() {
|
||||
element.upcast::<Node>().dirty(NodeDamage::NodeStyleDamaged);
|
||||
element.upcast::<Node>().dirty(NodeDamage::Style);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue