mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-28 00:07:28 +00:00
Bug 133708 Simplify nsStyleList::CalcDifference
r=dbaron sr=brendan
This commit is contained in:
parent
2a08bcb325
commit
5813d0cd92
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user