[LFC][BFC][MarginCollapsing] Anonymous block container's margin before does not colla...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Jan 2019 14:50:43 +0000 (14:50 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Jan 2019 14:50:43 +0000 (14:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193952

Reviewed by Antti Koivisto.

* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter):

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

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

index b1e5b8d..8d0c430 100644 (file)
@@ -1,3 +1,13 @@
+2019-01-29  Zalan Bujtas  <zalan@apple.com>
+
+        [LFC][BFC][MarginCollapsing] Anonymous block container's margin before does not collapse with previous inflow sibling margin after.
+        https://bugs.webkit.org/show_bug.cgi?id=193952
+
+        Reviewed by Antti Koivisto.
+
+        * layout/blockformatting/BlockMarginCollapse.cpp:
+        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter):
+
 2019-01-29  Frederic Wang  <fwang@igalia.com>
 
         Allow scrolling tree nodes to exist in a detached state
index e18cb29..61576a3 100644 (file)
@@ -151,6 +151,9 @@ bool BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSi
 {
     ASSERT(layoutBox.isBlockLevelBox());
 
+    if (layoutBox.isAnonymous())
+        return false;
+
     if (!layoutBox.previousInFlowSibling())
         return false;