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:
JoeDow 2025-06-11 17:53:15 +08:00 committed by GitHub
parent 5f1452f9d3
commit bda3e23c74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 54 additions and 56 deletions

View file

@ -456,7 +456,7 @@ impl HTMLImageElement {
self.current_request.borrow_mut().state = State::CompletelyAvailable;
LoadBlocker::terminate(&self.current_request.borrow().blocker, can_gc);
// Mark the node dirty
self.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
self.upcast::<Node>().dirty(NodeDamage::Other);
self.resolve_image_decode_promises(can_gc);
}
@ -522,7 +522,7 @@ impl HTMLImageElement {
.fire_event(atom!("loadend"), can_gc);
}
self.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
self.upcast::<Node>().dirty(NodeDamage::Other);
}
fn process_image_response_for_environment_change(
@ -1229,7 +1229,7 @@ impl HTMLImageElement {
this.abort_request(State::Unavailable, ImageRequestPhase::Pending, CanGc::note());
// Step 15.6
this.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
this.upcast::<Node>().dirty(NodeDamage::Other);
// Step 15.7
this.upcast::<EventTarget>().fire_event(atom!("load"), CanGc::note());