mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1396041 - Disassociate element from document before destroying animations in UnbindFromTree(). r=birtles
This allows us to avoid posting animation-related restyles when removing elements from the document tree. MozReview-Commit-ID: CzN4S0DTUMa --HG-- extra : rebase_source : a5b94d9ad5b1b2243abd0a5b188eec2b334df74d
This commit is contained in:
parent
0b3afbde59
commit
76c1b26215
@ -1886,6 +1886,8 @@ Element::UnbindFromTree(bool aDeep, bool aNullParent)
|
||||
}
|
||||
#endif
|
||||
|
||||
ClearInDocument();
|
||||
|
||||
// Ensure that CSS transitions don't continue on an element at a
|
||||
// different place in the tree (even if reinserted before next
|
||||
// animation refresh).
|
||||
@ -1901,8 +1903,6 @@ Element::UnbindFromTree(bool aDeep, bool aNullParent)
|
||||
DeleteProperty(nsGkAtoms::animationsProperty);
|
||||
}
|
||||
|
||||
ClearInDocument();
|
||||
|
||||
// Computed style data isn't useful for detached nodes, and we'll need to
|
||||
// recompute it anyway if we ever insert the nodes back into a document.
|
||||
if (IsStyledByServo()) {
|
||||
|
9
layout/style/crashtests/1396041.html
Normal file
9
layout/style/crashtests/1396041.html
Normal file
@ -0,0 +1,9 @@
|
||||
<script>
|
||||
document.documentElement.appendChild(document.createElement("meter"))
|
||||
a = document.createElement("textarea")
|
||||
document.documentElement.appendChild(a)
|
||||
b = document.createElement("style")
|
||||
b.appendChild(document.createTextNode("*::-moz-meter-bar { text-indent: calc(50%); scroll-behavior: smooth; transition-duration: 250ms; }"))
|
||||
a.select()
|
||||
document.head.appendChild(b)
|
||||
</script>
|
@ -211,3 +211,4 @@ load 1390726.html
|
||||
load 1393791.html
|
||||
load 1384232.html
|
||||
load 1395725.html
|
||||
load 1396041.html
|
||||
|
Loading…
Reference in New Issue
Block a user