Add changes missing from r234925.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Aug 2018 14:27:43 +0000 (14:27 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Aug 2018 14:27:43 +0000 (14:27 +0000)
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::isMarginTopCollapsedWithParent):
(WebCore::Layout::isMarginBottomCollapsedThrough):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::isMarginBottomCollapsedWithParent):

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

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

index 10922dc..da85672 100644 (file)
@@ -1,3 +1,12 @@
+2018-08-22  Zalan Bujtas  <zalan@apple.com>
+
+        Add changes missing from r234925.
+
+        * layout/blockformatting/BlockMarginCollapse.cpp:
+        (WebCore::Layout::isMarginTopCollapsedWithParent):
+        (WebCore::Layout::isMarginBottomCollapsedThrough):
+        (WebCore::Layout::BlockFormattingContext::MarginCollapse::isMarginBottomCollapsedWithParent):
+
 2018-08-22  Zan Dobersek  <zdobersek@igalia.com>
 
         [CoordGraphics] Switch to Nicosia::CompositionLayer state tracking
index 0db8fb4..7e54af7 100644 (file)
@@ -112,7 +112,7 @@ static bool isMarginTopCollapsedWithParent(const LayoutContext& layoutContext, c
     if (parentDisplayBox.borderTop())
         return false;
 
-    if (parentDisplayBox.paddingTop())
+    if (parentDisplayBox.paddingTop().value_or(0))
         return false;
 
     return true;
@@ -128,7 +128,7 @@ static bool isMarginBottomCollapsedThrough(const LayoutContext& layoutContext, c
     if (displayBox.borderTop() || displayBox.borderBottom())
         return false;
 
-    if (displayBox.paddingTop() || displayBox.paddingBottom())
+    if (displayBox.paddingTop().value_or(0) || displayBox.paddingBottom().value_or(0))
         return false;
 
     if (!layoutBox.style().height().isAuto() || !layoutBox.style().minHeight().isAuto())
@@ -289,7 +289,7 @@ bool BlockFormattingContext::MarginCollapse::isMarginBottomCollapsedWithParent(c
     if (parentDisplayBox.borderTop())
         return false;
 
-    if (parentDisplayBox.paddingTop())
+    if (parentDisplayBox.paddingTop().value_or(0))
         return false;
 
     if (!parent.style().height().isAuto())