Auto merge of #26953 - mrobinson:cancel-reparent, r=nox

Cancel animations for nodes which are removed from the DOM

This includes nodes which are being reparented.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
bors-servo 2020-06-22 10:28:19 -04:00 committed by GitHub
commit f35f671f45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 32 additions and 31 deletions

View file

@ -3861,6 +3861,10 @@ impl Document {
.borrow()
.do_post_reflow_update(&self.window, self.current_animation_timeline_value());
}
pub(crate) fn cancel_animations_for_node(&self, node: &Node) {
self.animations.borrow().cancel_animations_for_node(node);
}
}
impl Element {