Bug 1581106 part 1 - Remove unused aNumRepeatTracks param (idempotent change). r=dholbert
authorMats Palmgren <mats@mozilla.com>
Mon, 30 Sep 2019 17:50:55 +0000
changeset 495707 75d66006c4a1c6679097fca7ab0d778d780a6001
parent 495706 49d28cc0bf9926d4d553dc747b5fd1a73bbdb21b
child 495708 9fd948f30837f9d2255bbd476558da227c0e5e44
push id114140
push userdvarga@mozilla.com
push dateWed, 02 Oct 2019 18:04:51 +0000
treeherdermozilla-inbound@32eb0ea893f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1581106
milestone71.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 1581106 part 1 - Remove unused aNumRepeatTracks param (idempotent change). r=dholbert Differential Revision: https://phabricator.services.mozilla.com/D46372
layout/generic/nsGridContainerFrame.cpp
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -1322,30 +1322,27 @@ struct nsGridContainerFrame::TrackSizing
  */
 class MOZ_STACK_CLASS nsGridContainerFrame::LineNameMap {
  public:
   /**
    * Create a LineNameMap.
    * @param aStylePosition the style for the grid container
    * @param aImplicitNamedAreas the implicit areas for the grid container
    * @param aGridTemplate is the grid-template-rows/columns data for this axis
-   * @param aNumRepeatTracks the number of actual tracks associated with
-   *   a repeat(auto-fill/fit) track (zero or more), or zero if there is no
-   *   specified repeat(auto-fill/fit) track
    * @param aClampMinLine/aClampMaxLine in a non-subgrid axis it's kMin/MaxLine;
    *   in a subgrid axis it's its explicit grid bounds (all 1-based)
    * @param aParentLineNameMap the parent grid's map parallel to this map, or
    *                           null if this map isn't for a subgrid
    * @param aRange the subgrid's range in the parent grid, or null
    * @param aIsSameDirection true if our axis progresses in the same direction
    *                              in the subgrid and parent
    */
   LineNameMap(const nsStylePosition* aStylePosition,
               const ImplicitNamedAreas* aImplicitNamedAreas,
-              const TrackSizingFunctions& aTracks, uint32_t aNumRepeatTracks,
+              const TrackSizingFunctions& aTracks,
               int32_t aClampMinLine, int32_t aClampMaxLine,
               const LineNameMap* aParentLineNameMap, const LineRange* aRange,
               bool aIsSameDirection)
       : mClampMinLine(aClampMinLine),
         mClampMaxLine(aClampMaxLine),
         mStylePosition(aStylePosition),
         mAreas(aImplicitNamedAreas),
         mTracks(aTracks),
@@ -4074,86 +4071,72 @@ void nsGridContainerFrame::Grid::PlaceGr
   // Note that this is for a grid with a 1,1 origin.  We'll change that
   // to a 0,0 based grid after placing definite lines.
   const nsStylePosition* const gridStyle = aState.mGridStyle;
   const auto* areas = gridStyle->mGridTemplateAreas.IsNone()
                           ? nullptr
                           : &*gridStyle->mGridTemplateAreas.AsAreas();
   int32_t clampMinColLine = kMinLine;
   int32_t clampMaxColLine = kMaxLine;
-  uint32_t numRepeatCols;
   const LineNameMap* parentLineNameMap = nullptr;
   const LineRange* subgridRange = nullptr;
   bool subgridAxisIsSameDirection = true;
   if (!aState.mFrame->IsColSubgrid()) {
-    numRepeatCols = aState.mColFunctions.InitRepeatTracks(
+    aState.mColFunctions.InitRepeatTracks(
         gridStyle->mColumnGap, aSizes.mMin.ISize(aState.mWM),
         aSizes.mSize.ISize(aState.mWM), aSizes.mMax.ISize(aState.mWM));
     uint32_t areaCols = areas ? areas->width + 1 : 1;
     mExplicitGridColEnd = aState.mColFunctions.ComputeExplicitGridEnd(areaCols);
   } else {
     const auto* subgrid = aState.mFrame->GetProperty(Subgrid::Prop());
     subgridRange = &subgrid->SubgridCols();
     uint32_t extent = subgridRange->Extent();
     mExplicitGridColEnd = extent + 1;  // the grid is 1-based at this point
     clampMinColLine = 1;
     clampMaxColLine = mExplicitGridColEnd;
-    const auto& cols = gridStyle->mGridTemplateColumns;
-    numRepeatCols =
-        cols.HasRepeatAuto()
-            ? std::max<uint32_t>(
-                  extent - cols.AsTrackList()->line_names.Length(), 1)
-            : 0;
     parentLineNameMap =
         ParentLineMapForAxis(subgrid->mIsOrthogonal, eLogicalAxisInline);
     auto parentWM =
         aState.mFrame->ParentGridContainerForSubgrid()->GetWritingMode();
     subgridAxisIsSameDirection =
         aState.mWM.ParallelAxisStartsOnSameSide(eLogicalAxisInline, parentWM);
   }
   mGridColEnd = mExplicitGridColEnd;
   LineNameMap colLineNameMap(gridStyle, mAreas, aState.mColFunctions,
-                             numRepeatCols, clampMinColLine, clampMaxColLine,
+                             clampMinColLine, clampMaxColLine,
                              parentLineNameMap, subgridRange,
                              subgridAxisIsSameDirection);
 
   int32_t clampMinRowLine = kMinLine;
   int32_t clampMaxRowLine = kMaxLine;
-  uint32_t numRepeatRows;
   if (!aState.mFrame->IsRowSubgrid()) {
-    numRepeatRows = aState.mRowFunctions.InitRepeatTracks(
+    aState.mRowFunctions.InitRepeatTracks(
         gridStyle->mRowGap, aSizes.mMin.BSize(aState.mWM),
         aSizes.mSize.BSize(aState.mWM), aSizes.mMax.BSize(aState.mWM));
     uint32_t areaRows = areas ? areas->strings.Length() + 1 : 1;
     mExplicitGridRowEnd = aState.mRowFunctions.ComputeExplicitGridEnd(areaRows);
     parentLineNameMap = nullptr;
     subgridRange = nullptr;
   } else {
     const auto* subgrid = aState.mFrame->GetProperty(Subgrid::Prop());
     subgridRange = &subgrid->SubgridRows();
     uint32_t extent = subgridRange->Extent();
     mExplicitGridRowEnd = extent + 1;  // the grid is 1-based at this point
     clampMinRowLine = 1;
     clampMaxRowLine = mExplicitGridRowEnd;
-    const auto& rows = gridStyle->mGridTemplateRows;
-    numRepeatRows =
-        rows.HasRepeatAuto()
-            ? std::max<uint32_t>(
-                  extent - rows.AsTrackList()->line_names.Length(), 1)
-            : 0;
     parentLineNameMap =
         ParentLineMapForAxis(subgrid->mIsOrthogonal, eLogicalAxisBlock);
     auto parentWM =
         aState.mFrame->ParentGridContainerForSubgrid()->GetWritingMode();
     subgridAxisIsSameDirection =
         aState.mWM.ParallelAxisStartsOnSameSide(eLogicalAxisBlock, parentWM);
   }
   mGridRowEnd = mExplicitGridRowEnd;
   LineNameMap rowLineNameMap(gridStyle, mAreas, aState.mRowFunctions,
-                             numRepeatRows, clampMinRowLine, clampMaxRowLine,
+                             clampMinRowLine, clampMaxRowLine,
                              parentLineNameMap, subgridRange,
                              subgridAxisIsSameDirection);
 
   const bool isSubgridOrItemInSubgrid =
       aState.mFrame->IsSubgrid() || !!mParentGrid;
   auto SetSubgridChildEdgeBits =
       [this, isSubgridOrItemInSubgrid](GridItemInfo& aItem) -> void {
     if (isSubgridOrItemInSubgrid) {