Bug 1305244 part 3 - [css-grid] Stop handling <flex> track min-sizing in layout since they can't occur anymore. r=dholbert
authorMats Palmgren <mats@mozilla.com>
Sat, 29 Oct 2016 01:30:10 +0200
changeset 346689 ac4628bf99126783da833e1641d673c92ee4b1a7
parent 346688 1f4500ce11a744b7a6ae93b85020a4000213a40f
child 346690 3d88f715c2d232c8b99f41e72f72a53c3b74f427
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1305244
milestone52.0a1
Bug 1305244 part 3 - [css-grid] Stop handling <flex> track min-sizing in layout since they can't occur anymore. r=dholbert
layout/generic/nsGridContainerFrame.cpp
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -262,25 +262,26 @@ nsGridContainerFrame::TrackSize::Initial
     minSizeUnit = eStyleUnit_Auto;
     mState |= eIndefinitePercentMinSizing;
   }
   if (::IsPercentOfIndefiniteSize(aMaxCoord, aPercentageBasis)) {
     maxSizeUnit = eStyleUnit_Auto;
   }
   // http://dev.w3.org/csswg/css-grid/#algo-init
   switch (minSizeUnit) {
-    case eStyleUnit_FlexFraction:
     case eStyleUnit_Auto:
       mState |= eAutoMinSizing;
       break;
     case eStyleUnit_Enumerated:
       mState |= IsMinContent(aMinCoord) ? eMinContentMinSizing
                                         : eMaxContentMinSizing;
       break;
     default:
+      MOZ_ASSERT(minSizeUnit != eStyleUnit_FlexFraction,
+                 "<flex> min-sizing is invalid as a track size");
       mBase = ::ResolveToDefiniteSize(aMinCoord, aPercentageBasis);
   }
   switch (maxSizeUnit) {
     case eStyleUnit_Auto:
       mState |= eAutoMaxSizing;
       mLimit = NS_UNCONSTRAINEDSIZE;
       break;
     case eStyleUnit_Enumerated: