Bug 1491510: Treat 'auto' cross size as definite, for 'contain:size' flex container. r=mats
authorDaniel Holbert <dholbert@cs.stanford.edu>
Sat, 15 Sep 2018 18:06:18 +0000
changeset 436612 27f227c43b5c
parent 436611 9a379342cfff
child 436613 52573727971b
push id34650
push usernerli@mozilla.com
push dateSun, 16 Sep 2018 09:49:57 +0000
treeherdermozilla-central@300d0f16cf6f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs1491510
milestone64.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 1491510: Treat 'auto' cross size as definite, for 'contain:size' flex container. r=mats Differential Revision: https://phabricator.services.mozilla.com/D5947
layout/generic/nsFlexContainerFrame.cpp
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -4161,16 +4161,17 @@ nsFlexContainerFrame::ComputeCrossSize(c
       return aAvailableBSizeForContent;
     }
     return std::min(effectiveComputedBSize, aSumLineCrossSizes);
   }
 
   // Row-oriented case, with size-containment:
   // Behave as if we had no content and just use our MinBSize.
   if (aReflowInput.mStyleDisplay->IsContainSize()) {
+    *aIsDefinite = true;
     return aReflowInput.ComputedMinBSize();
   }
 
   // Row-oriented case (cross axis is block axis), with auto BSize:
   // Shrink-wrap our line(s), subject to our min-size / max-size
   // constraints in that (block) axis.
   // XXXdholbert Handle constrained-aAvailableBSizeForContent case here.
   *aIsDefinite = false;