Bug 1403712: Clear the restyle root at the end of UnbindFromTree too. r?bholley
MozReview-Commit-ID: 7swfspMWUe6
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -2000,16 +2000,19 @@ Element::UnbindFromTree(bool aDeep, bool
//
// This can happen when the element changes the state of some ancestor up in
// the tree, for example.
//
// Note that clearing the data itself here would have its own set of problems,
// since the invariant we'd be breaking in that case is "HasServoData()
// implies InComposedDoc()", which we rely on in various places.
UnsetFlags(kAllServoDescendantBits);
+ if (document && document->GetServoRestyleRoot() == this) {
+ document->ClearServoRestyleRoot();
+ }
}
nsICSSDeclaration*
Element::GetSMILOverrideStyle()
{
Element::nsExtendedDOMSlots* slots = ExtendedDOMSlots();
if (!slots->mSMILOverrideStyle) {