Simplify code. Bug 367442 followup, jag's idea, r+sr=dbaron

This commit is contained in:
bzbarsky@mit.edu 2007-05-04 23:13:48 -07:00
Родитель d32b8338c4
Коммит 0c312f39a8
1 изменённых файлов: 6 добавлений и 5 удалений

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

@ -251,11 +251,12 @@ nsHTMLReflowState::SetComputedWidth(nscoord aComputedWidth)
// (like a text control, for example), we'll end up creating a reflow
// state for the parent while the parent is reflowing.
nscoord oldComputedWidth = mComputedWidth;
mComputedWidth = aComputedWidth;
if (mComputedWidth != oldComputedWidth &&
frame->GetType() != nsGkAtoms::viewportFrame) { // Or check GetParent()?
InitResizeFlags(frame->PresContext());
NS_PRECONDITION(aComputedWidth >= 0, "Invalid computed width");
if (mComputedWidth != aComputedWidth) {
mComputedWidth = aComputedWidth;
if (frame->GetType() != nsGkAtoms::viewportFrame) { // Or check GetParent()?
InitResizeFlags(frame->PresContext());
}
}
}