From 73484b3a0cc09a693da7e88bc9b3287c35e4e75d Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Fri, 21 Oct 2005 17:29:06 +0000 Subject: [PATCH] Fix bug 313173 and bug 312784 -- make sure to rebuild stuff as needed. r=neil, sr=roc git-svn-id: svn://10.0.0.236/trunk@182712 18797224-902f-48f8-a5cc-f745e15eee43 --- .../xul/base/src/grid/nsGridLayout2.cpp | 33 +++++++++++++++++++ .../layout/xul/base/src/grid/nsGridLayout2.h | 9 ++++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/mozilla/layout/xul/base/src/grid/nsGridLayout2.cpp b/mozilla/layout/xul/base/src/grid/nsGridLayout2.cpp index 142b3cffe05..157e669fe87 100644 --- a/mozilla/layout/xul/base/src/grid/nsGridLayout2.cpp +++ b/mozilla/layout/xul/base/src/grid/nsGridLayout2.cpp @@ -285,6 +285,39 @@ nsGridLayout2::GetRowCount(PRInt32& aRowCount) return NS_OK; } +NS_IMETHODIMP +nsGridLayout2::ChildrenInserted(nsIBox* aBox, nsBoxLayoutState& aState, + nsIBox* aPrevBox, nsIBox* aChildList) +{ + mGrid.NeedsRebuild(aState); + return NS_OK; +} + +NS_IMETHODIMP +nsGridLayout2::ChildrenAppended(nsIBox* aBox, nsBoxLayoutState& aState, + nsIBox* aChildList) +{ + mGrid.NeedsRebuild(aState); + return NS_OK; +} + + +NS_IMETHODIMP +nsGridLayout2::ChildrenRemoved(nsIBox* aBox, nsBoxLayoutState& aState, + nsIBox* aChildList) +{ + mGrid.NeedsRebuild(aState); + return NS_OK; +} + + +NS_IMETHODIMP +nsGridLayout2::ChildrenSet(nsIBox* aBox, nsBoxLayoutState& aState, + nsIBox* aChildList) +{ + mGrid.NeedsRebuild(aState); + return NS_OK; +} NS_IMPL_ADDREF_INHERITED(nsGridLayout2, nsStackLayout) NS_IMPL_RELEASE_INHERITED(nsGridLayout2, nsStackLayout) diff --git a/mozilla/layout/xul/base/src/grid/nsGridLayout2.h b/mozilla/layout/xul/base/src/grid/nsGridLayout2.h index a4d9fffccbe..bdb85adde25 100644 --- a/mozilla/layout/xul/base/src/grid/nsGridLayout2.h +++ b/mozilla/layout/xul/base/src/grid/nsGridLayout2.h @@ -75,7 +75,14 @@ public: NS_IMETHOD BuildRows(nsIBox* aBox, nsGridRow* aRows, PRInt32* aCount); NS_IMETHOD GetTotalMargin(nsIBox* aBox, nsMargin& aMargin, PRBool aIsHorizontal); NS_IMETHOD GetRowCount(PRInt32& aRowCount); - + NS_IMETHOD ChildrenInserted(nsIBox* aBox, nsBoxLayoutState& aState, + nsIBox* aPrevBox, nsIBox* aChildList); + NS_IMETHOD ChildrenAppended(nsIBox* aBox, nsBoxLayoutState& aState, + nsIBox* aChildList); + NS_IMETHOD ChildrenRemoved(nsIBox* aBox, nsBoxLayoutState& aState, + nsIBox* aChildList); + NS_IMETHOD ChildrenSet(nsIBox* aBox, nsBoxLayoutState& aState, + nsIBox* aChildList); protected: nsGridLayout2(nsIPresShell* aShell);