mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +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
|
@ -348,7 +348,7 @@ impl HTMLTextAreaElementMethods<crate::DomTypeHolder> for HTMLTextAreaElement {
|
|||
|
||||
self.validity_state()
|
||||
.perform_validation_and_update(ValidationFlags::all(), CanGc::note());
|
||||
self.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
|
||||
self.upcast::<Node>().dirty(NodeDamage::Other);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-textarea-textlength
|
||||
|
@ -656,11 +656,11 @@ impl VirtualMethods for HTMLTextAreaElement {
|
|||
}
|
||||
self.value_dirty.set(true);
|
||||
self.update_placeholder_shown_state();
|
||||
self.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
|
||||
self.upcast::<Node>().dirty(NodeDamage::Other);
|
||||
event.mark_as_handled();
|
||||
},
|
||||
KeyReaction::RedrawSelection => {
|
||||
self.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
|
||||
self.upcast::<Node>().dirty(NodeDamage::Other);
|
||||
event.mark_as_handled();
|
||||
},
|
||||
KeyReaction::Nothing => (),
|
||||
|
@ -680,13 +680,13 @@ impl VirtualMethods for HTMLTextAreaElement {
|
|||
.textinput
|
||||
.borrow_mut()
|
||||
.handle_compositionend(compositionevent);
|
||||
self.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
|
||||
self.upcast::<Node>().dirty(NodeDamage::Other);
|
||||
} else if event.type_() == atom!("compositionupdate") {
|
||||
let _ = self
|
||||
.textinput
|
||||
.borrow_mut()
|
||||
.handle_compositionupdate(compositionevent);
|
||||
self.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
|
||||
self.upcast::<Node>().dirty(NodeDamage::Other);
|
||||
}
|
||||
event.mark_as_handled();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue