Title: [261083] trunk/Source/WebCore
- Revision
- 261083
- Author
- [email protected]
- Date
- 2020-05-04 07:59:53 -0700 (Mon, 04 May 2020)
Log Message
[LFC][TFC] Override the table computed height when content needs more space
https://bugs.webkit.org/show_bug.cgi?id=211367
Reviewed by Antti Koivisto.
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (261082 => 261083)
--- trunk/Source/WebCore/ChangeLog 2020-05-04 14:53:32 UTC (rev 261082)
+++ trunk/Source/WebCore/ChangeLog 2020-05-04 14:59:53 UTC (rev 261083)
@@ -1,5 +1,17 @@
2020-05-04 Zalan Bujtas <[email protected]>
+ [LFC][TFC] Override the table computed height when content needs more space
+ https://bugs.webkit.org/show_bug.cgi?id=211367
+
+ Reviewed by Antti Koivisto.
+
+ * layout/FormattingContextGeometry.cpp:
+ (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
+ * layout/blockformatting/BlockFormattingContextGeometry.cpp:
+ (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
+
+2020-05-04 Zalan Bujtas <[email protected]>
+
[LFC][TFC] Use distributeAvailableSpace for row sizing
https://bugs.webkit.org/show_bug.cgi?id=211366
Modified: trunk/Source/WebCore/layout/FormattingContextGeometry.cpp (261082 => 261083)
--- trunk/Source/WebCore/layout/FormattingContextGeometry.cpp 2020-05-04 14:53:32 UTC (rev 261082)
+++ trunk/Source/WebCore/layout/FormattingContextGeometry.cpp 2020-05-04 14:59:53 UTC (rev 261083)
@@ -112,7 +112,7 @@
LayoutUnit FormattingContext::Geometry::contentHeightForFormattingContextRoot(const Box& layoutBox) const
{
- ASSERT(isHeightAuto(layoutBox) && (layoutBox.establishesFormattingContext() || layoutBox.isDocumentBox()));
+ ASSERT((isHeightAuto(layoutBox) || layoutBox.establishesTableFormattingContext()) && (layoutBox.establishesFormattingContext() || layoutBox.isDocumentBox()));
// 10.6.7 'Auto' heights for block formatting context roots
Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp (261082 => 261083)
--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp 2020-05-04 14:53:32 UTC (rev 261082)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp 2020-05-04 14:59:53 UTC (rev 261083)
@@ -256,9 +256,17 @@
ContentHeightAndMargin contentHeightAndMargin;
// FIXME: Let's special case the table height computation for now -> figure out whether tables fall into the "inFlowNonReplacedHeightAndMargin" category.
- if (layoutBox.establishesTableFormattingContext())
- contentHeightAndMargin = complicatedCases(layoutBox, horizontalConstraints, overrideVerticalValues);
- else if (layoutBox.isOverflowVisible() && !layoutBox.isDocumentBox()) {
+ if (layoutBox.establishesTableFormattingContext()) {
+ auto& tableBox = downcast<ContainerBox>(layoutBox);
+ auto computedTableHeight = computedContentHeight(tableBox);
+ auto contentHeight = contentHeightForFormattingContextRoot(tableBox);
+ if (computedTableHeight && contentHeight > computedTableHeight) {
+ // Table content needs more vertical space than the table has.
+ return complicatedCases(tableBox, horizontalConstraints, { contentHeight });
+ }
+ return complicatedCases(tableBox, horizontalConstraints, overrideVerticalValues);
+ }
+ if (layoutBox.isOverflowVisible() && !layoutBox.isDocumentBox()) {
// TODO: Figure out the case for the document element. Let's just complicated-case it for now.
contentHeightAndMargin = inFlowNonReplacedHeightAndMargin(layoutBox, horizontalConstraints, overrideVerticalValues);
} else {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes