Bug 1174450 part 2 - Rename most AddIntrinsicSizeOffset params to follow the aName standard. r=jfkthame
authorMats Palmgren <mats@mozilla.com>
Tue, 16 Jun 2015 11:21:03 +0000
changeset 279875 049abdaa341db79086dd9414d7a4e88f0830a7f5
parent 279874 06f474c578d60a22a95a0f204214ca14e0034dfb
child 279876 0ab7b15d0f9e5a2a1bc6d3e7ab8117fb03a51d90
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame
bugs1174450
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1174450 part 2 - Rename most AddIntrinsicSizeOffset params to follow the aName standard. r=jfkthame
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -4317,121 +4317,121 @@ GetIntrinsicCoord(const nsStyleCoord& aS
 
 #ifdef DEBUG_INTRINSIC_WIDTH
 static int32_t gNoiseIndent = 0;
 #endif
 
 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)
 {
   // We also need to track what has been added on outside of the box
   // (controlled by 'box-sizing') where 'width', 'min-width' and
   // 'max-width' are applied.  We have to account for these properties
   // after getting all the offsets (margin, border, padding) because
   // percentages do not operate linearly.
   // Doing this is ok because although percentages aren't handled
   // linearly, they are handled monotonically.
   nscoord coordOutsideISize = 0;
   float pctOutsideISize = 0;
   float pctTotal = 0.0f;
 
   if (!(aFlags & nsLayoutUtils::IGNORE_PADDING)) {
-    coordOutsideISize += offsets.hPadding;
-    pctOutsideISize += offsets.hPctPadding;
-
-    if (boxSizing == NS_STYLE_BOX_SIZING_PADDING) {
+    coordOutsideISize += aOffsets.hPadding;
+    pctOutsideISize += aOffsets.hPctPadding;
+
+    if (aBoxSizing == NS_STYLE_BOX_SIZING_PADDING) {
       min += coordOutsideISize;
       result = NSCoordSaturatingAdd(result, coordOutsideISize);
       pctTotal += pctOutsideISize;
 
       coordOutsideISize = 0;
       pctOutsideISize = 0.0f;
     }
   }
 
-  coordOutsideISize += offsets.hBorder;
-
-  if (boxSizing == NS_STYLE_BOX_SIZING_BORDER) {
+  coordOutsideISize += aOffsets.hBorder;
+
+  if (aBoxSizing == NS_STYLE_BOX_SIZING_BORDER) {
     min += coordOutsideISize;
     result = NSCoordSaturatingAdd(result, coordOutsideISize);
     pctTotal += pctOutsideISize;
 
     coordOutsideISize = 0;
     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);
   }
   else if (aType == nsLayoutUtils::MIN_ISIZE &&
            // 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
   }
   else {
     // NOTE: We could really do a lot better for percents and for some
     // cases of calc() containing percent (certainly including any where
     // the coefficient on the percent is positive and there are no max()
     // expressions).  However, doing better for percents wouldn't be
     // backwards compatible.
     result = AddPercents(aType, result, pctTotal);
   }
 
   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
     // container explicitly considers them during space distribution.
     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)
       result = maxISize;
   }
 
   if (haveFixedMinISize ||
-      GetIntrinsicCoord(styleMinISize, aRenderingContext, aFrame,
+      GetIntrinsicCoord(aStyleMinSize, aRenderingContext, aFrame,
                         PROP_MIN_WIDTH, minISize)) {
     minISize = AddPercents(aType, minISize + coordOutsideISize, pctOutsideISize);
     if (result < minISize)
       result = minISize;
   }
 
   min = AddPercents(aType, min, pctTotal);
   if (result < min)
@@ -4446,18 +4446,18 @@ AddIntrinsicSizeOffset(nsRenderingContex
       GetMinimumWidgetSize(presContext, aFrame, disp->mAppearance,
                            &size, &canOverride);
 
     nscoord themeISize =
       presContext->DevPixelsToAppUnits(aContainerWM.IsVertical() ? size.height
                                                                  : 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;
     }
   }
   return result;
 }