From bc9886e177e08188be29e32a4a350fa57d109c4c Mon Sep 17 00:00:00 2001 From: kipp Date: Mon, 1 Jun 1998 23:39:40 +0000 Subject: [PATCH] Set first child during reflow unmapped; leave white space compression flag alone for zero sized frames git-svn-id: svn://10.0.0.236/trunk@2873 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsLineLayout.cpp | 9 ++++++--- mozilla/layout/html/base/src/nsLineLayout.cpp | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/mozilla/layout/generic/nsLineLayout.cpp b/mozilla/layout/generic/nsLineLayout.cpp index a8e88efc40d..3cff643ffb8 100644 --- a/mozilla/layout/generic/nsLineLayout.cpp +++ b/mozilla/layout/generic/nsLineLayout.cpp @@ -823,10 +823,12 @@ nsLineLayout::ReflowChild(nsReflowCommand* aReflowCommand, } #endif - // For non-aware children they act like words which means that space - // immediately following them must not be skipped over. + // Non-aware children that take up space act like words; which means + // that space immediately following them must not be skipped over. if (NS_LINE_LAYOUT_REFLOW_RESULT_NOT_AWARE == mReflowResult) { - mState.mSkipLeadingWhiteSpace = PR_FALSE; + if ((kidRect.width != 0) && (kidRect.height != 0)) { + mState.mSkipLeadingWhiteSpace = PR_FALSE; + } } // Now place the child @@ -1433,6 +1435,7 @@ nsLineLayout::ReflowUnmapped() } if (0 == mLine->mChildCount) { mLine->mFirstChild = mState.mKidFrame; + mBlock->SetFirstChild(mState.mKidFrame); } mLine->mChildCount++; diff --git a/mozilla/layout/html/base/src/nsLineLayout.cpp b/mozilla/layout/html/base/src/nsLineLayout.cpp index a8e88efc40d..3cff643ffb8 100644 --- a/mozilla/layout/html/base/src/nsLineLayout.cpp +++ b/mozilla/layout/html/base/src/nsLineLayout.cpp @@ -823,10 +823,12 @@ nsLineLayout::ReflowChild(nsReflowCommand* aReflowCommand, } #endif - // For non-aware children they act like words which means that space - // immediately following them must not be skipped over. + // Non-aware children that take up space act like words; which means + // that space immediately following them must not be skipped over. if (NS_LINE_LAYOUT_REFLOW_RESULT_NOT_AWARE == mReflowResult) { - mState.mSkipLeadingWhiteSpace = PR_FALSE; + if ((kidRect.width != 0) && (kidRect.height != 0)) { + mState.mSkipLeadingWhiteSpace = PR_FALSE; + } } // Now place the child @@ -1433,6 +1435,7 @@ nsLineLayout::ReflowUnmapped() } if (0 == mLine->mChildCount) { mLine->mFirstChild = mState.mKidFrame; + mBlock->SetFirstChild(mState.mKidFrame); } mLine->mChildCount++;