Bug 131883 All filenames of attachment disappeared by resizing attachment area;

r=hewitt, sr=scc, a=scc
Force listitem's rect to be recalculated when its parent was going wider.
This commit is contained in:
kyle.yuan%sun.com 2002-07-18 02:19:12 +00:00
Родитель dc81135dda
Коммит 55abaa2cb6
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -212,10 +212,12 @@ nsListBoxLayout::LayoutInternal(nsIBox* aBox, nsBoxLayoutState& aState)
box->HasDirtyChildren(dirtyChildren);
nsRect childRect;
box->GetBounds(childRect);
box->GetMargin(margin);
// relayout if we must or we are dirty or some of our children are dirty
if (relayout || dirty || dirtyChildren) {
// or the client area is wider than us
if (relayout || dirty || dirtyChildren || childRect.width < clientRect.width) {
childRect.x = 0;
childRect.y = yOffset;
childRect.width = clientRect.width;
@ -232,7 +234,6 @@ nsListBoxLayout::LayoutInternal(nsIBox* aBox, nsBoxLayoutState& aState)
} else {
// if the child did not need to be relayed out. Then its easy.
// Place the child by just grabbing its rect and adjusting the y.
box->GetBounds(childRect);
PRInt32 newPos = yOffset+margin.top;
// are we pushing down or pulling up any rows?