From 22c664a2500fe5beca37dbfa10380cfe81cbcfd3 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Wed, 29 Sep 2004 02:18:25 +0000 Subject: [PATCH] Bug 260896. When a floating first-letter frame reports FRAME_IS_NOT_COMPLETE after reflow, (then unlike blocks) that does NOT mean that it needs to continue on the next page! It just means it has an inline continuation. So correct its reflow status early in ReflowFloat so that we don't confuse the heck out of block reflow. r+sr=dbaron git-svn-id: svn://10.0.0.236/trunk@162931 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsBlockFrame.cpp | 8 ++++++++ mozilla/layout/generic/nsLineLayout.cpp | 5 ----- mozilla/layout/html/base/src/nsBlockFrame.cpp | 8 ++++++++ mozilla/layout/html/base/src/nsLineLayout.cpp | 5 ----- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 3493e4b9d7b..b10e278a3c8 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -5109,6 +5109,14 @@ nsBlockFrame::ReflowFloat(nsBlockReflowState& aState, } } + if (floatFrame->GetType() == nsLayoutAtoms::letterFrame) { + // We never split floating first letters; an incomplete state for + // such frames simply means that there is more content to be + // reflowed on the line. + if (NS_FRAME_IS_NOT_COMPLETE(aReflowStatus)) + aReflowStatus = NS_FRAME_COMPLETE; + } + // Remove the float from the reflow tree. if (aState.mReflowState.path) aState.mReflowState.path->RemoveChild(floatFrame); diff --git a/mozilla/layout/generic/nsLineLayout.cpp b/mozilla/layout/generic/nsLineLayout.cpp index d0a8e470526..d99f5c110b7 100644 --- a/mozilla/layout/generic/nsLineLayout.cpp +++ b/mozilla/layout/generic/nsLineLayout.cpp @@ -1014,11 +1014,6 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, } if (outOfFlowFrame->GetType() == nsLayoutAtoms::letterFrame) { SetFlag(LL_FIRSTLETTERSTYLEOK, PR_FALSE); - // An incomplete reflow status means we should split the - // float if the height is constrained (bug 145305). We - // never split floating first letters. - if (NS_FRAME_IS_NOT_COMPLETE(aReflowStatus)) - aReflowStatus = NS_FRAME_COMPLETE; } } } diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index 3493e4b9d7b..b10e278a3c8 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -5109,6 +5109,14 @@ nsBlockFrame::ReflowFloat(nsBlockReflowState& aState, } } + if (floatFrame->GetType() == nsLayoutAtoms::letterFrame) { + // We never split floating first letters; an incomplete state for + // such frames simply means that there is more content to be + // reflowed on the line. + if (NS_FRAME_IS_NOT_COMPLETE(aReflowStatus)) + aReflowStatus = NS_FRAME_COMPLETE; + } + // Remove the float from the reflow tree. if (aState.mReflowState.path) aState.mReflowState.path->RemoveChild(floatFrame); diff --git a/mozilla/layout/html/base/src/nsLineLayout.cpp b/mozilla/layout/html/base/src/nsLineLayout.cpp index d0a8e470526..d99f5c110b7 100644 --- a/mozilla/layout/html/base/src/nsLineLayout.cpp +++ b/mozilla/layout/html/base/src/nsLineLayout.cpp @@ -1014,11 +1014,6 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, } if (outOfFlowFrame->GetType() == nsLayoutAtoms::letterFrame) { SetFlag(LL_FIRSTLETTERSTYLEOK, PR_FALSE); - // An incomplete reflow status means we should split the - // float if the height is constrained (bug 145305). We - // never split floating first letters. - if (NS_FRAME_IS_NOT_COMPLETE(aReflowStatus)) - aReflowStatus = NS_FRAME_COMPLETE; } } }