This commit is contained in:
Olli.Pettay@helsinki.fi 2007-03-22 16:57:55 -07:00
Родитель 6e752fb3b8
Коммит ccf98274c5
1 изменённых файлов: 12 добавлений и 6 удалений

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

@ -1009,13 +1009,19 @@ nsHTMLFramesetFrame::Reflow(nsPresContext* aPresContext,
height -= (mNumRows - 1) * borderWidth; height -= (mNumRows - 1) * borderWidth;
if (height < 0) height = 0; if (height < 0) height = 0;
nsCOMPtr<nsIFrameSetElement> 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) { if (!mDrag.mActive) {
nsCOMPtr<nsIFrameSetElement> 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, width, mNumCols, colSpecs, mColSizes);
CalculateRowCol(aPresContext, height, mNumRows, rowSpecs, mRowSizes); CalculateRowCol(aPresContext, height, mNumRows, rowSpecs, mRowSizes);
} }