diff --git a/mozilla/layout/generic/nsSplittableFrame.cpp b/mozilla/layout/generic/nsSplittableFrame.cpp index 19a8a63b790..abf0864dc48 100644 --- a/mozilla/layout/generic/nsSplittableFrame.cpp +++ b/mozilla/layout/generic/nsSplittableFrame.cpp @@ -105,11 +105,9 @@ NS_METHOD nsSplittableFrame::SetNextInFlow(nsIFrame* aFrame) nsIFrame* nsSplittableFrame::GetFirstInFlow() const { - nsSplittableFrame* firstInFlow; - nsSplittableFrame* prevInFlow = (nsSplittableFrame*)this; - while (prevInFlow) { - firstInFlow = prevInFlow; - prevInFlow = (nsSplittableFrame*)firstInFlow->mPrevInFlow; + nsSplittableFrame* firstInFlow = (nsSplittableFrame*)this; + while (firstInFlow->mPrevInFlow) { + firstInFlow = (nsSplittableFrame*)firstInFlow->mPrevInFlow; } NS_POSTCONDITION(firstInFlow, "illegal state in flow chain."); return firstInFlow; @@ -117,11 +115,9 @@ nsIFrame* nsSplittableFrame::GetFirstInFlow() const nsIFrame* nsSplittableFrame::GetLastInFlow() const { - nsSplittableFrame* lastInFlow; - nsSplittableFrame* nextInFlow = (nsSplittableFrame*)this; - while (nextInFlow) { - lastInFlow = nextInFlow; - nextInFlow = (nsSplittableFrame*)lastInFlow->mNextInFlow; + nsSplittableFrame* lastInFlow = (nsSplittableFrame*)this; + while (lastInFlow->mNextInFlow) { + lastInFlow = (nsSplittableFrame*)lastInFlow->mNextInFlow; } NS_POSTCONDITION(lastInFlow, "illegal state in flow chain."); return lastInFlow; diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index dd8dc39512b..56582bfc881 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -966,11 +966,9 @@ nsContinuingTextFrame::Destroy(nsIPresContext* aPresContext) nsIFrame* nsContinuingTextFrame::GetFirstInFlow() const { - nsContinuingTextFrame* firstInFlow; - nsContinuingTextFrame* prevInFlow = (nsContinuingTextFrame*)this; - while (prevInFlow) { - firstInFlow = prevInFlow; - prevInFlow = (nsContinuingTextFrame*)firstInFlow->mPrevInFlow; + nsContinuingTextFrame* firstInFlow = (nsContinuingTextFrame*)this; + while (firstInFlow->mPrevInFlow) { + firstInFlow = (nsContinuingTextFrame*)firstInFlow->mPrevInFlow; } NS_POSTCONDITION(firstInFlow, "illegal state in flow chain."); return firstInFlow; @@ -1445,11 +1443,9 @@ nsTextFrame::GetCursor(nsIPresContext* aPresContext, nsIFrame* nsTextFrame::GetLastInFlow() const { - nsTextFrame* lastInFlow; - nsTextFrame* nextInFlow = (nsTextFrame*)this; - while (nextInFlow) { - lastInFlow = nextInFlow; - nextInFlow = (nsTextFrame*)lastInFlow->mNextInFlow; + nsTextFrame* lastInFlow = (nsTextFrame*)this; + while (lastInFlow->mNextInFlow) { + lastInFlow = (nsTextFrame*)lastInFlow->mNextInFlow; } NS_POSTCONDITION(lastInFlow, "illegal state in flow chain."); return lastInFlow; diff --git a/mozilla/layout/html/base/src/nsSplittableFrame.cpp b/mozilla/layout/html/base/src/nsSplittableFrame.cpp index 19a8a63b790..abf0864dc48 100644 --- a/mozilla/layout/html/base/src/nsSplittableFrame.cpp +++ b/mozilla/layout/html/base/src/nsSplittableFrame.cpp @@ -105,11 +105,9 @@ NS_METHOD nsSplittableFrame::SetNextInFlow(nsIFrame* aFrame) nsIFrame* nsSplittableFrame::GetFirstInFlow() const { - nsSplittableFrame* firstInFlow; - nsSplittableFrame* prevInFlow = (nsSplittableFrame*)this; - while (prevInFlow) { - firstInFlow = prevInFlow; - prevInFlow = (nsSplittableFrame*)firstInFlow->mPrevInFlow; + nsSplittableFrame* firstInFlow = (nsSplittableFrame*)this; + while (firstInFlow->mPrevInFlow) { + firstInFlow = (nsSplittableFrame*)firstInFlow->mPrevInFlow; } NS_POSTCONDITION(firstInFlow, "illegal state in flow chain."); return firstInFlow; @@ -117,11 +115,9 @@ nsIFrame* nsSplittableFrame::GetFirstInFlow() const nsIFrame* nsSplittableFrame::GetLastInFlow() const { - nsSplittableFrame* lastInFlow; - nsSplittableFrame* nextInFlow = (nsSplittableFrame*)this; - while (nextInFlow) { - lastInFlow = nextInFlow; - nextInFlow = (nsSplittableFrame*)lastInFlow->mNextInFlow; + nsSplittableFrame* lastInFlow = (nsSplittableFrame*)this; + while (lastInFlow->mNextInFlow) { + lastInFlow = (nsSplittableFrame*)lastInFlow->mNextInFlow; } NS_POSTCONDITION(lastInFlow, "illegal state in flow chain."); return lastInFlow; diff --git a/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp index dd8dc39512b..56582bfc881 100644 --- a/mozilla/layout/html/base/src/nsTextFrame.cpp +++ b/mozilla/layout/html/base/src/nsTextFrame.cpp @@ -966,11 +966,9 @@ nsContinuingTextFrame::Destroy(nsIPresContext* aPresContext) nsIFrame* nsContinuingTextFrame::GetFirstInFlow() const { - nsContinuingTextFrame* firstInFlow; - nsContinuingTextFrame* prevInFlow = (nsContinuingTextFrame*)this; - while (prevInFlow) { - firstInFlow = prevInFlow; - prevInFlow = (nsContinuingTextFrame*)firstInFlow->mPrevInFlow; + nsContinuingTextFrame* firstInFlow = (nsContinuingTextFrame*)this; + while (firstInFlow->mPrevInFlow) { + firstInFlow = (nsContinuingTextFrame*)firstInFlow->mPrevInFlow; } NS_POSTCONDITION(firstInFlow, "illegal state in flow chain."); return firstInFlow; @@ -1445,11 +1443,9 @@ nsTextFrame::GetCursor(nsIPresContext* aPresContext, nsIFrame* nsTextFrame::GetLastInFlow() const { - nsTextFrame* lastInFlow; - nsTextFrame* nextInFlow = (nsTextFrame*)this; - while (nextInFlow) { - lastInFlow = nextInFlow; - nextInFlow = (nsTextFrame*)lastInFlow->mNextInFlow; + nsTextFrame* lastInFlow = (nsTextFrame*)this; + while (lastInFlow->mNextInFlow) { + lastInFlow = (nsTextFrame*)lastInFlow->mNextInFlow; } NS_POSTCONDITION(lastInFlow, "illegal state in flow chain."); return lastInFlow;