зеркало из https://github.com/mozilla/gecko-dev.git
Fixed scroll-frame code to properly fill in the max-element-size
This commit is contained in:
Родитель
d54e47a11d
Коммит
55cb6eedb8
|
@ -338,7 +338,7 @@ nsScrollFrame::Reflow(nsIPresContext& aPresContext,
|
|||
nsSize kidReflowSize(scrollAreaSize.width, NS_UNCONSTRAINEDSIZE);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, mFirstChild, aReflowState,
|
||||
kidReflowSize);
|
||||
nsHTMLReflowMetrics kidDesiredSize(nsnull);
|
||||
nsHTMLReflowMetrics kidDesiredSize(aDesiredSize.maxElementSize);
|
||||
|
||||
ReflowChild(mFirstChild, aPresContext, kidDesiredSize, kidReflowState, aStatus);
|
||||
NS_ASSERTION(NS_FRAME_IS_COMPLETE(aStatus), "bad status");
|
||||
|
@ -405,6 +405,15 @@ nsScrollFrame::Reflow(nsIPresContext& aPresContext,
|
|||
aDesiredSize.height += NSToCoordRound(sbHeight);
|
||||
}
|
||||
|
||||
if (nsnull != aDesiredSize.maxElementSize) {
|
||||
nscoord maxWidth = aDesiredSize.maxElementSize->width;
|
||||
maxWidth += border.left + border.right + NSToCoordRound(sbWidth);
|
||||
nscoord maxHeight = aDesiredSize.maxElementSize->height;
|
||||
maxHeight += border.top + border.bottom;
|
||||
aDesiredSize.maxElementSize->width = maxWidth;
|
||||
aDesiredSize.maxElementSize->height = maxHeight;
|
||||
}
|
||||
|
||||
aDesiredSize.ascent = aDesiredSize.height;
|
||||
aDesiredSize.descent = 0;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче