Introduce a setter for nsHTMLReflowState::mComputedHeight so that we're sure to

update the resize flags properly.  Bug 388084, r+sr+a=dbaron
This commit is contained in:
2007-08-02 11:08:05 -07:00
parent 0aff330af7
commit 368c29ae32
34 changed files with 164 additions and 124 deletions

View File

@@ -303,8 +303,8 @@ nsHTMLButtonControlFrame::Reflow(nsPresContext* aPresContext,
aDesiredSize.width = aReflowState.ComputedWidth();
// If computed use the computed value.
if (aReflowState.mComputedHeight != NS_INTRINSICSIZE)
aDesiredSize.height = aReflowState.mComputedHeight;
if (aReflowState.ComputedHeight() != NS_INTRINSICSIZE)
aDesiredSize.height = aReflowState.ComputedHeight();
else
aDesiredSize.height += focusPadding.TopBottom();
@@ -384,8 +384,8 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
// center child vertically
nscoord yoff = 0;
if (aReflowState.mComputedHeight != NS_INTRINSICSIZE) {
yoff = (aReflowState.mComputedHeight - aDesiredSize.height)/2;
if (aReflowState.ComputedHeight() != NS_INTRINSICSIZE) {
yoff = (aReflowState.ComputedHeight() - aDesiredSize.height)/2;
if (yoff < 0) {
yoff = 0;
}