[LFC][BFC] assert-not-implemented-yet on inflow non-replaced height when style is...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jul 2018 13:45:33 +0000 (13:45 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jul 2018 13:45:33 +0000 (13:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=187969

Reviewed by Antti Koivisto.

Assert on unsupported height types when computing inflow non-replaced height.

* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234253 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp

index 03935da..95cb150 100644 (file)
@@ -1,3 +1,15 @@
+2018-07-26  Zalan Bujtas  <zalan@apple.com>
+
+        [LFC][BFC] assert-not-implemented-yet on inflow non-replaced height when style is not fixed/auto.
+        https://bugs.webkit.org/show_bug.cgi?id=187969
+
+        Reviewed by Antti Koivisto.
+
+        Assert on unsupported height types when computing inflow non-replaced height.
+
+        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
+        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
+
 2018-07-26  Antoine Quint  <graouts@apple.com>
 
         [Web Animations] REGRESSION: transition added immediately after element creation doesn't work
index a01f046..8b5265a 100644 (file)
@@ -85,8 +85,14 @@ HeightAndMargin BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMarg
         VerticalEdges collapsedMargin = { MarginCollapse::marginTop(layoutContext, layoutBox), MarginCollapse::marginBottom(layoutContext, layoutBox) };
         auto borderAndPaddingTop = displayBox.borderTop() + displayBox.paddingTop();
         
-        if (!style.logicalHeight().isAuto())
-            return { style.logicalHeight().value(), nonCollapsedMargin, collapsedMargin };
+        auto height = style.logicalHeight();
+        if (!height.isAuto()) {
+            if (height.isFixed())
+                return { style.logicalHeight().value(), nonCollapsedMargin, collapsedMargin };
+
+            // Most notably height percentage.
+            ASSERT_NOT_IMPLEMENTED_YET();
+        }
 
         if (!is<Container>(layoutBox) || !downcast<Container>(layoutBox).hasInFlowChild())
             return { 0, nonCollapsedMargin, collapsedMargin };