Fix for dogfood bug 41027 -r hyatt

This commit is contained in:
evaughan%netscape.com 2000-05-31 20:14:28 +00:00
parent 6c56f39224
commit 4401bea579
2 changed files with 13 additions and 2 deletions

View File

@ -326,8 +326,13 @@ nsSprocketLayout::Layout(nsIBox* aBox, nsBoxLayoutState& aState)
PRBool layout = PR_TRUE;
child->GetMargin(margin);
if (childRect.width >= margin.left + margin.right && childRect.height >= margin.top + margin.bottom)
childRect.Deflate(margin);
//if (childRect.width >= margin.left + margin.right && childRect.height >= margin.top + margin.bottom)
childRect.Deflate(margin);
if (childRect.width < 0)
childRect.width = 0;
if (childRect.height < 0)
childRect.height = 0;
if (passes > 0) {
layout = PR_FALSE;

View File

@ -232,6 +232,12 @@ nsStackLayout::Layout(nsIBox* aBox, nsBoxLayoutState& aState)
child->GetMargin(margin);
nsRect childRect(clientRect);
childRect.Deflate(margin);
if (childRect.width < 0)
childRect.width = 0;
if (childRect.height < 0)
childRect.height = 0;
child->SetBounds(aState, childRect);
child->Layout(aState);
child->GetBounds(childRect);