diff --git a/mozilla/layout/generic/nsFrameSetFrame.cpp b/mozilla/layout/generic/nsFrameSetFrame.cpp index 0e73a2a9531..01ce6f7fb24 100644 --- a/mozilla/layout/generic/nsFrameSetFrame.cpp +++ b/mozilla/layout/generic/nsFrameSetFrame.cpp @@ -1009,13 +1009,19 @@ nsHTMLFramesetFrame::Reflow(nsPresContext* aPresContext, height -= (mNumRows - 1) * borderWidth; if (height < 0) height = 0; + nsCOMPtr ourContent(do_QueryInterface(mContent)); + NS_ASSERTION(ourContent, "Someone gave us a broken frameset element!"); + const nsFramesetSpec* rowSpecs = nsnull; + const nsFramesetSpec* colSpecs = nsnull; + PRInt32 rows = 0; + PRInt32 cols = 0; + ourContent->GetRowSpec(&rows, &rowSpecs); + ourContent->GetColSpec(&cols, &colSpecs); + // If the number of cols or rows has changed, the frame for the frameset + // will be re-created. + NS_ENSURE_STATE(mNumRows == rows && mNumCols == cols); + if (!mDrag.mActive) { - nsCOMPtr ourContent(do_QueryInterface(mContent)); - NS_ASSERTION(ourContent, "Someone gave us a broken frameset element!"); - const nsFramesetSpec* rowSpecs = nsnull; - const nsFramesetSpec* colSpecs = nsnull; - ourContent->GetRowSpec(&mNumRows, &rowSpecs); - ourContent->GetColSpec(&mNumCols, &colSpecs); CalculateRowCol(aPresContext, width, mNumCols, colSpecs, mColSizes); CalculateRowCol(aPresContext, height, mNumRows, rowSpecs, mRowSizes); }