Changed Reflow() to make sure that the child is sized at least as big as the max size

we gave it as part of the reflow command
This commit is contained in:
troy%netscape.com 1998-11-18 23:49:44 +00:00
Родитель 2704631ee5
Коммит d4cf65cd18
2 изменённых файлов: 18 добавлений и 2 удалений

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

@ -201,7 +201,15 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
if (NS_OK == mFirstChild->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow)) {
ReflowChild(mFirstChild, aPresContext, desiredSize, kidReflowState, aStatus);
// Place and size the child
// Place and size the child. Because we told the child it was fixed make sure
// it's at least as big as we told it. This handles the case where the child
// ignores the reflow state constraints
if (desiredSize.width < kidMaxSize.width) {
desiredSize.width = kidMaxSize.width;
}
if (desiredSize.height < kidMaxSize.height) {
desiredSize.height = kidMaxSize.height;
}
nsRect rect(borderPadding.left, borderPadding.top, desiredSize.width, desiredSize.height);
mFirstChild->SetRect(rect);

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

@ -201,7 +201,15 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
if (NS_OK == mFirstChild->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow)) {
ReflowChild(mFirstChild, aPresContext, desiredSize, kidReflowState, aStatus);
// Place and size the child
// Place and size the child. Because we told the child it was fixed make sure
// it's at least as big as we told it. This handles the case where the child
// ignores the reflow state constraints
if (desiredSize.width < kidMaxSize.width) {
desiredSize.width = kidMaxSize.width;
}
if (desiredSize.height < kidMaxSize.height) {
desiredSize.height = kidMaxSize.height;
}
nsRect rect(borderPadding.left, borderPadding.top, desiredSize.width, desiredSize.height);
mFirstChild->SetRect(rect);