mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
script: Don't dirty nodes that are already dirty.
This commit is contained in:
parent
e034c1cee2
commit
6a7a96a86c
1 changed files with 4 additions and 0 deletions
|
@ -622,6 +622,10 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> {
|
|||
// 1. Dirty self.
|
||||
self.set_has_changed(true);
|
||||
|
||||
if self.get_is_dirty() {
|
||||
return
|
||||
}
|
||||
|
||||
// 2. Dirty descendants.
|
||||
fn dirty_subtree(node: JSRef<Node>) {
|
||||
// Stop if this subtree is already dirty.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue