From 0eec58f09371d2e20c8517191a151b54c7379e6d Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Tue, 16 Jun 2015 11:21:03 +0000 Subject: [PATCH] Bug 1174450 part 2 - Rename most AddIntrinsicSizeOffset params to follow the aName standard. r=jfkthame --- layout/base/nsLayoutUtils.cpp | 44 +++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 049f6ab3375..04812d124b7 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -4322,14 +4322,14 @@ static int32_t gNoiseIndent = 0; static nscoord AddIntrinsicSizeOffset(nsRenderingContext* aRenderingContext, nsIFrame* aFrame, - const nsIFrame::IntrinsicISizeOffsetData& offsets, + const nsIFrame::IntrinsicISizeOffsetData& aOffsets, nsLayoutUtils::IntrinsicISizeType aType, - uint8_t boxSizing, + uint8_t aBoxSizing, nscoord result, nscoord min, - const nsStyleCoord& styleISize, - const nsStyleCoord& styleMinISize, - const nsStyleCoord& styleMaxISize, + const nsStyleCoord& aStyleSize, + const nsStyleCoord& aStyleMinSize, + const nsStyleCoord& aStyleMaxSize, uint32_t aFlags, WritingMode aContainerWM) { @@ -4345,10 +4345,10 @@ AddIntrinsicSizeOffset(nsRenderingContext* aRenderingContext, float pctTotal = 0.0f; if (!(aFlags & nsLayoutUtils::IGNORE_PADDING)) { - coordOutsideISize += offsets.hPadding; - pctOutsideISize += offsets.hPctPadding; + coordOutsideISize += aOffsets.hPadding; + pctOutsideISize += aOffsets.hPctPadding; - if (boxSizing == NS_STYLE_BOX_SIZING_PADDING) { + if (aBoxSizing == NS_STYLE_BOX_SIZING_PADDING) { min += coordOutsideISize; result = NSCoordSaturatingAdd(result, coordOutsideISize); pctTotal += pctOutsideISize; @@ -4358,9 +4358,9 @@ AddIntrinsicSizeOffset(nsRenderingContext* aRenderingContext, } } - coordOutsideISize += offsets.hBorder; + coordOutsideISize += aOffsets.hBorder; - if (boxSizing == NS_STYLE_BOX_SIZING_BORDER) { + if (aBoxSizing == NS_STYLE_BOX_SIZING_BORDER) { min += coordOutsideISize; result = NSCoordSaturatingAdd(result, coordOutsideISize); pctTotal += pctOutsideISize; @@ -4369,16 +4369,16 @@ AddIntrinsicSizeOffset(nsRenderingContext* aRenderingContext, pctOutsideISize = 0.0f; } - coordOutsideISize += offsets.hMargin; - pctOutsideISize += offsets.hPctMargin; + coordOutsideISize += aOffsets.hMargin; + pctOutsideISize += aOffsets.hPctMargin; min += coordOutsideISize; result = NSCoordSaturatingAdd(result, coordOutsideISize); pctTotal += pctOutsideISize; nscoord w; - if (GetAbsoluteCoord(styleISize, w) || - GetIntrinsicCoord(styleISize, aRenderingContext, aFrame, + if (GetAbsoluteCoord(aStyleSize, w) || + GetIntrinsicCoord(aStyleSize, aRenderingContext, aFrame, PROP_WIDTH, w)) { result = AddPercents(aType, w + coordOutsideISize, pctOutsideISize); } @@ -4386,7 +4386,7 @@ AddIntrinsicSizeOffset(nsRenderingContext* aRenderingContext, // The only cases of coord-percent-calc() units that // GetAbsoluteCoord didn't handle are percent and calc()s // containing percent. - styleISize.IsCoordPercentCalcUnit() && + aStyleSize.IsCoordPercentCalcUnit() && aFrame->IsFrameOfType(nsIFrame::eReplaced)) { // A percentage width on replaced elements means they can shrink to 0. result = 0; // let |min| handle padding/border/margin @@ -4401,12 +4401,12 @@ AddIntrinsicSizeOffset(nsRenderingContext* aRenderingContext, } nscoord maxISize; - bool haveFixedMaxISize = GetAbsoluteCoord(styleMaxISize, maxISize); + bool haveFixedMaxISize = GetAbsoluteCoord(aStyleMaxSize, maxISize); nscoord minISize; // Treat "min-width: auto" as 0. bool haveFixedMinISize; - if (eStyleUnit_Auto == styleMinISize.GetUnit()) { + if (eStyleUnit_Auto == aStyleMinSize.GetUnit()) { // NOTE: Technically, "auto" is supposed to behave like "min-content" on // flex items. However, we don't need to worry about that here, because // flex items' min-sizes are intentionally ignored until the flex @@ -4414,11 +4414,11 @@ AddIntrinsicSizeOffset(nsRenderingContext* aRenderingContext, minISize = 0; haveFixedMinISize = true; } else { - haveFixedMinISize = GetAbsoluteCoord(styleMinISize, minISize); + haveFixedMinISize = GetAbsoluteCoord(aStyleMinSize, minISize); } if (haveFixedMaxISize || - GetIntrinsicCoord(styleMaxISize, aRenderingContext, aFrame, + GetIntrinsicCoord(aStyleMaxSize, aRenderingContext, aFrame, PROP_MAX_WIDTH, maxISize)) { maxISize = AddPercents(aType, maxISize + coordOutsideISize, pctOutsideISize); if (result > maxISize) @@ -4426,7 +4426,7 @@ AddIntrinsicSizeOffset(nsRenderingContext* aRenderingContext, } if (haveFixedMinISize || - GetIntrinsicCoord(styleMinISize, aRenderingContext, aFrame, + GetIntrinsicCoord(aStyleMinSize, aRenderingContext, aFrame, PROP_MIN_WIDTH, minISize)) { minISize = AddPercents(aType, minISize + coordOutsideISize, pctOutsideISize); if (result < minISize) @@ -4451,8 +4451,8 @@ AddIntrinsicSizeOffset(nsRenderingContext* aRenderingContext, : size.width); // GMWS() returns a border-box width - themeISize += offsets.hMargin; - themeISize = AddPercents(aType, themeISize, offsets.hPctMargin); + themeISize += aOffsets.hMargin; + themeISize = AddPercents(aType, themeISize, aOffsets.hPctMargin); if (themeISize > result || !canOverride) { result = themeISize;