bug 148245 - only split floaters when printing if the height is constrained, never split floating first letters. sr=waterson

This commit is contained in:
karnaze%netscape.com 2002-06-14 14:30:33 +00:00
Родитель 7c0ab7bf80
Коммит 912de824e6
6 изменённых файлов: 22 добавлений и 0 удалений

Просмотреть файл

@ -5305,6 +5305,11 @@ nsBlockFrame::ReflowFloater(nsBlockReflowState& aState,
nsresult rv = brc.ReflowBlock(floater, availSpace, PR_TRUE, margin,
isAdjacentWithTop,
aComputedOffsetsResult, aReflowStatus);
// An incomplete reflow status means we should split the floater
// if the height is constrained (bug 145305).
if (NS_FRAME_IS_NOT_COMPLETE(aReflowStatus) && (NS_UNCONSTRAINEDSIZE == availHeight))
aReflowStatus = NS_FRAME_COMPLETE;
if (NS_SUCCEEDED(rv) && isAutoWidth) {
nscoord maxElementWidth = brc.GetMaxElementSize().width;
if (maxElementWidth > availSpace.width) {

Просмотреть файл

@ -404,6 +404,8 @@ protected:
nsIFrame* aFrame,
PRUint8* aLineReflowStatus);
// An incomplete aReflowStatus indicates the floater should be split
// but only if the available height is constrained.
nsresult ReflowFloater(nsBlockReflowState& aState,
nsPlaceholderFrame* aPlaceholder,
nsRect& aCombinedRectResult,

Просмотреть файл

@ -1174,6 +1174,10 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
if (oofft) {
if (oofft == nsLayoutAtoms::letterFrame) {
SetFlag(LL_FIRSTLETTERSTYLEOK, PR_FALSE);
// An incomplete reflow status means we should split the floater if the
// height is constrained (bug 145305). We never split floating first letters.
if (NS_FRAME_IS_NOT_COMPLETE(aReflowStatus))
aReflowStatus = NS_FRAME_COMPLETE;
}
NS_RELEASE(oofft);
}

Просмотреть файл

@ -5305,6 +5305,11 @@ nsBlockFrame::ReflowFloater(nsBlockReflowState& aState,
nsresult rv = brc.ReflowBlock(floater, availSpace, PR_TRUE, margin,
isAdjacentWithTop,
aComputedOffsetsResult, aReflowStatus);
// An incomplete reflow status means we should split the floater
// if the height is constrained (bug 145305).
if (NS_FRAME_IS_NOT_COMPLETE(aReflowStatus) && (NS_UNCONSTRAINEDSIZE == availHeight))
aReflowStatus = NS_FRAME_COMPLETE;
if (NS_SUCCEEDED(rv) && isAutoWidth) {
nscoord maxElementWidth = brc.GetMaxElementSize().width;
if (maxElementWidth > availSpace.width) {

Просмотреть файл

@ -404,6 +404,8 @@ protected:
nsIFrame* aFrame,
PRUint8* aLineReflowStatus);
// An incomplete aReflowStatus indicates the floater should be split
// but only if the available height is constrained.
nsresult ReflowFloater(nsBlockReflowState& aState,
nsPlaceholderFrame* aPlaceholder,
nsRect& aCombinedRectResult,

Просмотреть файл

@ -1174,6 +1174,10 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
if (oofft) {
if (oofft == nsLayoutAtoms::letterFrame) {
SetFlag(LL_FIRSTLETTERSTYLEOK, PR_FALSE);
// An incomplete reflow status means we should split the floater if the
// height is constrained (bug 145305). We never split floating first letters.
if (NS_FRAME_IS_NOT_COMPLETE(aReflowStatus))
aReflowStatus = NS_FRAME_COMPLETE;
}
NS_RELEASE(oofft);
}