[LFC] Add support for min/max-height percentage values.
[WebKit-https.git] / Source / WebCore / layout / blockformatting / BlockFormattingContext.cpp
index ada5b46..ac9d215 100644 (file)
@@ -291,14 +291,13 @@ void BlockFormattingContext::computeHeightAndMargin(const LayoutContext& layoutC
     };
 
     auto heightAndMargin = compute({ });
     };
 
     auto heightAndMargin = compute({ });
-    // FIXME: Add support for percentage values where the containing block's height is explicitly specified.
-    if (auto maxHeight = Geometry::fixedValue(layoutBox.style().logicalMaxHeight())) {
+    if (auto maxHeight = Geometry::computedMaxHeight(layoutContext, layoutBox)) {
         auto maxHeightAndMargin = compute(maxHeight);
         if (heightAndMargin.height > maxHeightAndMargin.height)
             heightAndMargin = maxHeightAndMargin;
     }
 
         auto maxHeightAndMargin = compute(maxHeight);
         if (heightAndMargin.height > maxHeightAndMargin.height)
             heightAndMargin = maxHeightAndMargin;
     }
 
-    if (auto minHeight = Geometry::fixedValue(layoutBox.style().logicalMinHeight())) {
+    if (auto minHeight = Geometry::computedMinHeight(layoutContext, layoutBox)) {
         auto minHeightAndMargin = compute(minHeight);
         if (heightAndMargin.height < minHeightAndMargin.height)
             heightAndMargin = minHeightAndMargin;
         auto minHeightAndMargin = compute(minHeight);
         if (heightAndMargin.height < minHeightAndMargin.height)
             heightAndMargin = minHeightAndMargin;