Bug 462972 - 'Fix nsChangeHint comparisons'. r=bernd, sr=dbaron

This commit is contained in:
Robert O'Callahan 2008-11-04 14:03:14 -08:00
parent 251b555c48
commit d3c750c6de

View File

@ -4721,11 +4721,11 @@ nsTableFrame::BCRecalcNeeded(nsStyleContext* aOldStyleContext,
const nsStyleBorder* newStyleData = aNewStyleContext->GetStyleBorder();
nsChangeHint change = newStyleData->CalcDifference(*oldStyleData);
if (change == NS_STYLE_HINT_NONE)
if (!change)
return PR_FALSE;
if ((change & NS_STYLE_HINT_REFLOW) == NS_STYLE_HINT_REFLOW)
if (change & nsChangeHint_ReflowFrame)
return PR_TRUE; // the caller only needs to mark the bc damage area
if ((change & NS_STYLE_HINT_VISUAL) == NS_STYLE_HINT_VISUAL) {
if (change & nsChangeHint_RepaintFrame) {
// we need to recompute the borders and the caller needs to mark
// the bc damage area
// XXX In principle this should only be necessary for border style changes