Auto merge of #26110 - servo:layout-2020-rm-note-dirty-descendant, r=emilio

Kill ServoLayoutElement::note_dirty_descendant
This commit is contained in:
bors-servo 2020-04-04 09:51:19 -04:00 committed by GitHub
commit 57fe27a4ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 48 deletions

View file

@ -3587,8 +3587,14 @@ impl Document {
self.pending_restyles
.borrow_mut()
.drain()
.filter(|(k, _)| k.upcast::<Node>().get_flag(NodeFlags::IS_CONNECTED))
.map(|(k, v)| (k.upcast::<Node>().to_trusted_node_address(), v))
.filter_map(|(elem, restyle)| {
let node = elem.upcast::<Node>();
if !node.get_flag(NodeFlags::IS_CONNECTED) {
return None;
}
node.note_dirty_descendants();
Some((node.to_trusted_node_address(), restyle))
})
.collect()
}
}