From 8d07a8a9620ac796fc80d78e80fcc70ff52dc93d Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Tue, 20 Jul 1999 03:51:46 +0000 Subject: [PATCH] Added 'm' prefix to a couple more data members of nsHTMLReflowState struct git-svn-id: svn://10.0.0.236/trunk@40217 18797224-902f-48f8-a5cc-f745e15eee43 --- .../generic/nsAbsoluteContainingBlock.cpp | 12 +-- mozilla/layout/generic/nsBRFrame.cpp | 4 +- mozilla/layout/generic/nsBlockFrame.cpp | 2 +- .../layout/generic/nsBlockReflowContext.cpp | 4 +- mozilla/layout/generic/nsBlockReflowState.cpp | 2 +- mozilla/layout/generic/nsBlockReflowState.h | 2 +- mozilla/layout/generic/nsFirstLetterFrame.cpp | 4 +- mozilla/layout/generic/nsHTMLReflowState.cpp | 92 +++++++++---------- mozilla/layout/generic/nsInlineFrame.cpp | 12 +-- mozilla/layout/generic/nsLineLayout.cpp | 4 +- mozilla/layout/generic/nsTextFrame.cpp | 4 +- mozilla/layout/generic/nsViewportFrame.cpp | 4 +- .../base/src/nsAbsoluteContainingBlock.cpp | 12 +-- mozilla/layout/html/base/src/nsBRFrame.cpp | 4 +- mozilla/layout/html/base/src/nsBlockFrame.cpp | 2 +- .../html/base/src/nsBlockReflowContext.cpp | 4 +- .../html/base/src/nsBlockReflowState.cpp | 2 +- .../layout/html/base/src/nsBlockReflowState.h | 2 +- .../html/base/src/nsFirstLetterFrame.cpp | 4 +- .../html/base/src/nsHTMLReflowState.cpp | 92 +++++++++---------- mozilla/layout/html/base/src/nsIHTMLReflow.h | 4 +- .../layout/html/base/src/nsInlineFrame.cpp | 12 +-- mozilla/layout/html/base/src/nsLineLayout.cpp | 4 +- mozilla/layout/html/base/src/nsTextFrame.cpp | 4 +- .../layout/html/base/src/nsViewportFrame.cpp | 4 +- 25 files changed, 148 insertions(+), 148 deletions(-) diff --git a/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp b/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp index e1e6ab01b89..5c01095bd08 100644 --- a/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp +++ b/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp @@ -229,9 +229,9 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIPresContext& aPresCon (NS_AUTOMARGIN == kidReflowState.mComputedMargin.right)) { // Calculate the amount of space for margins nscoord availMarginSpace = containingBlockWidth - - kidReflowState.computedOffsets.left - kidReflowState.mComputedBorderPadding.left - + kidReflowState.mComputedOffsets.left - kidReflowState.mComputedBorderPadding.left - kidDesiredSize.width - kidReflowState.mComputedBorderPadding.right - - kidReflowState.computedOffsets.right; + kidReflowState.mComputedOffsets.right; if (NS_AUTOMARGIN == kidReflowState.mComputedMargin.left) { if (NS_AUTOMARGIN == kidReflowState.mComputedMargin.right) { @@ -255,9 +255,9 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIPresContext& aPresCon (NS_AUTOMARGIN == kidReflowState.mComputedMargin.bottom)) { // Calculate the amount of space for margins nscoord availMarginSpace = containingBlockHeight - - kidReflowState.computedOffsets.top - kidReflowState.mComputedBorderPadding.top - + kidReflowState.mComputedOffsets.top - kidReflowState.mComputedBorderPadding.top - kidDesiredSize.height - kidReflowState.mComputedBorderPadding.bottom - - kidReflowState.computedOffsets.bottom; + kidReflowState.mComputedOffsets.bottom; if (NS_AUTOMARGIN == kidReflowState.mComputedMargin.top) { if (NS_AUTOMARGIN == kidReflowState.mComputedMargin.bottom) { @@ -289,8 +289,8 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIPresContext& aPresCon } // Position the child relative to our padding edge - nsRect rect(border.left + kidReflowState.computedOffsets.left + kidReflowState.mComputedMargin.left, - border.top + kidReflowState.computedOffsets.top + kidReflowState.mComputedMargin.top, + nsRect rect(border.left + kidReflowState.mComputedOffsets.left + kidReflowState.mComputedMargin.left, + border.top + kidReflowState.mComputedOffsets.top + kidReflowState.mComputedMargin.top, kidDesiredSize.width, kidDesiredSize.height); aKidFrame->SetRect(rect); } diff --git a/mozilla/layout/generic/nsBRFrame.cpp b/mozilla/layout/generic/nsBRFrame.cpp index a22a10f9e8c..a7283097311 100644 --- a/mozilla/layout/generic/nsBRFrame.cpp +++ b/mozilla/layout/generic/nsBRFrame.cpp @@ -101,8 +101,8 @@ BRFrame::Reflow(nsIPresContext& aPresContext, // Only when the BR is operating in a line-layout situation will it // behave like a BR. - if (nsnull != aReflowState.lineLayout) { - if (aReflowState.lineLayout->CanPlaceFloaterNow()) { + if (nsnull != aReflowState.mLineLayout) { + if (aReflowState.mLineLayout->CanPlaceFloaterNow()) { // If we can place a floater on the line now it means that the // line is effectively empty (there may be zero sized compressed // white-space frames on the line, but they are to be ignored). diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 3d3cfee4886..1f65fcd0be0 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -5694,7 +5694,7 @@ nsBlockFrame::ReflowBullet(nsBlockReflowState& aState, availSize.height = NS_UNCONSTRAINEDSIZE; nsHTMLReflowState reflowState(*aState.mPresContext, aState.mReflowState, mBullet, availSize); - reflowState.lineLayout = aState.mLineLayout; + reflowState.mLineLayout = aState.mLineLayout; nsIHTMLReflow* htmlReflow; nsresult rv = mBullet->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow); if (NS_SUCCEEDED(rv)) { diff --git a/mozilla/layout/generic/nsBlockReflowContext.cpp b/mozilla/layout/generic/nsBlockReflowContext.cpp index ddd0dbb805a..322a2d389fd 100644 --- a/mozilla/layout/generic/nsBlockReflowContext.cpp +++ b/mozilla/layout/generic/nsBlockReflowContext.cpp @@ -147,8 +147,8 @@ nsBlockReflowContext::ReflowBlock(nsIFrame* aFrame, nsSize availSpace(aSpace.width, aSpace.height); nsHTMLReflowState reflowState(*mPresContext, mOuterReflowState, aFrame, availSpace, reason); - aComputedOffsets = reflowState.computedOffsets; - reflowState.lineLayout = nsnull; + aComputedOffsets = reflowState.mComputedOffsets; + reflowState.mLineLayout = nsnull; if (!aIsAdjacentWithTop) { reflowState.isTopOfPage = PR_FALSE; // make sure this is cleared } diff --git a/mozilla/layout/generic/nsBlockReflowState.cpp b/mozilla/layout/generic/nsBlockReflowState.cpp index 3d3cfee4886..1f65fcd0be0 100644 --- a/mozilla/layout/generic/nsBlockReflowState.cpp +++ b/mozilla/layout/generic/nsBlockReflowState.cpp @@ -5694,7 +5694,7 @@ nsBlockFrame::ReflowBullet(nsBlockReflowState& aState, availSize.height = NS_UNCONSTRAINEDSIZE; nsHTMLReflowState reflowState(*aState.mPresContext, aState.mReflowState, mBullet, availSize); - reflowState.lineLayout = aState.mLineLayout; + reflowState.mLineLayout = aState.mLineLayout; nsIHTMLReflow* htmlReflow; nsresult rv = mBullet->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow); if (NS_SUCCEEDED(rv)) { diff --git a/mozilla/layout/generic/nsBlockReflowState.h b/mozilla/layout/generic/nsBlockReflowState.h index 3d3cfee4886..1f65fcd0be0 100644 --- a/mozilla/layout/generic/nsBlockReflowState.h +++ b/mozilla/layout/generic/nsBlockReflowState.h @@ -5694,7 +5694,7 @@ nsBlockFrame::ReflowBullet(nsBlockReflowState& aState, availSize.height = NS_UNCONSTRAINEDSIZE; nsHTMLReflowState reflowState(*aState.mPresContext, aState.mReflowState, mBullet, availSize); - reflowState.lineLayout = aState.mLineLayout; + reflowState.mLineLayout = aState.mLineLayout; nsIHTMLReflow* htmlReflow; nsresult rv = mBullet->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow); if (NS_SUCCEEDED(rv)) { diff --git a/mozilla/layout/generic/nsFirstLetterFrame.cpp b/mozilla/layout/generic/nsFirstLetterFrame.cpp index abf98c0597e..4c23ab15e0c 100644 --- a/mozilla/layout/generic/nsFirstLetterFrame.cpp +++ b/mozilla/layout/generic/nsFirstLetterFrame.cpp @@ -191,7 +191,7 @@ nsFirstLetterFrame::Reflow(nsIPresContext& aPresContext, // Reflow the child nsHTMLReflowState rs(aPresContext, aReflowState, kid, availSize); htmlReflow->WillReflow(aPresContext); - if (!rs.lineLayout) { + if (!rs.mLineLayout) { // When there is no lineLayout provided, we provide our own. The // only time that the first-letter-frame is not reflowing in a // line context is when its floating. @@ -199,7 +199,7 @@ nsFirstLetterFrame::Reflow(nsIPresContext& aPresContext, nsnull != aMetrics.maxElementSize); ll.BeginLineReflow(0, 0, NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE, PR_FALSE, PR_TRUE); - rs.lineLayout = ≪ + rs.mLineLayout = ≪ ll.SetFirstLetterStyleOK(PR_TRUE); htmlReflow->Reflow(aPresContext, aMetrics, rs, aReflowStatus); ll.EndLineReflow(); diff --git a/mozilla/layout/generic/nsHTMLReflowState.cpp b/mozilla/layout/generic/nsHTMLReflowState.cpp index a3bfdf5487e..3adf6fbef4b 100644 --- a/mozilla/layout/generic/nsHTMLReflowState.cpp +++ b/mozilla/layout/generic/nsHTMLReflowState.cpp @@ -52,7 +52,7 @@ nsHTMLReflowState::nsHTMLReflowState(nsIPresContext& aPresContext, availableHeight = aAvailableSpace.height; rendContext = aRenderingContext; mSpaceManager = nsnull; - lineLayout = nsnull; + mLineLayout = nsnull; isTopOfPage = PR_FALSE; Init(aPresContext); } @@ -75,7 +75,7 @@ nsHTMLReflowState::nsHTMLReflowState(nsIPresContext& aPresContext, availableHeight = aAvailableSpace.height; rendContext = aRenderingContext; mSpaceManager = nsnull; - lineLayout = nsnull; + mLineLayout = nsnull; isTopOfPage = PR_FALSE; Init(aPresContext); } @@ -100,7 +100,7 @@ nsHTMLReflowState::nsHTMLReflowState(nsIPresContext& aPresContext, rendContext = aParentReflowState.rendContext; mSpaceManager = aParentReflowState.mSpaceManager; - lineLayout = aParentReflowState.lineLayout; + mLineLayout = aParentReflowState.mLineLayout; isTopOfPage = aParentReflowState.isTopOfPage; Init(aPresContext); @@ -122,7 +122,7 @@ nsHTMLReflowState::nsHTMLReflowState(nsIPresContext& aPresContext, rendContext = aParentReflowState.rendContext; mSpaceManager = aParentReflowState.mSpaceManager; - lineLayout = aParentReflowState.lineLayout; + mLineLayout = aParentReflowState.mLineLayout; isTopOfPage = aParentReflowState.isTopOfPage; Init(aPresContext); @@ -297,19 +297,19 @@ nsHTMLReflowState::ComputeRelativeOffsets(const nsHTMLReflowState* cbrs, if (leftIsAuto) { if (rightIsAuto) { // If both are 'auto' (their initial values), the computed values are 0 - computedOffsets.left = computedOffsets.right = 0; + mComputedOffsets.left = mComputedOffsets.right = 0; } else { // 'Right' isn't 'auto' so compute its value if (eStyleUnit_Inherit == mStylePosition->mOffset.GetRightUnit()) { - computedOffsets.right = cbrs->computedOffsets.right; + mComputedOffsets.right = cbrs->mComputedOffsets.right; } else { ComputeHorizontalValue(aContainingBlockWidth, mStylePosition->mOffset.GetRightUnit(), mStylePosition->mOffset.GetRight(coord), - computedOffsets.right); + mComputedOffsets.right); } // Computed value for 'left' is minus the value of 'right' - computedOffsets.left = -computedOffsets.right; + mComputedOffsets.left = -mComputedOffsets.right; } } else { @@ -317,15 +317,15 @@ nsHTMLReflowState::ComputeRelativeOffsets(const nsHTMLReflowState* cbrs, // 'Left' isn't 'auto' so compute its value if (eStyleUnit_Inherit == mStylePosition->mOffset.GetLeftUnit()) { - computedOffsets.left = cbrs->computedOffsets.left; + mComputedOffsets.left = cbrs->mComputedOffsets.left; } else { ComputeHorizontalValue(aContainingBlockWidth, mStylePosition->mOffset.GetLeftUnit(), mStylePosition->mOffset.GetLeft(coord), - computedOffsets.left); + mComputedOffsets.left); } // Computed value for 'right' is minus the value of 'left' - computedOffsets.right = -computedOffsets.left; + mComputedOffsets.right = -mComputedOffsets.left; } // Compute the 'top' and 'bottom' values. The 'top' and 'bottom' properties @@ -353,19 +353,19 @@ nsHTMLReflowState::ComputeRelativeOffsets(const nsHTMLReflowState* cbrs, if (topIsAuto) { if (bottomIsAuto) { // If both are 'auto' (their initial values), the computed values are 0 - computedOffsets.top = computedOffsets.bottom = 0; + mComputedOffsets.top = mComputedOffsets.bottom = 0; } else { // 'Bottom' isn't 'auto' so compute its value if (eStyleUnit_Inherit == mStylePosition->mOffset.GetBottomUnit()) { - computedOffsets.bottom = cbrs->computedOffsets.bottom; + mComputedOffsets.bottom = cbrs->mComputedOffsets.bottom; } else { ComputeVerticalValue(aContainingBlockHeight, mStylePosition->mOffset.GetBottomUnit(), mStylePosition->mOffset.GetBottom(coord), - computedOffsets.bottom); + mComputedOffsets.bottom); } // Computed value for 'top' is minus the value of 'bottom' - computedOffsets.top = -computedOffsets.bottom; + mComputedOffsets.top = -mComputedOffsets.bottom; } } else { @@ -373,15 +373,15 @@ nsHTMLReflowState::ComputeRelativeOffsets(const nsHTMLReflowState* cbrs, // 'Top' isn't 'auto' so compute its value if (eStyleUnit_Inherit == mStylePosition->mOffset.GetTopUnit()) { - computedOffsets.top = cbrs->computedOffsets.top; + mComputedOffsets.top = cbrs->mComputedOffsets.top; } else { ComputeVerticalValue(aContainingBlockHeight, mStylePosition->mOffset.GetTopUnit(), mStylePosition->mOffset.GetTop(coord), - computedOffsets.top); + mComputedOffsets.top); } // Computed value for 'bottom' is minus the value of 'top' - computedOffsets.bottom = -computedOffsets.top; + mComputedOffsets.bottom = -mComputedOffsets.top; } } @@ -438,32 +438,32 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, PRBool leftIsAuto = PR_FALSE, rightIsAuto = PR_FALSE; nsStyleCoord coord; if (eStyleUnit_Inherit == mStylePosition->mOffset.GetLeftUnit()) { - computedOffsets.left = cbrs->computedOffsets.left; + mComputedOffsets.left = cbrs->mComputedOffsets.left; } else if (eStyleUnit_Auto == mStylePosition->mOffset.GetLeftUnit()) { if (NS_STYLE_DIRECTION_LTR == mStyleDisplay->mDirection) { - computedOffsets.left = placeholderOffset.x; + mComputedOffsets.left = placeholderOffset.x; } else { - computedOffsets.left = 0; + mComputedOffsets.left = 0; leftIsAuto = PR_TRUE; } } else { ComputeHorizontalValue(containingBlockWidth, mStylePosition->mOffset.GetLeftUnit(), mStylePosition->mOffset.GetLeft(coord), - computedOffsets.left); + mComputedOffsets.left); } if (eStyleUnit_Inherit == mStylePosition->mOffset.GetRightUnit()) { - computedOffsets.right = cbrs->computedOffsets.right; + mComputedOffsets.right = cbrs->mComputedOffsets.right; } else if (eStyleUnit_Auto == mStylePosition->mOffset.GetRightUnit()) { if (NS_STYLE_DIRECTION_RTL == mStyleDisplay->mDirection) { - computedOffsets.right = placeholderOffset.x; + mComputedOffsets.right = placeholderOffset.x; } else { - computedOffsets.right = 0; + mComputedOffsets.right = 0; rightIsAuto = PR_TRUE; } } else { ComputeHorizontalValue(containingBlockWidth, mStylePosition->mOffset.GetRightUnit(), mStylePosition->mOffset.GetRight(coord), - computedOffsets.right); + mComputedOffsets.right); } // Calculate the computed width @@ -484,10 +484,10 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, marginLeftIsAuto = PR_FALSE; marginRightIsAuto = PR_FALSE; - mComputedWidth = containingBlockWidth - computedOffsets.left - + mComputedWidth = containingBlockWidth - mComputedOffsets.left - mComputedMargin.left - mComputedBorderPadding.left - mComputedBorderPadding.right - - mComputedMargin.right - computedOffsets.right; + mComputedMargin.right - mComputedOffsets.right; } // Factor in any minimum and maximum size information @@ -518,15 +518,15 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, if (leftIsAuto) { // Any 'auto' on 'margin-left' or 'margin-right' are replaced with 0 // (their default value) - computedOffsets.left = containingBlockWidth - mComputedMargin.left - + mComputedOffsets.left = containingBlockWidth - mComputedMargin.left - mComputedBorderPadding.left - mComputedWidth - mComputedBorderPadding.right - - mComputedMargin.right - computedOffsets.right; + mComputedMargin.right - mComputedOffsets.right; } else if (rightIsAuto) { // Any 'auto' on 'margin-left' or 'margin-right' are replaced with 0 // (their default value) - computedOffsets.right = containingBlockWidth - computedOffsets.left - + mComputedOffsets.right = containingBlockWidth - mComputedOffsets.left - mComputedMargin.left - mComputedBorderPadding.left - mComputedWidth - mComputedBorderPadding.right - mComputedMargin.right; @@ -545,9 +545,9 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, } else { // Calculate the amount of space for margins nscoord availMarginSpace = containingBlockWidth - - computedOffsets.left - mComputedBorderPadding.left - + mComputedOffsets.left - mComputedBorderPadding.left - mComputedWidth - mComputedBorderPadding.right - - computedOffsets.right; + mComputedOffsets.right; if (marginLeftIsAuto) { if (marginRightIsAuto) { @@ -569,26 +569,26 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, // Initialize the 'top' and 'bottom' computed offsets PRBool bottomIsAuto = PR_FALSE; if (eStyleUnit_Inherit == mStylePosition->mOffset.GetTopUnit()) { - computedOffsets.top = cbrs->computedOffsets.top; + mComputedOffsets.top = cbrs->mComputedOffsets.top; } else if ((eStyleUnit_Auto == mStylePosition->mOffset.GetTopUnit()) || ((NS_AUTOHEIGHT == containingBlockHeight) && (eStyleUnit_Percent == mStylePosition->mOffset.GetTopUnit()))) { // Use the placeholder position - computedOffsets.top = placeholderOffset.y; + mComputedOffsets.top = placeholderOffset.y; } else { nsStyleCoord c; ComputeVerticalValue(containingBlockHeight, mStylePosition->mOffset.GetTopUnit(), mStylePosition->mOffset.GetTop(c), - computedOffsets.top); + mComputedOffsets.top); } if (eStyleUnit_Inherit == mStylePosition->mOffset.GetBottomUnit()) { - computedOffsets.bottom = cbrs->computedOffsets.bottom; + mComputedOffsets.bottom = cbrs->mComputedOffsets.bottom; } else if ((eStyleUnit_Auto == mStylePosition->mOffset.GetBottomUnit()) || ((NS_AUTOHEIGHT == containingBlockHeight) && (eStyleUnit_Percent == mStylePosition->mOffset.GetBottomUnit()))) { if (eStyleUnit_Auto == heightUnit) { - computedOffsets.bottom = 0; + mComputedOffsets.bottom = 0; } else { bottomIsAuto = PR_TRUE; } @@ -597,7 +597,7 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, ComputeVerticalValue(containingBlockHeight, mStylePosition->mOffset.GetBottomUnit(), mStylePosition->mOffset.GetBottom(c), - computedOffsets.bottom); + mComputedOffsets.bottom); } // Check for a percentage based height and a containing block height @@ -632,10 +632,10 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, mComputedHeight = NS_AUTOHEIGHT; } else { - mComputedHeight = containingBlockHeight - computedOffsets.top - + mComputedHeight = containingBlockHeight - mComputedOffsets.top - mComputedMargin.top - mComputedBorderPadding.top - mComputedBorderPadding.bottom - - mComputedMargin.bottom - computedOffsets.bottom; + mComputedMargin.bottom - mComputedOffsets.bottom; // Factor in any minimum and maximum size information if (mComputedHeight > mComputedMaxHeight) { @@ -667,7 +667,7 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, if (NS_AUTOHEIGHT != containingBlockHeight) { if (bottomIsAuto) { // Any 'auto' on 'margin-top' or 'margin-bottom' are replaced with 0 - computedOffsets.bottom = containingBlockHeight - computedOffsets.top - + mComputedOffsets.bottom = containingBlockHeight - mComputedOffsets.top - mComputedMargin.top - mComputedBorderPadding.top - mComputedHeight - mComputedBorderPadding.bottom - mComputedMargin.bottom; @@ -685,9 +685,9 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, } } else { // Calculate the amount of space for margins - nscoord availMarginSpace = containingBlockHeight - computedOffsets.top - + nscoord availMarginSpace = containingBlockHeight - mComputedOffsets.top - mComputedBorderPadding.top - mComputedHeight - mComputedBorderPadding.bottom - - computedOffsets.bottom; + mComputedOffsets.bottom; if (marginTopIsAuto) { if (marginBottomIsAuto) { @@ -779,7 +779,7 @@ nsHTMLReflowState::InitConstraints(nsIPresContext& aPresContext) mComputedMargin.SizeTo(0, 0, 0, 0); mComputedPadding.SizeTo(0, 0, 0, 0); mComputedBorderPadding.SizeTo(0, 0, 0, 0); - computedOffsets.SizeTo(0, 0, 0, 0); + mComputedOffsets.SizeTo(0, 0, 0, 0); mComputedMinWidth = mComputedMinHeight = 0; mComputedMaxWidth = mComputedMaxHeight = NS_UNCONSTRAINEDSIZE; } else { @@ -798,7 +798,7 @@ nsHTMLReflowState::InitConstraints(nsIPresContext& aPresContext) ComputeRelativeOffsets(cbrs, containingBlockWidth, containingBlockHeight); } else { // Initialize offsets to 0 - computedOffsets.SizeTo(0, 0, 0, 0); + mComputedOffsets.SizeTo(0, 0, 0, 0); } #if 0 diff --git a/mozilla/layout/generic/nsInlineFrame.cpp b/mozilla/layout/generic/nsInlineFrame.cpp index 3c0720ea464..f3eff4162ad 100644 --- a/mozilla/layout/generic/nsInlineFrame.cpp +++ b/mozilla/layout/generic/nsInlineFrame.cpp @@ -1225,7 +1225,7 @@ nsInlineFrame::Reflow(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) { - if (nsnull == aReflowState.lineLayout) { + if (nsnull == aReflowState.mLineLayout) { return NS_ERROR_INVALID_ARG; } DrainOverflow(&aPresContext); @@ -1254,7 +1254,7 @@ nsInlineFrame::Reflow(nsIPresContext& aPresContext, } if (HaveAnonymousBlock()) { - if (!aReflowState.lineLayout->LineIsEmpty()) { + if (!aReflowState.mLineLayout->LineIsEmpty()) { // This inline frame cannot be placed on the current line // because there already is an inline frame on this line (and we // contain an anonymous block). @@ -1346,7 +1346,7 @@ nsInlineFrame::ReflowInlineFrames(nsIPresContext* aPresContext, nsresult rv = NS_OK; aStatus = NS_FRAME_COMPLETE; - nsLineLayout* lineLayout = aReflowState.lineLayout; + nsLineLayout* lineLayout = aReflowState.mLineLayout; nscoord leftEdge = 0; if (nsnull == mPrevInFlow) { leftEdge = aReflowState.mComputedBorderPadding.left; @@ -1533,7 +1533,7 @@ nsInlineFrame::ReflowInlineFrame(nsIPresContext* aPresContext, return NS_OK; } - nsLineLayout* lineLayout = aReflowState.lineLayout; + nsLineLayout* lineLayout = aReflowState.mLineLayout; PRBool reflowingFirstLetter = lineLayout->GetFirstLetterStyleOK(); nsresult rv = lineLayout->ReflowFrame(aFrame, &irs.mNextRCFrame, aStatus); if (NS_FAILED(rv)) { @@ -1998,7 +1998,7 @@ nsFirstLineFrame::Reflow(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) { - if (nsnull == aReflowState.lineLayout) { + if (nsnull == aReflowState.mLineLayout) { return NS_ERROR_INVALID_ARG; } DrainOverflow(&aPresContext); @@ -2028,7 +2028,7 @@ nsFirstLineFrame::Reflow(nsIPresContext& aPresContext, } if (HaveAnonymousBlock()) { - if (!aReflowState.lineLayout->LineIsEmpty()) { + if (!aReflowState.mLineLayout->LineIsEmpty()) { // This inline frame cannot be placed on the current line // because there already is an inline frame on this line (and we // contain an anonymous block). diff --git a/mozilla/layout/generic/nsLineLayout.cpp b/mozilla/layout/generic/nsLineLayout.cpp index 4b77ca5e719..b533f3e74ba 100644 --- a/mozilla/layout/generic/nsLineLayout.cpp +++ b/mozilla/layout/generic/nsLineLayout.cpp @@ -771,7 +771,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, // Setup reflow state for reflowing the frame nsHTMLReflowState reflowState(mPresContext, *psd->mReflowState, aFrame, availSize, reason); - reflowState.lineLayout = this; + reflowState.mLineLayout = this; reflowState.isTopOfPage = mIsTopOfPage; mUnderstandsWhiteSpace = PR_FALSE; @@ -784,7 +784,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, pfd->mRelativePos = reflowState.mStylePosition->mPosition == NS_STYLE_POSITION_RELATIVE; if (pfd->mRelativePos) { - pfd->mOffsets = reflowState.computedOffsets; + pfd->mOffsets = reflowState.mComputedOffsets; } // We want to guarantee that we always make progress when diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index 08c09bdfbd2..15ea7f95f04 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -2286,7 +2286,7 @@ nsTextFrame::Reflow(nsIPresContext& aPresContext, // XXX If there's no line layout, we shouldn't even have created this // frame. This may happen if, for example, this is text inside a table // but not inside a cell. For now, just don't reflow. - if (nsnull == aReflowState.lineLayout) { + if (nsnull == aReflowState.mLineLayout) { // XXX Add a method to aMetrics that does this; we do it several places aMetrics.width = 0; aMetrics.height = 0; @@ -2306,7 +2306,7 @@ nsTextFrame::Reflow(nsIPresContext& aPresContext, startingOffset = prev->mContentOffset + prev->mContentLength; } - nsLineLayout& lineLayout = *aReflowState.lineLayout; + nsLineLayout& lineLayout = *aReflowState.mLineLayout; TextStyle ts(&aPresContext, *aReflowState.rendContext, mStyleContext); // Initialize mFlags (without destroying the TEXT_BLINK_ON bit) bits diff --git a/mozilla/layout/generic/nsViewportFrame.cpp b/mozilla/layout/generic/nsViewportFrame.cpp index b5d1ef8cf13..d657d556ead 100644 --- a/mozilla/layout/generic/nsViewportFrame.cpp +++ b/mozilla/layout/generic/nsViewportFrame.cpp @@ -241,8 +241,8 @@ ViewportFrame::ReflowFixedFrame(nsIPresContext& aPresContext, } // Position the child - nsRect rect(kidReflowState.computedOffsets.left + kidReflowState.mComputedMargin.left, - kidReflowState.computedOffsets.top + kidReflowState.mComputedMargin.top, + nsRect rect(kidReflowState.mComputedOffsets.left + kidReflowState.mComputedMargin.left, + kidReflowState.mComputedOffsets.top + kidReflowState.mComputedMargin.top, kidDesiredSize.width, kidDesiredSize.height); aKidFrame->SetRect(rect); htmlReflow->DidReflow(aPresContext, NS_FRAME_REFLOW_FINISHED); diff --git a/mozilla/layout/html/base/src/nsAbsoluteContainingBlock.cpp b/mozilla/layout/html/base/src/nsAbsoluteContainingBlock.cpp index e1e6ab01b89..5c01095bd08 100644 --- a/mozilla/layout/html/base/src/nsAbsoluteContainingBlock.cpp +++ b/mozilla/layout/html/base/src/nsAbsoluteContainingBlock.cpp @@ -229,9 +229,9 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIPresContext& aPresCon (NS_AUTOMARGIN == kidReflowState.mComputedMargin.right)) { // Calculate the amount of space for margins nscoord availMarginSpace = containingBlockWidth - - kidReflowState.computedOffsets.left - kidReflowState.mComputedBorderPadding.left - + kidReflowState.mComputedOffsets.left - kidReflowState.mComputedBorderPadding.left - kidDesiredSize.width - kidReflowState.mComputedBorderPadding.right - - kidReflowState.computedOffsets.right; + kidReflowState.mComputedOffsets.right; if (NS_AUTOMARGIN == kidReflowState.mComputedMargin.left) { if (NS_AUTOMARGIN == kidReflowState.mComputedMargin.right) { @@ -255,9 +255,9 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIPresContext& aPresCon (NS_AUTOMARGIN == kidReflowState.mComputedMargin.bottom)) { // Calculate the amount of space for margins nscoord availMarginSpace = containingBlockHeight - - kidReflowState.computedOffsets.top - kidReflowState.mComputedBorderPadding.top - + kidReflowState.mComputedOffsets.top - kidReflowState.mComputedBorderPadding.top - kidDesiredSize.height - kidReflowState.mComputedBorderPadding.bottom - - kidReflowState.computedOffsets.bottom; + kidReflowState.mComputedOffsets.bottom; if (NS_AUTOMARGIN == kidReflowState.mComputedMargin.top) { if (NS_AUTOMARGIN == kidReflowState.mComputedMargin.bottom) { @@ -289,8 +289,8 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIPresContext& aPresCon } // Position the child relative to our padding edge - nsRect rect(border.left + kidReflowState.computedOffsets.left + kidReflowState.mComputedMargin.left, - border.top + kidReflowState.computedOffsets.top + kidReflowState.mComputedMargin.top, + nsRect rect(border.left + kidReflowState.mComputedOffsets.left + kidReflowState.mComputedMargin.left, + border.top + kidReflowState.mComputedOffsets.top + kidReflowState.mComputedMargin.top, kidDesiredSize.width, kidDesiredSize.height); aKidFrame->SetRect(rect); } diff --git a/mozilla/layout/html/base/src/nsBRFrame.cpp b/mozilla/layout/html/base/src/nsBRFrame.cpp index a22a10f9e8c..a7283097311 100644 --- a/mozilla/layout/html/base/src/nsBRFrame.cpp +++ b/mozilla/layout/html/base/src/nsBRFrame.cpp @@ -101,8 +101,8 @@ BRFrame::Reflow(nsIPresContext& aPresContext, // Only when the BR is operating in a line-layout situation will it // behave like a BR. - if (nsnull != aReflowState.lineLayout) { - if (aReflowState.lineLayout->CanPlaceFloaterNow()) { + if (nsnull != aReflowState.mLineLayout) { + if (aReflowState.mLineLayout->CanPlaceFloaterNow()) { // If we can place a floater on the line now it means that the // line is effectively empty (there may be zero sized compressed // white-space frames on the line, but they are to be ignored). diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index 3d3cfee4886..1f65fcd0be0 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -5694,7 +5694,7 @@ nsBlockFrame::ReflowBullet(nsBlockReflowState& aState, availSize.height = NS_UNCONSTRAINEDSIZE; nsHTMLReflowState reflowState(*aState.mPresContext, aState.mReflowState, mBullet, availSize); - reflowState.lineLayout = aState.mLineLayout; + reflowState.mLineLayout = aState.mLineLayout; nsIHTMLReflow* htmlReflow; nsresult rv = mBullet->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow); if (NS_SUCCEEDED(rv)) { diff --git a/mozilla/layout/html/base/src/nsBlockReflowContext.cpp b/mozilla/layout/html/base/src/nsBlockReflowContext.cpp index ddd0dbb805a..322a2d389fd 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowContext.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowContext.cpp @@ -147,8 +147,8 @@ nsBlockReflowContext::ReflowBlock(nsIFrame* aFrame, nsSize availSpace(aSpace.width, aSpace.height); nsHTMLReflowState reflowState(*mPresContext, mOuterReflowState, aFrame, availSpace, reason); - aComputedOffsets = reflowState.computedOffsets; - reflowState.lineLayout = nsnull; + aComputedOffsets = reflowState.mComputedOffsets; + reflowState.mLineLayout = nsnull; if (!aIsAdjacentWithTop) { reflowState.isTopOfPage = PR_FALSE; // make sure this is cleared } diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.cpp b/mozilla/layout/html/base/src/nsBlockReflowState.cpp index 3d3cfee4886..1f65fcd0be0 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowState.cpp @@ -5694,7 +5694,7 @@ nsBlockFrame::ReflowBullet(nsBlockReflowState& aState, availSize.height = NS_UNCONSTRAINEDSIZE; nsHTMLReflowState reflowState(*aState.mPresContext, aState.mReflowState, mBullet, availSize); - reflowState.lineLayout = aState.mLineLayout; + reflowState.mLineLayout = aState.mLineLayout; nsIHTMLReflow* htmlReflow; nsresult rv = mBullet->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow); if (NS_SUCCEEDED(rv)) { diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.h b/mozilla/layout/html/base/src/nsBlockReflowState.h index 3d3cfee4886..1f65fcd0be0 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.h +++ b/mozilla/layout/html/base/src/nsBlockReflowState.h @@ -5694,7 +5694,7 @@ nsBlockFrame::ReflowBullet(nsBlockReflowState& aState, availSize.height = NS_UNCONSTRAINEDSIZE; nsHTMLReflowState reflowState(*aState.mPresContext, aState.mReflowState, mBullet, availSize); - reflowState.lineLayout = aState.mLineLayout; + reflowState.mLineLayout = aState.mLineLayout; nsIHTMLReflow* htmlReflow; nsresult rv = mBullet->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow); if (NS_SUCCEEDED(rv)) { diff --git a/mozilla/layout/html/base/src/nsFirstLetterFrame.cpp b/mozilla/layout/html/base/src/nsFirstLetterFrame.cpp index abf98c0597e..4c23ab15e0c 100644 --- a/mozilla/layout/html/base/src/nsFirstLetterFrame.cpp +++ b/mozilla/layout/html/base/src/nsFirstLetterFrame.cpp @@ -191,7 +191,7 @@ nsFirstLetterFrame::Reflow(nsIPresContext& aPresContext, // Reflow the child nsHTMLReflowState rs(aPresContext, aReflowState, kid, availSize); htmlReflow->WillReflow(aPresContext); - if (!rs.lineLayout) { + if (!rs.mLineLayout) { // When there is no lineLayout provided, we provide our own. The // only time that the first-letter-frame is not reflowing in a // line context is when its floating. @@ -199,7 +199,7 @@ nsFirstLetterFrame::Reflow(nsIPresContext& aPresContext, nsnull != aMetrics.maxElementSize); ll.BeginLineReflow(0, 0, NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE, PR_FALSE, PR_TRUE); - rs.lineLayout = ≪ + rs.mLineLayout = ≪ ll.SetFirstLetterStyleOK(PR_TRUE); htmlReflow->Reflow(aPresContext, aMetrics, rs, aReflowStatus); ll.EndLineReflow(); diff --git a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp index a3bfdf5487e..3adf6fbef4b 100644 --- a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp +++ b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp @@ -52,7 +52,7 @@ nsHTMLReflowState::nsHTMLReflowState(nsIPresContext& aPresContext, availableHeight = aAvailableSpace.height; rendContext = aRenderingContext; mSpaceManager = nsnull; - lineLayout = nsnull; + mLineLayout = nsnull; isTopOfPage = PR_FALSE; Init(aPresContext); } @@ -75,7 +75,7 @@ nsHTMLReflowState::nsHTMLReflowState(nsIPresContext& aPresContext, availableHeight = aAvailableSpace.height; rendContext = aRenderingContext; mSpaceManager = nsnull; - lineLayout = nsnull; + mLineLayout = nsnull; isTopOfPage = PR_FALSE; Init(aPresContext); } @@ -100,7 +100,7 @@ nsHTMLReflowState::nsHTMLReflowState(nsIPresContext& aPresContext, rendContext = aParentReflowState.rendContext; mSpaceManager = aParentReflowState.mSpaceManager; - lineLayout = aParentReflowState.lineLayout; + mLineLayout = aParentReflowState.mLineLayout; isTopOfPage = aParentReflowState.isTopOfPage; Init(aPresContext); @@ -122,7 +122,7 @@ nsHTMLReflowState::nsHTMLReflowState(nsIPresContext& aPresContext, rendContext = aParentReflowState.rendContext; mSpaceManager = aParentReflowState.mSpaceManager; - lineLayout = aParentReflowState.lineLayout; + mLineLayout = aParentReflowState.mLineLayout; isTopOfPage = aParentReflowState.isTopOfPage; Init(aPresContext); @@ -297,19 +297,19 @@ nsHTMLReflowState::ComputeRelativeOffsets(const nsHTMLReflowState* cbrs, if (leftIsAuto) { if (rightIsAuto) { // If both are 'auto' (their initial values), the computed values are 0 - computedOffsets.left = computedOffsets.right = 0; + mComputedOffsets.left = mComputedOffsets.right = 0; } else { // 'Right' isn't 'auto' so compute its value if (eStyleUnit_Inherit == mStylePosition->mOffset.GetRightUnit()) { - computedOffsets.right = cbrs->computedOffsets.right; + mComputedOffsets.right = cbrs->mComputedOffsets.right; } else { ComputeHorizontalValue(aContainingBlockWidth, mStylePosition->mOffset.GetRightUnit(), mStylePosition->mOffset.GetRight(coord), - computedOffsets.right); + mComputedOffsets.right); } // Computed value for 'left' is minus the value of 'right' - computedOffsets.left = -computedOffsets.right; + mComputedOffsets.left = -mComputedOffsets.right; } } else { @@ -317,15 +317,15 @@ nsHTMLReflowState::ComputeRelativeOffsets(const nsHTMLReflowState* cbrs, // 'Left' isn't 'auto' so compute its value if (eStyleUnit_Inherit == mStylePosition->mOffset.GetLeftUnit()) { - computedOffsets.left = cbrs->computedOffsets.left; + mComputedOffsets.left = cbrs->mComputedOffsets.left; } else { ComputeHorizontalValue(aContainingBlockWidth, mStylePosition->mOffset.GetLeftUnit(), mStylePosition->mOffset.GetLeft(coord), - computedOffsets.left); + mComputedOffsets.left); } // Computed value for 'right' is minus the value of 'left' - computedOffsets.right = -computedOffsets.left; + mComputedOffsets.right = -mComputedOffsets.left; } // Compute the 'top' and 'bottom' values. The 'top' and 'bottom' properties @@ -353,19 +353,19 @@ nsHTMLReflowState::ComputeRelativeOffsets(const nsHTMLReflowState* cbrs, if (topIsAuto) { if (bottomIsAuto) { // If both are 'auto' (their initial values), the computed values are 0 - computedOffsets.top = computedOffsets.bottom = 0; + mComputedOffsets.top = mComputedOffsets.bottom = 0; } else { // 'Bottom' isn't 'auto' so compute its value if (eStyleUnit_Inherit == mStylePosition->mOffset.GetBottomUnit()) { - computedOffsets.bottom = cbrs->computedOffsets.bottom; + mComputedOffsets.bottom = cbrs->mComputedOffsets.bottom; } else { ComputeVerticalValue(aContainingBlockHeight, mStylePosition->mOffset.GetBottomUnit(), mStylePosition->mOffset.GetBottom(coord), - computedOffsets.bottom); + mComputedOffsets.bottom); } // Computed value for 'top' is minus the value of 'bottom' - computedOffsets.top = -computedOffsets.bottom; + mComputedOffsets.top = -mComputedOffsets.bottom; } } else { @@ -373,15 +373,15 @@ nsHTMLReflowState::ComputeRelativeOffsets(const nsHTMLReflowState* cbrs, // 'Top' isn't 'auto' so compute its value if (eStyleUnit_Inherit == mStylePosition->mOffset.GetTopUnit()) { - computedOffsets.top = cbrs->computedOffsets.top; + mComputedOffsets.top = cbrs->mComputedOffsets.top; } else { ComputeVerticalValue(aContainingBlockHeight, mStylePosition->mOffset.GetTopUnit(), mStylePosition->mOffset.GetTop(coord), - computedOffsets.top); + mComputedOffsets.top); } // Computed value for 'bottom' is minus the value of 'top' - computedOffsets.bottom = -computedOffsets.top; + mComputedOffsets.bottom = -mComputedOffsets.top; } } @@ -438,32 +438,32 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, PRBool leftIsAuto = PR_FALSE, rightIsAuto = PR_FALSE; nsStyleCoord coord; if (eStyleUnit_Inherit == mStylePosition->mOffset.GetLeftUnit()) { - computedOffsets.left = cbrs->computedOffsets.left; + mComputedOffsets.left = cbrs->mComputedOffsets.left; } else if (eStyleUnit_Auto == mStylePosition->mOffset.GetLeftUnit()) { if (NS_STYLE_DIRECTION_LTR == mStyleDisplay->mDirection) { - computedOffsets.left = placeholderOffset.x; + mComputedOffsets.left = placeholderOffset.x; } else { - computedOffsets.left = 0; + mComputedOffsets.left = 0; leftIsAuto = PR_TRUE; } } else { ComputeHorizontalValue(containingBlockWidth, mStylePosition->mOffset.GetLeftUnit(), mStylePosition->mOffset.GetLeft(coord), - computedOffsets.left); + mComputedOffsets.left); } if (eStyleUnit_Inherit == mStylePosition->mOffset.GetRightUnit()) { - computedOffsets.right = cbrs->computedOffsets.right; + mComputedOffsets.right = cbrs->mComputedOffsets.right; } else if (eStyleUnit_Auto == mStylePosition->mOffset.GetRightUnit()) { if (NS_STYLE_DIRECTION_RTL == mStyleDisplay->mDirection) { - computedOffsets.right = placeholderOffset.x; + mComputedOffsets.right = placeholderOffset.x; } else { - computedOffsets.right = 0; + mComputedOffsets.right = 0; rightIsAuto = PR_TRUE; } } else { ComputeHorizontalValue(containingBlockWidth, mStylePosition->mOffset.GetRightUnit(), mStylePosition->mOffset.GetRight(coord), - computedOffsets.right); + mComputedOffsets.right); } // Calculate the computed width @@ -484,10 +484,10 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, marginLeftIsAuto = PR_FALSE; marginRightIsAuto = PR_FALSE; - mComputedWidth = containingBlockWidth - computedOffsets.left - + mComputedWidth = containingBlockWidth - mComputedOffsets.left - mComputedMargin.left - mComputedBorderPadding.left - mComputedBorderPadding.right - - mComputedMargin.right - computedOffsets.right; + mComputedMargin.right - mComputedOffsets.right; } // Factor in any minimum and maximum size information @@ -518,15 +518,15 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, if (leftIsAuto) { // Any 'auto' on 'margin-left' or 'margin-right' are replaced with 0 // (their default value) - computedOffsets.left = containingBlockWidth - mComputedMargin.left - + mComputedOffsets.left = containingBlockWidth - mComputedMargin.left - mComputedBorderPadding.left - mComputedWidth - mComputedBorderPadding.right - - mComputedMargin.right - computedOffsets.right; + mComputedMargin.right - mComputedOffsets.right; } else if (rightIsAuto) { // Any 'auto' on 'margin-left' or 'margin-right' are replaced with 0 // (their default value) - computedOffsets.right = containingBlockWidth - computedOffsets.left - + mComputedOffsets.right = containingBlockWidth - mComputedOffsets.left - mComputedMargin.left - mComputedBorderPadding.left - mComputedWidth - mComputedBorderPadding.right - mComputedMargin.right; @@ -545,9 +545,9 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, } else { // Calculate the amount of space for margins nscoord availMarginSpace = containingBlockWidth - - computedOffsets.left - mComputedBorderPadding.left - + mComputedOffsets.left - mComputedBorderPadding.left - mComputedWidth - mComputedBorderPadding.right - - computedOffsets.right; + mComputedOffsets.right; if (marginLeftIsAuto) { if (marginRightIsAuto) { @@ -569,26 +569,26 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, // Initialize the 'top' and 'bottom' computed offsets PRBool bottomIsAuto = PR_FALSE; if (eStyleUnit_Inherit == mStylePosition->mOffset.GetTopUnit()) { - computedOffsets.top = cbrs->computedOffsets.top; + mComputedOffsets.top = cbrs->mComputedOffsets.top; } else if ((eStyleUnit_Auto == mStylePosition->mOffset.GetTopUnit()) || ((NS_AUTOHEIGHT == containingBlockHeight) && (eStyleUnit_Percent == mStylePosition->mOffset.GetTopUnit()))) { // Use the placeholder position - computedOffsets.top = placeholderOffset.y; + mComputedOffsets.top = placeholderOffset.y; } else { nsStyleCoord c; ComputeVerticalValue(containingBlockHeight, mStylePosition->mOffset.GetTopUnit(), mStylePosition->mOffset.GetTop(c), - computedOffsets.top); + mComputedOffsets.top); } if (eStyleUnit_Inherit == mStylePosition->mOffset.GetBottomUnit()) { - computedOffsets.bottom = cbrs->computedOffsets.bottom; + mComputedOffsets.bottom = cbrs->mComputedOffsets.bottom; } else if ((eStyleUnit_Auto == mStylePosition->mOffset.GetBottomUnit()) || ((NS_AUTOHEIGHT == containingBlockHeight) && (eStyleUnit_Percent == mStylePosition->mOffset.GetBottomUnit()))) { if (eStyleUnit_Auto == heightUnit) { - computedOffsets.bottom = 0; + mComputedOffsets.bottom = 0; } else { bottomIsAuto = PR_TRUE; } @@ -597,7 +597,7 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, ComputeVerticalValue(containingBlockHeight, mStylePosition->mOffset.GetBottomUnit(), mStylePosition->mOffset.GetBottom(c), - computedOffsets.bottom); + mComputedOffsets.bottom); } // Check for a percentage based height and a containing block height @@ -632,10 +632,10 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, mComputedHeight = NS_AUTOHEIGHT; } else { - mComputedHeight = containingBlockHeight - computedOffsets.top - + mComputedHeight = containingBlockHeight - mComputedOffsets.top - mComputedMargin.top - mComputedBorderPadding.top - mComputedBorderPadding.bottom - - mComputedMargin.bottom - computedOffsets.bottom; + mComputedMargin.bottom - mComputedOffsets.bottom; // Factor in any minimum and maximum size information if (mComputedHeight > mComputedMaxHeight) { @@ -667,7 +667,7 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, if (NS_AUTOHEIGHT != containingBlockHeight) { if (bottomIsAuto) { // Any 'auto' on 'margin-top' or 'margin-bottom' are replaced with 0 - computedOffsets.bottom = containingBlockHeight - computedOffsets.top - + mComputedOffsets.bottom = containingBlockHeight - mComputedOffsets.top - mComputedMargin.top - mComputedBorderPadding.top - mComputedHeight - mComputedBorderPadding.bottom - mComputedMargin.bottom; @@ -685,9 +685,9 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, } } else { // Calculate the amount of space for margins - nscoord availMarginSpace = containingBlockHeight - computedOffsets.top - + nscoord availMarginSpace = containingBlockHeight - mComputedOffsets.top - mComputedBorderPadding.top - mComputedHeight - mComputedBorderPadding.bottom - - computedOffsets.bottom; + mComputedOffsets.bottom; if (marginTopIsAuto) { if (marginBottomIsAuto) { @@ -779,7 +779,7 @@ nsHTMLReflowState::InitConstraints(nsIPresContext& aPresContext) mComputedMargin.SizeTo(0, 0, 0, 0); mComputedPadding.SizeTo(0, 0, 0, 0); mComputedBorderPadding.SizeTo(0, 0, 0, 0); - computedOffsets.SizeTo(0, 0, 0, 0); + mComputedOffsets.SizeTo(0, 0, 0, 0); mComputedMinWidth = mComputedMinHeight = 0; mComputedMaxWidth = mComputedMaxHeight = NS_UNCONSTRAINEDSIZE; } else { @@ -798,7 +798,7 @@ nsHTMLReflowState::InitConstraints(nsIPresContext& aPresContext) ComputeRelativeOffsets(cbrs, containingBlockWidth, containingBlockHeight); } else { // Initialize offsets to 0 - computedOffsets.SizeTo(0, 0, 0, 0); + mComputedOffsets.SizeTo(0, 0, 0, 0); } #if 0 diff --git a/mozilla/layout/html/base/src/nsIHTMLReflow.h b/mozilla/layout/html/base/src/nsIHTMLReflow.h index 96223d85500..fa26fad072f 100644 --- a/mozilla/layout/html/base/src/nsIHTMLReflow.h +++ b/mozilla/layout/html/base/src/nsIHTMLReflow.h @@ -134,7 +134,7 @@ struct nsHTMLReflowState : nsReflowState { nsISpaceManager* mSpaceManager; // LineLayout object (only for inline reflow; set to NULL otherwise) - nsLineLayout* lineLayout; + nsLineLayout* mLineLayout; // The computed width specifies the frame's content width, and it does not // apply to inline non-replaced elements @@ -173,7 +173,7 @@ struct nsHTMLReflowState : nsReflowState { // Computed values for 'left/top/right/bottom' offsets. Only applies to // 'positioned' elements - nsMargin computedOffsets; + nsMargin mComputedOffsets; // Computed values for 'min-width/max-width' and 'min-height/max-height' nscoord mComputedMinWidth, mComputedMaxWidth; diff --git a/mozilla/layout/html/base/src/nsInlineFrame.cpp b/mozilla/layout/html/base/src/nsInlineFrame.cpp index 3c0720ea464..f3eff4162ad 100644 --- a/mozilla/layout/html/base/src/nsInlineFrame.cpp +++ b/mozilla/layout/html/base/src/nsInlineFrame.cpp @@ -1225,7 +1225,7 @@ nsInlineFrame::Reflow(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) { - if (nsnull == aReflowState.lineLayout) { + if (nsnull == aReflowState.mLineLayout) { return NS_ERROR_INVALID_ARG; } DrainOverflow(&aPresContext); @@ -1254,7 +1254,7 @@ nsInlineFrame::Reflow(nsIPresContext& aPresContext, } if (HaveAnonymousBlock()) { - if (!aReflowState.lineLayout->LineIsEmpty()) { + if (!aReflowState.mLineLayout->LineIsEmpty()) { // This inline frame cannot be placed on the current line // because there already is an inline frame on this line (and we // contain an anonymous block). @@ -1346,7 +1346,7 @@ nsInlineFrame::ReflowInlineFrames(nsIPresContext* aPresContext, nsresult rv = NS_OK; aStatus = NS_FRAME_COMPLETE; - nsLineLayout* lineLayout = aReflowState.lineLayout; + nsLineLayout* lineLayout = aReflowState.mLineLayout; nscoord leftEdge = 0; if (nsnull == mPrevInFlow) { leftEdge = aReflowState.mComputedBorderPadding.left; @@ -1533,7 +1533,7 @@ nsInlineFrame::ReflowInlineFrame(nsIPresContext* aPresContext, return NS_OK; } - nsLineLayout* lineLayout = aReflowState.lineLayout; + nsLineLayout* lineLayout = aReflowState.mLineLayout; PRBool reflowingFirstLetter = lineLayout->GetFirstLetterStyleOK(); nsresult rv = lineLayout->ReflowFrame(aFrame, &irs.mNextRCFrame, aStatus); if (NS_FAILED(rv)) { @@ -1998,7 +1998,7 @@ nsFirstLineFrame::Reflow(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) { - if (nsnull == aReflowState.lineLayout) { + if (nsnull == aReflowState.mLineLayout) { return NS_ERROR_INVALID_ARG; } DrainOverflow(&aPresContext); @@ -2028,7 +2028,7 @@ nsFirstLineFrame::Reflow(nsIPresContext& aPresContext, } if (HaveAnonymousBlock()) { - if (!aReflowState.lineLayout->LineIsEmpty()) { + if (!aReflowState.mLineLayout->LineIsEmpty()) { // This inline frame cannot be placed on the current line // because there already is an inline frame on this line (and we // contain an anonymous block). diff --git a/mozilla/layout/html/base/src/nsLineLayout.cpp b/mozilla/layout/html/base/src/nsLineLayout.cpp index 4b77ca5e719..b533f3e74ba 100644 --- a/mozilla/layout/html/base/src/nsLineLayout.cpp +++ b/mozilla/layout/html/base/src/nsLineLayout.cpp @@ -771,7 +771,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, // Setup reflow state for reflowing the frame nsHTMLReflowState reflowState(mPresContext, *psd->mReflowState, aFrame, availSize, reason); - reflowState.lineLayout = this; + reflowState.mLineLayout = this; reflowState.isTopOfPage = mIsTopOfPage; mUnderstandsWhiteSpace = PR_FALSE; @@ -784,7 +784,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, pfd->mRelativePos = reflowState.mStylePosition->mPosition == NS_STYLE_POSITION_RELATIVE; if (pfd->mRelativePos) { - pfd->mOffsets = reflowState.computedOffsets; + pfd->mOffsets = reflowState.mComputedOffsets; } // We want to guarantee that we always make progress when diff --git a/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp index 08c09bdfbd2..15ea7f95f04 100644 --- a/mozilla/layout/html/base/src/nsTextFrame.cpp +++ b/mozilla/layout/html/base/src/nsTextFrame.cpp @@ -2286,7 +2286,7 @@ nsTextFrame::Reflow(nsIPresContext& aPresContext, // XXX If there's no line layout, we shouldn't even have created this // frame. This may happen if, for example, this is text inside a table // but not inside a cell. For now, just don't reflow. - if (nsnull == aReflowState.lineLayout) { + if (nsnull == aReflowState.mLineLayout) { // XXX Add a method to aMetrics that does this; we do it several places aMetrics.width = 0; aMetrics.height = 0; @@ -2306,7 +2306,7 @@ nsTextFrame::Reflow(nsIPresContext& aPresContext, startingOffset = prev->mContentOffset + prev->mContentLength; } - nsLineLayout& lineLayout = *aReflowState.lineLayout; + nsLineLayout& lineLayout = *aReflowState.mLineLayout; TextStyle ts(&aPresContext, *aReflowState.rendContext, mStyleContext); // Initialize mFlags (without destroying the TEXT_BLINK_ON bit) bits diff --git a/mozilla/layout/html/base/src/nsViewportFrame.cpp b/mozilla/layout/html/base/src/nsViewportFrame.cpp index b5d1ef8cf13..d657d556ead 100644 --- a/mozilla/layout/html/base/src/nsViewportFrame.cpp +++ b/mozilla/layout/html/base/src/nsViewportFrame.cpp @@ -241,8 +241,8 @@ ViewportFrame::ReflowFixedFrame(nsIPresContext& aPresContext, } // Position the child - nsRect rect(kidReflowState.computedOffsets.left + kidReflowState.mComputedMargin.left, - kidReflowState.computedOffsets.top + kidReflowState.mComputedMargin.top, + nsRect rect(kidReflowState.mComputedOffsets.left + kidReflowState.mComputedMargin.left, + kidReflowState.mComputedOffsets.top + kidReflowState.mComputedMargin.top, kidDesiredSize.width, kidDesiredSize.height); aKidFrame->SetRect(rect); htmlReflow->DidReflow(aPresContext, NS_FRAME_REFLOW_FINISHED);