Bug 1394935: Assert that the content we're marking dirty is under the restyle root. r=bholley
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 31 Aug 2017 09:42:21 +0200
changeset 378071 9fad64b68cbcad16f98e00cb026366bd40cc0bc9
parent 378070 5ededad9baca82c9f00e2a2d0232d021a8c5890b
child 378072 089cbcabf67aee48a15d86b7db992f15883b92b4
push id32421
push userarchaeopteryx@coole-files.de
push dateFri, 01 Sep 2017 08:31:26 +0000
treeherdermozilla-central@583e73fb8e3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1394935
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
dom/base/Element.cpp
--- 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);