Bug 1464883 - [css-grid] Remove a redundant ResolveGapToLength call. r=dholbert
authorMats Palmgren <mats@mozilla.com>
Mon, 04 Jun 2018 23:18:57 +0200
changeset 421251 c4c90903c8e9ca2e76edc680dde3b231d1f3f447
parent 421250 2acc5be853afe7e3ede8e7a8a9896bfea48bf8cf
child 421252 3076a2ea0082c0831817859fb8ee10123fa594ab
push id103999
push usermpalmgren@mozilla.com
push dateMon, 04 Jun 2018 21:19:09 +0000
treeherdermozilla-inbound@c4c90903c8e9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1464883
milestone62.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 1464883 - [css-grid] Remove a redundant ResolveGapToLength call. r=dholbert mGridGap is already initialized in nsGridContainerFrame::Tracks::Initialize.
layout/generic/nsGridContainerFrame.cpp
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -6390,19 +6390,16 @@ nsGridContainerFrame::IntrinsicISize(gfx
   }
   state.mCols.Initialize(state.mColFunctions, state.mGridStyle->mColumnGap,
                          grid.mGridColEnd, NS_UNCONSTRAINEDSIZE);
   auto constraint = aType == nsLayoutUtils::MIN_ISIZE ?
     SizingConstraint::eMinContent : SizingConstraint::eMaxContent;
   state.mCols.CalculateSizes(state, state.mGridItems, state.mColFunctions,
                              NS_UNCONSTRAINEDSIZE, &GridArea::mCols,
                              constraint);
-  state.mCols.mGridGap =
-    nsLayoutUtils::ResolveGapToLength(state.mGridStyle->mColumnGap,
-                                      NS_UNCONSTRAINEDSIZE);
   nscoord length = 0;
   for (const TrackSize& sz : state.mCols.mSizes) {
     length += sz.mBase;
   }
   return length + state.mCols.SumOfGridGaps();
 }
 
 nscoord