diff options
author | bors-servo <servo-ops@mozilla.com> | 2020-06-22 10:28:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-22 10:28:19 -0400 |
commit | f35f671f45ef1b589dec3bd9aa62fd4ae664e9e0 (patch) | |
tree | 9087f7025ab6f9283397e31ec799ce319b27d270 /components/script/dom/document.rs | |
parent | de01770253f3e2e7ded583a86caff8c9bf0e8ab5 (diff) | |
parent | e901fa2c39bc930201f5e251bb65e276a846634c (diff) | |
download | servo-f35f671f45ef1b589dec3bd9aa62fd4ae664e9e0.tar.gz servo-f35f671f45ef1b589dec3bd9aa62fd4ae664e9e0.zip |
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. -->
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r-- | components/script/dom/document.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 41cf477e9cb..ce3204d3797 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -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 { |