Columns should invalidate the tree when their width changes, not just when

attributes that affect width change.  Bug 257237, r=varga, sr=roc
This commit is contained in:
bzbarsky%mit.edu 2004-09-30 22:41:23 +00:00
Родитель c4ff2082ae
Коммит 0c2720f14b
2 изменённых файлов: 21 добавлений и 7 удалений

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

@ -191,7 +191,24 @@ nsTreeColFrame::AttributeChanged(nsPresContext* aPresContext,
aNameSpaceID, aAttribute,
aModType);
if (aAttribute == nsHTMLAtoms::width || aAttribute == nsHTMLAtoms::hidden) {
if (aAttribute == nsXULAtoms::ordinal || aAttribute == nsXULAtoms::primary) {
EnsureColumns();
if (mColumns)
mColumns->InvalidateColumns();
}
return rv;
}
NS_IMETHODIMP
nsTreeColFrame::SetBounds(nsBoxLayoutState& aBoxLayoutState,
const nsRect& aRect,
PRBool aRemoveOverflowArea) {
nscoord oldWidth = mRect.width;
nsresult rv = nsBoxFrame::SetBounds(aBoxLayoutState, aRect,
aRemoveOverflowArea);
if (mRect.width != oldWidth) {
EnsureColumns();
if (mColumns) {
nsCOMPtr<nsITreeBoxObject> tree;
@ -200,12 +217,6 @@ nsTreeColFrame::AttributeChanged(nsPresContext* aPresContext,
tree->Invalidate();
}
}
else if (aAttribute == nsXULAtoms::ordinal || aAttribute == nsXULAtoms::primary) {
EnsureColumns();
if (mColumns)
mColumns->InvalidateColumns();
}
return rv;
}

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

@ -69,6 +69,9 @@ public:
nsIAtom* aAttribute,
PRInt32 aModType);
NS_IMETHOD SetBounds(nsBoxLayoutState& aBoxLayoutState, const nsRect& aRect,
PRBool aRemoveOverflowArea = PR_FALSE);
friend nsresult NS_NewTreeColFrame(nsIPresShell* aPresShell,
nsIFrame** aNewFrame,
PRBool aIsRoot,