Bug 1394935: Assert that the content we're marking dirty is under the restyle root. r?bholley
This would also have catched the bug earlier.
MozReview-Commit-ID: 8uNXPnpXk6m
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -4382,16 +4382,19 @@ NoteDirtyElement(Element* aElement, uint
// We didn't find a common ancestor element. That means we're descended
// from two different document style roots, so the common ancestor is the
// document.
doc->SetServoRestyleRoot(doc, existingBits | aBit);
}
}
MOZ_ASSERT(aElement == doc->GetServoRestyleRoot() ||
+ nsContentUtils::ContentIsFlattenedTreeDescendantOfForStyle(
+ aElement, doc->GetServoRestyleRoot()));
+ MOZ_ASSERT(aElement == doc->GetServoRestyleRoot() ||
BitIsPropagated(parent, aBit, doc->GetServoRestyleRoot()));
MOZ_ASSERT(doc->GetServoRestyleRootDirtyBits() & aBit);
}
void
Element::NoteDirtyForServo()
{
NoteDirtyElement(this, ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO);