[LFC][BFC][MarginCollapsing] marginAfterCollapsesWithParentMarginAfter/marginAfterCol...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 Jan 2019 13:13:00 +0000 (13:13 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 Jan 2019 13:13:00 +0000 (13:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193864

Reviewed by Antti Koivisto.

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

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

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

index 2671c6b..f66e0de 100644 (file)
@@ -1,5 +1,16 @@
 2019-01-26  Zalan Bujtas  <zalan@apple.com>
 
+        [LFC][BFC][MarginCollapsing] marginAfterCollapsesWithParentMarginAfter/marginAfterCollapsesWithLastInFlowChildMarginAfter should check for border/padding after values.
+        https://bugs.webkit.org/show_bug.cgi?id=193864
+
+        Reviewed by Antti Koivisto.
+
+        * layout/blockformatting/BlockMarginCollapse.cpp:
+        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
+        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter):
+
+2019-01-26  Zalan Bujtas  <zalan@apple.com>
+
         [LFC] Box::nextInFlowOrFloatingSibling() should always return sibling floats as well.
         https://bugs.webkit.org/show_bug.cgi?id=193855
 
index 02f7f00..4424fb2 100644 (file)
@@ -295,11 +295,11 @@ bool BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMargi
         return false;
 
     // the box has no bottom padding, and
-    if (hasPaddingBefore(parent))
+    if (hasPaddingAfter(parent))
         return false;
 
     // the box has no bottom border, and
-    if (hasBorderBefore(parent))
+    if (hasBorderAfter(parent))
         return false;
 
     // the child's bottom margin neither collapses with a top margin that has clearance...
@@ -337,11 +337,11 @@ bool BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowC
         return false;
 
     // the box has no bottom padding, and
-    if (hasPaddingBefore(layoutBox))
+    if (hasPaddingAfter(layoutBox))
         return false;
 
     // the box has no bottom border, and
-    if (hasBorderBefore(layoutBox))
+    if (hasBorderAfter(layoutBox))
         return false;
 
     // the child's bottom margin neither collapses with a top margin that has clearance...