зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
2704631ee5
Коммит
d4cf65cd18
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче