зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
c6d6180efa
Коммит
b41b54e79e
|
@ -212,10 +212,12 @@ nsListBoxLayout::LayoutInternal(nsIBox* aBox, nsBoxLayoutState& aState)
|
||||||
box->HasDirtyChildren(dirtyChildren);
|
box->HasDirtyChildren(dirtyChildren);
|
||||||
|
|
||||||
nsRect childRect;
|
nsRect childRect;
|
||||||
|
box->GetBounds(childRect);
|
||||||
box->GetMargin(margin);
|
box->GetMargin(margin);
|
||||||
|
|
||||||
// relayout if we must or we are dirty or some of our children are dirty
|
// 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.x = 0;
|
||||||
childRect.y = yOffset;
|
childRect.y = yOffset;
|
||||||
childRect.width = clientRect.width;
|
childRect.width = clientRect.width;
|
||||||
|
@ -232,7 +234,6 @@ nsListBoxLayout::LayoutInternal(nsIBox* aBox, nsBoxLayoutState& aState)
|
||||||
} else {
|
} else {
|
||||||
// if the child did not need to be relayed out. Then its easy.
|
// 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.
|
// Place the child by just grabbing its rect and adjusting the y.
|
||||||
box->GetBounds(childRect);
|
|
||||||
PRInt32 newPos = yOffset+margin.top;
|
PRInt32 newPos = yOffset+margin.top;
|
||||||
|
|
||||||
// are we pushing down or pulling up any rows?
|
// are we pushing down or pulling up any rows?
|
||||||
|
|
Загрузка…
Ссылка в новой задаче