From cfbe9cf517f7fa8fd70cb4494e4ff2d51da2bda0 Mon Sep 17 00:00:00 2001 From: "dbaron%dbaron.org" Date: Sun, 18 Jan 2004 07:13:40 +0000 Subject: [PATCH] Remove unneeded casts and extra shadowing variable. git-svn-id: svn://10.0.0.236/trunk@151486 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsHTMLReflowState.cpp | 7 ++----- mozilla/layout/html/base/src/nsHTMLReflowState.cpp | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/mozilla/layout/generic/nsHTMLReflowState.cpp b/mozilla/layout/generic/nsHTMLReflowState.cpp index 1959a3db516..7414d79bb34 100644 --- a/mozilla/layout/generic/nsHTMLReflowState.cpp +++ b/mozilla/layout/generic/nsHTMLReflowState.cpp @@ -1646,15 +1646,13 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext, fType = f->GetType(); if (nsLayoutAtoms::scrollFrame == fType) { // Use the scroll frame's computed height instead - aContainingBlockHeight = - ((nsHTMLReflowState*)cbrs->parentReflowState)->mComputedHeight; + aContainingBlockHeight = cbrs->parentReflowState->mComputedHeight; } else { fType = cbrs->frame->GetType(); if (IS_TABLE_CELL(fType)) { // use the cell's computed height - aContainingBlockHeight = - ((nsHTMLReflowState*)cbrs)->mComputedHeight; + aContainingBlockHeight = cbrs->mComputedHeight; } } } @@ -1707,7 +1705,6 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext, // used to be called exclusively. if (NS_FRAME_REPLACED(NS_CSS_FRAME_TYPE_INLINE) == mFrameType) { // Get the containing block reflow state - const nsHTMLReflowState* cbrs = parentReflowState->mCBReflowState; NS_ASSERTION(nsnull != cbrs, "no containing block"); // in quirks mode, get the cb height using the special quirk method if (eCompatibility_NavQuirks == aPresContext->CompatibilityMode()) { diff --git a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp index 1959a3db516..7414d79bb34 100644 --- a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp +++ b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp @@ -1646,15 +1646,13 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext, fType = f->GetType(); if (nsLayoutAtoms::scrollFrame == fType) { // Use the scroll frame's computed height instead - aContainingBlockHeight = - ((nsHTMLReflowState*)cbrs->parentReflowState)->mComputedHeight; + aContainingBlockHeight = cbrs->parentReflowState->mComputedHeight; } else { fType = cbrs->frame->GetType(); if (IS_TABLE_CELL(fType)) { // use the cell's computed height - aContainingBlockHeight = - ((nsHTMLReflowState*)cbrs)->mComputedHeight; + aContainingBlockHeight = cbrs->mComputedHeight; } } } @@ -1707,7 +1705,6 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext, // used to be called exclusively. if (NS_FRAME_REPLACED(NS_CSS_FRAME_TYPE_INLINE) == mFrameType) { // Get the containing block reflow state - const nsHTMLReflowState* cbrs = parentReflowState->mCBReflowState; NS_ASSERTION(nsnull != cbrs, "no containing block"); // in quirks mode, get the cb height using the special quirk method if (eCompatibility_NavQuirks == aPresContext->CompatibilityMode()) {