Title: [263945] trunk/Source/WebCore
Revision
263945
Author
[email protected]
Date
2020-07-04 14:09:46 -0700 (Sat, 04 Jul 2020)

Log Message

[LFC][BFC] Remove redundant out-of-flow height-and-margin handling
https://bugs.webkit.org/show_bug.cgi?id=213959

Reviewed by Antti Koivisto.

We will never end up here with an out-of-flow box.

* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (263944 => 263945)


--- trunk/Source/WebCore/ChangeLog	2020-07-04 20:06:54 UTC (rev 263944)
+++ trunk/Source/WebCore/ChangeLog	2020-07-04 21:09:46 UTC (rev 263945)
@@ -1,5 +1,17 @@
 2020-07-04  Zalan Bujtas  <[email protected]>
 
+        [LFC][BFC] Remove redundant out-of-flow height-and-margin handling
+        https://bugs.webkit.org/show_bug.cgi?id=213959
+
+        Reviewed by Antti Koivisto.
+
+        We will never end up here with an out-of-flow box.
+
+        * layout/blockformatting/BlockFormattingContext.cpp:
+        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
+
+2020-07-04  Zalan Bujtas  <[email protected]>
+
         [LFC][BFC] Store used vertical margin values in the formatting state
         https://bugs.webkit.org/show_bug.cgi?id=213958
 

Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp (263944 => 263945)


--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp	2020-07-04 20:06:54 UTC (rev 263944)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp	2020-07-04 21:09:46 UTC (rev 263945)
@@ -373,15 +373,6 @@
     auto verticalMargin = UsedVerticalMargin { contentHeightAndMargin.nonCollapsedMargin, collapsedAndPositiveNegativeValues.collapsedValues };
     formattingState().setUsedVerticalMargin(layoutBox, verticalMargin);
 
-    // Out of flow boxes don't need vertical adjustment after margin collapsing.
-    if (layoutBox.isOutOfFlowPositioned()) {
-        ASSERT(!hasPrecomputedMarginBefore(layoutBox));
-        auto& displayBox = formattingState().displayBox(layoutBox);
-        displayBox.setContentBoxHeight(contentHeightAndMargin.contentHeight);
-        displayBox.setVerticalMargin({ contentHeightAndMargin.nonCollapsedMargin.before, contentHeightAndMargin.nonCollapsedMargin.after });
-        return;
-    }
-
 #if ASSERT_ENABLED
     if (hasPrecomputedMarginBefore(layoutBox) && precomputedMarginBefore(layoutBox).usedValue() != marginBefore(verticalMargin)) {
         // When the pre-computed margin turns out to be incorrect, we need to re-layout this subtree with the correct margin values.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to