Title: [246464] trunk/Source/WebCore
Revision
246464
Author
[email protected]
Date
2019-06-15 07:36:40 -0700 (Sat, 15 Jun 2019)

Log Message

[LFC][MarginCollapsing] Remove redundant checks in MarginCollapse::marginBefore/AfterCollapsesWith*
https://bugs.webkit.org/show_bug.cgi?id=198882
<rdar://problem/51773334>

Reviewed by Antti Koivisto.

In-flow child can neither be floating nor out-of-flow positioned.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (246463 => 246464)


--- trunk/Source/WebCore/ChangeLog	2019-06-15 14:16:13 UTC (rev 246463)
+++ trunk/Source/WebCore/ChangeLog	2019-06-15 14:36:40 UTC (rev 246464)
@@ -1,5 +1,19 @@
 2019-06-15  Zalan Bujtas  <[email protected]>
 
+        [LFC][MarginCollapsing] Remove redundant checks in MarginCollapse::marginBefore/AfterCollapsesWith*
+        https://bugs.webkit.org/show_bug.cgi?id=198882
+        <rdar://problem/51773334>
+
+        Reviewed by Antti Koivisto.
+
+        In-flow child can neither be floating nor out-of-flow positioned.
+
+        * layout/blockformatting/BlockMarginCollapse.cpp:
+        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore):
+        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter):
+
+2019-06-15  Zalan Bujtas  <[email protected]>
+
         [LFC][MarginCollapsing] Collapsed through margin values preserve quirk state.
         https://bugs.webkit.org/show_bug.cgi?id=198885
         <rdar://problem/51773568>

Modified: trunk/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp (246463 => 246464)


--- trunk/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp	2019-06-15 14:16:13 UTC (rev 246463)
+++ trunk/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp	2019-06-15 14:36:40 UTC (rev 246464)
@@ -212,14 +212,6 @@
     if (hasClearance(layoutState, firstInFlowChild))
         return false;
 
-    // Margins between a floated box and any other box do not collapse.
-    if (firstInFlowChild.isFloatingPositioned())
-        return false;
-
-    // Margins of absolutely positioned boxes do not collapse.
-    if (firstInFlowChild.isOutOfFlowPositioned())
-        return false;
-
     // Margins of inline-block boxes do not collapse.
     if (firstInFlowChild.isInlineBlockBox())
         return false;
@@ -350,14 +342,6 @@
         && (marginAfterCollapsesWithParentMarginBefore(layoutState, lastInFlowChild) || hasClearance(layoutState, lastInFlowChild)))
         return false;
 
-    // Margins between a floated box and any other box do not collapse.
-    if (lastInFlowChild.isFloatingPositioned())
-        return false;
-
-    // Margins of absolutely positioned boxes do not collapse.
-    if (lastInFlowChild.isOutOfFlowPositioned())
-        return false;
-
     // Margins of inline-block boxes do not collapse.
     if (lastInFlowChild.isInlineBlockBox())
         return false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to