diff --git a/mozilla/layout/generic/nsLineLayout.cpp b/mozilla/layout/generic/nsLineLayout.cpp index 612d5d82f91..adcc8df82a0 100644 --- a/mozilla/layout/generic/nsLineLayout.cpp +++ b/mozilla/layout/generic/nsLineLayout.cpp @@ -108,6 +108,19 @@ nsLineData::Verify(PRBool aFinalCheck) const NS_ASSERTION(len == mChildCount, "bad child count"); } + if (1 == mChildCount) { + if (mIsBlock) { + nsIFrame* child = mFirstChild; + nsIStyleContext* sc; + child->GetStyleContext(nsnull, sc); + nsStyleDisplay* display = (nsStyleDisplay*) + sc->GetData(eStyleStruct_Display); + NS_ASSERTION((NS_STYLE_DISPLAY_BLOCK == display->mDisplay) || + (NS_STYLE_DISPLAY_LIST_ITEM == display->mDisplay), + "bad mIsBlock state"); + } + } + // XXX verify content offsets and mLastContentIsComplete return NS_OK; } diff --git a/mozilla/layout/html/base/src/nsLineLayout.cpp b/mozilla/layout/html/base/src/nsLineLayout.cpp index 612d5d82f91..adcc8df82a0 100644 --- a/mozilla/layout/html/base/src/nsLineLayout.cpp +++ b/mozilla/layout/html/base/src/nsLineLayout.cpp @@ -108,6 +108,19 @@ nsLineData::Verify(PRBool aFinalCheck) const NS_ASSERTION(len == mChildCount, "bad child count"); } + if (1 == mChildCount) { + if (mIsBlock) { + nsIFrame* child = mFirstChild; + nsIStyleContext* sc; + child->GetStyleContext(nsnull, sc); + nsStyleDisplay* display = (nsStyleDisplay*) + sc->GetData(eStyleStruct_Display); + NS_ASSERTION((NS_STYLE_DISPLAY_BLOCK == display->mDisplay) || + (NS_STYLE_DISPLAY_LIST_ITEM == display->mDisplay), + "bad mIsBlock state"); + } + } + // XXX verify content offsets and mLastContentIsComplete return NS_OK; }