Bug 1360157: Assert that a display: contents child always has a parent. r=mats

MozReview-Commit-ID: Cyif2yCFu5

--HG--
extra : rebase_source : e32f308c4772507d549f7804b461d3fbecdfe4b6
This commit is contained in:
Emilio Cobos Álvarez 2017-04-27 12:36:07 +02:00
parent 8e0ac1894c
commit b27ac0ada8

View File

@ -8541,6 +8541,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer,
"display:contents nodes shouldn't have a frame");
if (!childFrame && GetDisplayContentsStyleFor(aChild)) {
nsIContent* ancestor = aContainer;
MOZ_ASSERT(ancestor, "display: contents on the root?");
while (!ancestor->GetPrimaryFrame()) {
// FIXME(emilio): Should this use the flattened tree parent instead?
ancestor = ancestor->GetParent();