From d9140404fc30f58444e0636cc643db565ed77c64 Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Wed, 6 Nov 2002 07:31:27 +0000 Subject: [PATCH] Bug 133708 Simplify nsStyleList::CalcDifference r=dbaron sr=brendan git-svn-id: svn://10.0.0.236/trunk@133134 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/shared/src/nsStyleStruct.cpp | 21 +++++++++----------- mozilla/layout/style/nsStyleStruct.cpp | 21 +++++++++----------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/mozilla/content/shared/src/nsStyleStruct.cpp b/mozilla/content/shared/src/nsStyleStruct.cpp index bba524082b3..dee1196d0ef 100644 --- a/mozilla/content/shared/src/nsStyleStruct.cpp +++ b/mozilla/content/shared/src/nsStyleStruct.cpp @@ -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; } diff --git a/mozilla/layout/style/nsStyleStruct.cpp b/mozilla/layout/style/nsStyleStruct.cpp index bba524082b3..dee1196d0ef 100644 --- a/mozilla/layout/style/nsStyleStruct.cpp +++ b/mozilla/layout/style/nsStyleStruct.cpp @@ -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; }