Bug 133708 Simplify nsStyleList::CalcDifference

r=dbaron sr=brendan
This commit is contained in:
timeless%mozdev.org 2002-11-06 07:31:27 +00:00
parent 2a08bcb325
commit 5813d0cd92
2 changed files with 18 additions and 24 deletions

View File

@ -702,18 +702,15 @@ nsStyleList::nsStyleList(const nsStyleList& aSource)
nsChangeHint nsStyleList::CalcDifference(const nsStyleList& aOther) const
{
if (mListStylePosition == aOther.mListStylePosition)
if (mListStyleImage == aOther.mListStyleImage)
if (mListStyleType == aOther.mListStyleType) {
if (mImageRegion == aOther.mImageRegion)
return NS_STYLE_HINT_NONE;
if (mImageRegion.width == aOther.mImageRegion.width &&
mImageRegion.height == aOther.mImageRegion.height)
return NS_STYLE_HINT_VISUAL;
return NS_STYLE_HINT_REFLOW;
}
return NS_STYLE_HINT_REFLOW;
return NS_STYLE_HINT_REFLOW;
if (mListStylePosition == aOther.mListStylePosition &&
mListStyleImage == aOther.mListStyleImage &&
mListStyleType == aOther.mListStyleType) {
if (mImageRegion == aOther.mImageRegion)
return NS_STYLE_HINT_NONE;
if (mImageRegion.width == aOther.mImageRegion.width &&
mImageRegion.height == aOther.mImageRegion.height)
return NS_STYLE_HINT_VISUAL;
}
return NS_STYLE_HINT_REFLOW;
}

View File

@ -702,18 +702,15 @@ nsStyleList::nsStyleList(const nsStyleList& aSource)
nsChangeHint nsStyleList::CalcDifference(const nsStyleList& aOther) const
{
if (mListStylePosition == aOther.mListStylePosition)
if (mListStyleImage == aOther.mListStyleImage)
if (mListStyleType == aOther.mListStyleType) {
if (mImageRegion == aOther.mImageRegion)
return NS_STYLE_HINT_NONE;
if (mImageRegion.width == aOther.mImageRegion.width &&
mImageRegion.height == aOther.mImageRegion.height)
return NS_STYLE_HINT_VISUAL;
return NS_STYLE_HINT_REFLOW;
}
return NS_STYLE_HINT_REFLOW;
return NS_STYLE_HINT_REFLOW;
if (mListStylePosition == aOther.mListStylePosition &&
mListStyleImage == aOther.mListStyleImage &&
mListStyleType == aOther.mListStyleType) {
if (mImageRegion == aOther.mImageRegion)
return NS_STYLE_HINT_NONE;
if (mImageRegion.width == aOther.mImageRegion.width &&
mImageRegion.height == aOther.mImageRegion.height)
return NS_STYLE_HINT_VISUAL;
}
return NS_STYLE_HINT_REFLOW;
}