зеркало из https://github.com/mozilla/pjs.git
bug 148245 - only split floaters when printing if the height is constrained, never split floating first letters. sr=waterson
This commit is contained in:
Родитель
7c0ab7bf80
Коммит
912de824e6
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче