Bug 287592. Make buttons return the correct overflow area from reflow. r+sr=dbaron

This commit is contained in:
roc+%cs.cmu.edu 2005-03-31 02:19:48 +00:00
Родитель b23f6ccc28
Коммит 5407685688
2 изменённых файлов: 5 добавлений и 4 удалений

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

@ -549,8 +549,8 @@ nsFormControlFrame::Reflow(nsPresContext* aPresContext,
aStatus = NS_FRAME_COMPLETE;
SetupCachedSizes(mCacheSize, mCachedAscent, mCachedMaxElementWidth, aDesiredSize);
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
nsRect overflowStartRect(0, 0, aDesiredSize.width, aDesiredSize.height);
FinishAndStoreOverflow(&overflowStartRect, overflowStartRect.Size());
aDesiredSize.mOverflowArea = nsRect(0, 0, aDesiredSize.width, aDesiredSize.height);
FinishAndStoreOverflow(&aDesiredSize);
return rv;
}

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

@ -488,8 +488,9 @@ nsHTMLButtonControlFrame::Reflow(nsPresContext* aPresContext,
aDesiredSize.ascent += aReflowState.mComputedBorderPadding.top + focusPadding.top;
aDesiredSize.descent = aDesiredSize.height - aDesiredSize.ascent;
nsRect buttonRect(0, 0, aDesiredSize.width, aDesiredSize.height);
FinishAndStoreOverflow(&buttonRect, buttonRect.Size());
aDesiredSize.mOverflowArea = nsRect(0, 0, aDesiredSize.width, aDesiredSize.height);
ConsiderChildOverflow(aDesiredSize.mOverflowArea, firstKid);
FinishAndStoreOverflow(&aDesiredSize);
aStatus = NS_FRAME_COMPLETE;