[LFC] The static position for an out-of-flow box should include the previous sibling...
[WebKit-https.git] / Source / WebCore / ChangeLog
index aeee5a8..972ad9b 100644 (file)
@@ -1,3 +1,34 @@
+2018-06-29  Zalan Bujtas  <zalan@apple.com>
+
+        [LFC] The static position for an out-of-flow box should include the previous sibling's collapsed margin
+        https://bugs.webkit.org/show_bug.cgi?id=187169
+
+        Reviewed by Antti Koivisto.
+
+        When computing the static position of an absolutely positioned box, we need to look at the previous sibling's bottom margin.
+        If the previous sibling happens to collapse its bottom margin with the parent's bottom margin, we still need to account for it
+        and compute the static vertical position as if the bottom margin was not collapsed.
+
+        * layout/FormattingContext.cpp:
+        (WebCore::Layout::FormattingContext::computeFloatingHeightAndMargin const):
+        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
+        * layout/FormattingContextGeometry.cpp:
+        (WebCore::Layout::staticVerticalPositionForOutOfFlowPositioned):
+        * layout/LayoutContext.cpp:
+        (WebCore::Layout::LayoutContext::initializeRoot):
+        * layout/Verification.cpp:
+        (WebCore::Layout::outputMismatchingBoxInformationIfNeeded):
+        * layout/blockformatting/BlockFormattingContext.cpp:
+        (WebCore::Layout::BlockFormattingContext::computeInFlowHeightAndMargin const):
+        * layout/displaytree/DisplayBox.cpp:
+        (WebCore::Display::Box::nonCollapsedMarginBox const):
+        * layout/displaytree/DisplayBox.h:
+        (WebCore::Display::Box::setHasValidVerticalNonCollapsedMargin):
+        (WebCore::Display::Box::setVerticalMargin):
+        (WebCore::Display::Box::setVerticalNonCollapsedMargin):
+        (WebCore::Display::Box::nonCollapsedMarginTop const):
+        (WebCore::Display::Box::nonCollapsedMarginBottom const):
+
 2018-06-27  Antoine Quint  <graouts@apple.com>
 
         [Web Animations] Using a Web Animation leaks the Document