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