[LFC] Margin before/after/start/end initial value is 0 and not auto.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Jan 2019 13:59:43 +0000 (13:59 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Jan 2019 13:59:43 +0000 (13:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194090

Reviewed by Antti Koivisto.

Source/WebCore:

Don't treat it like auto.

* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):

Tools:

* LayoutReloaded/misc/LFC-passing-tests.txt:

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

Source/WebCore/ChangeLog
Source/WebCore/layout/FormattingContextGeometry.cpp
Tools/ChangeLog
Tools/LayoutReloaded/misc/LFC-passing-tests.txt

index bcc2ddb..8169133 100644 (file)
@@ -1,5 +1,18 @@
 2019-01-31  Zalan Bujtas  <zalan@apple.com>
 
+        [LFC] Margin before/after/start/end initial value is 0 and not auto.
+        https://bugs.webkit.org/show_bug.cgi?id=194090
+
+        Reviewed by Antti Koivisto.
+
+        Don't treat it like auto.
+
+        * layout/FormattingContextGeometry.cpp:
+        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
+        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
+
+2019-01-31  Zalan Bujtas  <zalan@apple.com>
+
         [LFC] Use the used margin values in outOfFlowReplacedHorizontalGeometry consistently
         https://bugs.webkit.org/show_bug.cgi?id=194074
 
index 38cf4c2..e4148ac 100644 (file)
@@ -554,8 +554,8 @@ VerticalGeometry FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry(
     auto isStaticallyPositioned = !top && !bottom;
     auto height = inlineReplacedHeightAndMargin(layoutState, layoutBox, usedHeight).height;
     auto computedVerticalMargin = Geometry::computedVerticalMargin(layoutState, layoutBox);
-    Optional<LayoutUnit> usedMarginBefore;
-    Optional<LayoutUnit> usedMarginAfter;
+    Optional<LayoutUnit> usedMarginBefore = computedVerticalMargin.before;
+    Optional<LayoutUnit> usedMarginAfter = computedVerticalMargin.after;
     auto paddingTop = displayBox.paddingTop().valueOr(0);
     auto paddingBottom = displayBox.paddingBottom().valueOr(0);
     auto borderTop = displayBox.borderTop();
@@ -642,8 +642,8 @@ HorizontalGeometry FormattingContext::Geometry::outOfFlowReplacedHorizontalGeome
     auto right = computedValueIfNotAuto(style.logicalRight(), containingBlockWidth);
     auto isStaticallyPositioned = !left && !right;
     auto computedHorizontalMargin = Geometry::computedHorizontalMargin(layoutState, layoutBox);
-    Optional<LayoutUnit> usedMarginStart;
-    Optional<LayoutUnit> usedMarginEnd;
+    Optional<LayoutUnit> usedMarginStart = computedHorizontalMargin.start;
+    Optional<LayoutUnit> usedMarginEnd = computedHorizontalMargin.end;
     auto width = inlineReplacedWidthAndMargin(layoutState, layoutBox, usedWidth).width;
     auto paddingLeft = displayBox.paddingLeft().valueOr(0);
     auto paddingRight = displayBox.paddingRight().valueOr(0);
index 0c5eb52..16c9d46 100644 (file)
@@ -1,5 +1,14 @@
 2019-01-31  Zalan Bujtas  <zalan@apple.com>
 
+        [LFC] Margin before/after/start/end initial value is 0 and not auto.
+        https://bugs.webkit.org/show_bug.cgi?id=194090
+
+        Reviewed by Antti Koivisto.
+
+        * LayoutReloaded/misc/LFC-passing-tests.txt:
+
+2019-01-31  Zalan Bujtas  <zalan@apple.com>
+
         [LFC] Use the used margin values in outOfFlowReplacedHorizontalGeometry consistently
         https://bugs.webkit.org/show_bug.cgi?id=194074
 
index 2480fe4..2163818 100644 (file)
@@ -421,6 +421,14 @@ css2.1/20110323/absolute-replaced-height-007.htm
 css2.1/20110323/absolute-replaced-height-011.htm
 css2.1/20110323/absolute-replaced-height-012.htm
 css2.1/20110323/absolute-replaced-height-014.htm
+css2.1/20110323/absolute-replaced-height-018.htm
+css2.1/20110323/absolute-replaced-height-019.htm
+css2.1/20110323/absolute-replaced-height-021.htm
+css2.1/20110323/absolute-replaced-height-025.htm
+css2.1/20110323/absolute-replaced-height-026.htm
+css2.1/20110323/block-replaced-height-004.htm
+css2.1/20110323/block-replaced-height-005.htm
+css2.1/20110323/block-replaced-height-007.htm
 css2.1/t0402-c71-fwd-parsing-00-f.html
 css2.1/t0402-c71-fwd-parsing-01-f.html
 css2.1/t0402-c71-fwd-parsing-03-f.html