Bug 1404134: Drop assertion that can be hit mid-unbind. r?heycam draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 02 Oct 2017 08:50:20 +0200
changeset 673265 52e5dbb55c2646b8fe9ef08b07971f41ff1d9775
parent 673136 3cfe8f48847512909238760bcf8410115cb55ad6
child 734047 51abff8dfbeca880cdabbf3400a522f061e3af9b
push id82514
push userbmo:emilio@crisal.io
push dateMon, 02 Oct 2017 07:30:48 +0000
Bug 1404134: Drop assertion that can be hit mid-unbind. r?heycam On that test-case we have something like: <body restyle-root> <element dirty-descendants> <element-2> </element> </body> If we change the state of element-2 after unbinding the <body>, which clears the body's flags, but not the children's flags, there'll be no restyle root, even though our parent has the relevant flags anyway. This doesn't compromise correctness in any way, so I'd rather drop the assertion that shuffle a bunch of stuff so it holds. MozReview-Commit-ID: KFVTkXclKST
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -4420,17 +4420,16 @@ NoteDirtyElement(Element* aElement, uint
     // when it happens. Nothing left to do.
     if (!parent->HasServoData()) {
     // Similarly, if our parent already has the bit we're propagating, we can
     // assume everything is already set up.
     if (parent->HasAllFlags(aBits)) {
-      MOZ_ASSERT(aElement->GetComposedDoc()->GetServoRestyleRoot());
     // If the parent is styled but is display:none, we're done.
     // We check for a frame to reduce the cases where we need the FFI call.
     if (!parent->GetPrimaryFrame() && Servo_Element_IsDisplayNone(parent)) {