зеркало из https://github.com/mozilla/pjs.git
Fix very bad reflow problem in nsBoxToBlockAdaptor (bug 119849). r=hewitt@netscape.com, sr=attinasi@netscape.com
This commit is contained in:
Родитель
be88a33114
Коммит
fda923d565
|
@ -1020,7 +1020,7 @@ nsBoxFrame::Reflow(nsIPresContext* aPresContext,
|
|||
aDesiredSize.width = r.width;
|
||||
aDesiredSize.height = r.height;
|
||||
aDesiredSize.ascent = ascent;
|
||||
aDesiredSize.descent = 0;
|
||||
aDesiredSize.descent = r.height - ascent;
|
||||
|
||||
// max sure the max element size reflects
|
||||
// our min width
|
||||
|
|
|
@ -530,7 +530,7 @@ nsBoxToBlockAdaptor::GetMaxSize(nsBoxLayoutState& aState, nsSize& aSize)
|
|||
} else {
|
||||
mMaxSize.width = NS_INTRINSICSIZE;
|
||||
mMaxSize.height = NS_INTRINSICSIZE;
|
||||
nsresult rv = nsBox::GetMaxSize(aState, mMaxSize);
|
||||
nsBox::GetMaxSize(aState, mMaxSize);
|
||||
}
|
||||
|
||||
aSize = mMaxSize;
|
||||
|
@ -593,7 +593,6 @@ nsBoxToBlockAdaptor::DoLayout(nsBoxLayoutState& aState)
|
|||
const nsHTMLReflowState* reflowState = aState.GetReflowState();
|
||||
nsIPresContext* presContext = aState.GetPresContext();
|
||||
nsReflowStatus status = NS_FRAME_COMPLETE;
|
||||
nsSize maxElementSize(0,0);
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
nsresult rv;
|
||||
|
||||
|
@ -607,8 +606,6 @@ nsBoxToBlockAdaptor::DoLayout(nsBoxLayoutState& aState)
|
|||
desiredSize.maxElementSize = &maxElementSize;
|
||||
}
|
||||
|
||||
nscoord origWidth = ourRect.width;
|
||||
|
||||
rv = Reflow(aState,
|
||||
presContext,
|
||||
desiredSize,
|
||||
|
@ -835,6 +832,15 @@ nsBoxToBlockAdaptor::Reflow(nsBoxLayoutState& aState,
|
|||
|
||||
NS_ASSERTION(NS_FRAME_IS_COMPLETE(aStatus), "bad status");
|
||||
|
||||
// Save the ascent. (bug 103925)
|
||||
PRBool isCollapsed = PR_FALSE;
|
||||
IsCollapsed(aState, isCollapsed);
|
||||
if (isCollapsed) {
|
||||
mAscent = 0;
|
||||
} else {
|
||||
mAscent = aDesiredSize.ascent;
|
||||
}
|
||||
|
||||
nsFrameState kidState;
|
||||
mFrame->GetFrameState(&kidState);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче