Bug 1427824: Remove invalid assertion in presence of display: contents. r?bz
MozReview-Commit-ID: 4jFGHcD5wds
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -6544,19 +6544,16 @@ nsCSSFrameConstructor::GetFloatContainin
*/
static nsIFrame*
FindAppendPrevSibling(nsIFrame* aParentFrame, nsIFrame* aNextSibling)
{
aParentFrame->DrainSelfOverflowList();
if (aNextSibling) {
MOZ_ASSERT(aNextSibling->GetParent() == aParentFrame, "Wrong parent");
- MOZ_ASSERT(aNextSibling->GetPrevSibling() ||
- aParentFrame->PrincipalChildList().FirstChild() == aNextSibling,
- "next sibling must be on the principal child list here");
return aNextSibling->GetPrevSibling();
}
return aParentFrame->GetChildList(kPrincipalList).LastChild();
}
/**
* Finds the right parent frame to append content to aParentFrame.
new file mode 100644
--- /dev/null
+++ b/layout/generic/crashtests/1427824.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<div id="container"></div>
+<script>
+let contents = document.createElement('div');
+contents.style.display = "contents";
+container.appendChild(contents);
+container.appendChild(document.createElement('colgroup'));
+container.offsetTop;
+contents.appendChild(document.createElement('colgroup'));
+</script>
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -671,8 +671,9 @@ load 1375858.html
load 1381134.html
load 1381134-2.html
load 1401420-1.html
load 1401709.html
load 1401807.html
load 1405443.html
load 1415185.html
load 1416544.html
+load 1427824.html