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
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
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();
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);
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
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