Bug 1360157 - Assert that a display: contents child always has a parent

Tag #1375
This commit is contained in:
Matt A. Tobin 2020-04-17 05:25:20 -04:00 committed by Roy Tam
commit 34d576d55d

View file

@ -8296,6 +8296,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();