Fix test for none/hidden border styles to work correctly. Bug 275139, r+sr=dbaron

This commit is contained in:
bzbarsky%mit.edu 2005-01-20 16:49:57 +00:00
Родитель 09a1f1b71b
Коммит 5237da9666
1 изменённых файлов: 9 добавлений и 5 удалений

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

@ -544,11 +544,15 @@ nsChangeHint nsStyleBorder::CalcDifference(const nsStyleBorder& aOther) const
NS_FOR_CSS_SIDES(ix) {
if ((mBorderStyle[ix] != aOther.mBorderStyle[ix]) ||
(mBorderColor[ix] != aOther.mBorderColor[ix])) {
if ((mBorderStyle[ix] != aOther.mBorderStyle[ix]) &&
((NS_STYLE_BORDER_STYLE_NONE == mBorderStyle[ix]) ||
(NS_STYLE_BORDER_STYLE_NONE == aOther.mBorderStyle[ix]) ||
(NS_STYLE_BORDER_STYLE_HIDDEN == mBorderStyle[ix]) || // bug 45754
(NS_STYLE_BORDER_STYLE_HIDDEN == aOther.mBorderStyle[ix]))) {
if (mBorderStyle[ix] != aOther.mBorderStyle[ix] &&
(NS_STYLE_BORDER_STYLE_NONE ==
(mBorderStyle[ix] & BORDER_STYLE_MASK) ||
NS_STYLE_BORDER_STYLE_NONE ==
(aOther.mBorderStyle[ix] & BORDER_STYLE_MASK) ||
NS_STYLE_BORDER_STYLE_HIDDEN ==
(mBorderStyle[ix] & BORDER_STYLE_MASK) || // bug 45754
NS_STYLE_BORDER_STYLE_HIDDEN ==
(aOther.mBorderStyle[ix] & BORDER_STYLE_MASK))) {
return NS_STYLE_HINT_REFLOW; // border on or off
}
return NS_STYLE_HINT_VISUAL;