Title: [249289] trunk/Source/WebCore
Revision
249289
Author
[email protected]
Date
2019-08-29 13:07:36 -0700 (Thu, 29 Aug 2019)

Log Message

[LFC][TFC] Use the "complicated-cases" category for computing the TFC root's height
https://bugs.webkit.org/show_bug.cgi?id=201230
<rdar://problem/54806131>

Reviewed by Antti Koivisto.

This might change in the future but for now let's use the "complicated cases" when we need to compute the TFC's height and vertical margin.
This is very BFC specific since (block)TFC is always parented in a BFC.

* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (249288 => 249289)


--- trunk/Source/WebCore/ChangeLog	2019-08-29 20:03:37 UTC (rev 249288)
+++ trunk/Source/WebCore/ChangeLog	2019-08-29 20:07:36 UTC (rev 249289)
@@ -1,5 +1,19 @@
 2019-08-29  Zalan Bujtas  <[email protected]>
 
+        [LFC][TFC] Use the "complicated-cases" category for computing the TFC root's height
+        https://bugs.webkit.org/show_bug.cgi?id=201230
+        <rdar://problem/54806131>
+
+        Reviewed by Antti Koivisto.
+
+        This might change in the future but for now let's use the "complicated cases" when we need to compute the TFC's height and vertical margin.
+        This is very BFC specific since (block)TFC is always parented in a BFC.
+
+        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
+        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
+
+2019-08-29  Zalan Bujtas  <[email protected]>
+
         [LFC][TFC] The table wrapper box is a block level box
         https://bugs.webkit.org/show_bug.cgi?id=201229
         <rdar://problem/54805515>

Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp (249288 => 249289)


--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp	2019-08-29 20:03:37 UTC (rev 249288)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp	2019-08-29 20:07:36 UTC (rev 249289)
@@ -257,10 +257,14 @@
         return inlineReplacedHeightAndMargin(layoutState, layoutBox, usedValues);
 
     HeightAndMargin heightAndMargin;
-    // TODO: Figure out the case for the document element. Let's just complicated-case it for now.
-    if (layoutBox.isOverflowVisible() && !layoutBox.isDocumentBox())
+    // FIXME: Let's special case the table height computation for now -> figure out whether tables fall into the "inFlowNonReplacedHeightAndMargin" category.
+    if (layoutBox.establishesTableFormattingContext()) {
+        auto usedHorizontalValues = UsedHorizontalValues { layoutState.displayBoxForLayoutBox(*layoutBox.containingBlock()).contentBoxWidth() };
+        heightAndMargin = complicatedCases(layoutState, layoutBox, usedValues, usedHorizontalValues);
+    } else if (layoutBox.isOverflowVisible() && !layoutBox.isDocumentBox()) {
+        // TODO: Figure out the case for the document element. Let's just complicated-case it for now.
         heightAndMargin = inFlowNonReplacedHeightAndMargin(layoutState, layoutBox, usedValues);
-    else {
+    } else {
         // 10.6.6 Complicated cases
         // Block-level, non-replaced elements in normal flow when 'overflow' does not compute to 'visible' (except if the 'overflow' property's value has been propagated to the viewport).
         auto usedHorizontalValues = UsedHorizontalValues { layoutState.displayBoxForLayoutBox(*layoutBox.containingBlock()).contentBoxWidth() };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to