Bug 1304636 Part 2: Similarly handle the min-height case. draft
authorBrad Werth <bwerth@mozilla.com>
Thu, 17 Nov 2016 15:41:49 -0800
changeset 440679 25eda2940a993cf97ac7c66499301562d465c752
parent 440678 9ecd59c57ee8bf632c3d3be84558f264f1771d12
child 440680 a59506b5eb9e34332a4aae98abcc6227e8e61657
push id36295
push userbwerth@mozilla.com
push dateFri, 18 Nov 2016 00:24:00 +0000
bugs1304636
milestone53.0a1
Bug 1304636 Part 2: Similarly handle the min-height case. MozReview-Commit-ID: BmMvny3HePe
layout/style/nsComputedDOMStyle.cpp
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -4914,21 +4914,18 @@ nsComputedDOMStyle::ShouldHonorMinSizeAu
 }
 
 already_AddRefed<CSSValue>
 nsComputedDOMStyle::DoGetMinHeight()
 {
   RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
   nsStyleCoord minHeight = StylePosition()->mMinHeight;
 
-  if (eStyleUnit_Auto == minHeight.GetUnit()) {
-    // In non-flexbox contexts, "min-height: auto" means "min-height: 0"
-    // XXXdholbert For flex items, we should set |minHeight| to the
-    // -moz-min-content keyword, instead of 0, once we support -moz-min-content
-    // as a height value.
+  if (eStyleUnit_Auto == minHeight.GetUnit() &&
+      !ShouldHonorMinSizeAutoInAxis(eAxisVertical)) {
     minHeight.SetCoordValue(0);
   }
 
   SetValueToCoord(val, minHeight, true, nullptr, nsCSSProps::kWidthKTable);
   return val.forget();
 }
 
 already_AddRefed<CSSValue>