Title: [276240] trunk
- Revision
- 276240
- Author
- [email protected]
- Date
- 2021-04-19 01:39:04 -0700 (Mon, 19 Apr 2021)
Log Message
[css-flexbox] Table layout disregards overriding height
https://bugs.webkit.org/show_bug.cgi?id=224665
Patch by Felipe Erias <[email protected]> on 2021-04-19
Reviewed by Sergio Villar Senin.
Source/WebCore:
Update table layout to take into account the overriding height set by the element's parent.
This was causing several WPT tests to fail.
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
During layout, set the computed height so that it is at least as large as the overriding height
provided by the element's parent (if any) minus the height that will be taken up by captions.
This additional height will be distributed among the table's sections so its total height matches
the overriding value.
LayoutTests:
* TestExpectations: Removed four WPT tests that now pass.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (276239 => 276240)
--- trunk/LayoutTests/ChangeLog 2021-04-19 08:23:34 UTC (rev 276239)
+++ trunk/LayoutTests/ChangeLog 2021-04-19 08:39:04 UTC (rev 276240)
@@ -1,3 +1,12 @@
+2021-04-19 Felipe Erias <[email protected]>
+
+ [css-flexbox] Table layout disregards overriding height
+ https://bugs.webkit.org/show_bug.cgi?id=224665
+
+ Reviewed by Sergio Villar Senin.
+
+ * TestExpectations: Removed four WPT tests that now pass.
+
2021-04-19 Philippe Normand <[email protected]>
[WPE][GTK] Enable AVIF decoder as experimental feature and unskip tests
Modified: trunk/LayoutTests/TestExpectations (276239 => 276240)
--- trunk/LayoutTests/TestExpectations 2021-04-19 08:23:34 UTC (rev 276239)
+++ trunk/LayoutTests/TestExpectations 2021-04-19 08:39:04 UTC (rev 276240)
@@ -3962,16 +3962,12 @@
# Tables as flex items.
webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-fixed-min-width-3.html [ ImageOnlyFailure ]
-webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-flex-cross-size.html [ ImageOnlyFailure ]
webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-percent-width-cell-001.html [ ImageOnlyFailure ]
webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-width.html [ ImageOnlyFailure ]
-webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-stretch-cross-size.html [ ImageOnlyFailure ]
webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-inflexible-in-column-1.html [ ImageOnlyFailure ]
webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-inflexible-in-column-2.html [ ImageOnlyFailure ]
webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-inflexible-in-row-2.html [ ImageOnlyFailure ]
-webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-narrow-content-2.html [ ImageOnlyFailure ]
webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-height.html [ ImageOnlyFailure ]
-webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-stretch-cross-size-2.html [ ImageOnlyFailure ]
webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-item-flex-percentage-width.html [ ImageOnlyFailure ]
# SVGs as flex items.
Modified: trunk/Source/WebCore/ChangeLog (276239 => 276240)
--- trunk/Source/WebCore/ChangeLog 2021-04-19 08:23:34 UTC (rev 276239)
+++ trunk/Source/WebCore/ChangeLog 2021-04-19 08:39:04 UTC (rev 276240)
@@ -1,3 +1,20 @@
+2021-04-19 Felipe Erias <[email protected]>
+
+ [css-flexbox] Table layout disregards overriding height
+ https://bugs.webkit.org/show_bug.cgi?id=224665
+
+ Reviewed by Sergio Villar Senin.
+
+ Update table layout to take into account the overriding height set by the element's parent.
+ This was causing several WPT tests to fail.
+
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::layout):
+ During layout, set the computed height so that it is at least as large as the overriding height
+ provided by the element's parent (if any) minus the height that will be taken up by captions.
+ This additional height will be distributed among the table's sections so its total height matches
+ the overriding value.
+
2021-04-19 Martin Robinson <[email protected]>
[css-scroll-snap] Properly support fractional scroll steps in WebCore::ScrollAnimator::scroll
Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (276239 => 276240)
--- trunk/Source/WebCore/rendering/RenderTable.cpp 2021-04-19 08:23:34 UTC (rev 276239)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp 2021-04-19 08:39:04 UTC (rev 276240)
@@ -506,6 +506,13 @@
if (logicalHeightLength.isIntrinsic() || (logicalHeightLength.isSpecified() && logicalHeightLength.isPositive()))
computedLogicalHeight = convertStyleLogicalHeightToComputedHeight(logicalHeightLength);
+ if (hasOverridingLogicalHeight()) {
+ LayoutUnit captionLogicalHeight;
+ for (auto& caption : m_captions)
+ captionLogicalHeight += caption->logicalHeight() + caption->marginBefore() + caption->marginAfter();
+ computedLogicalHeight = std::max(computedLogicalHeight, overridingLogicalHeight() - captionLogicalHeight);
+ }
+
Length logicalMaxHeightLength = style().logicalMaxHeight();
if (logicalMaxHeightLength.isIntrinsic() || (logicalMaxHeightLength.isSpecified() && !logicalMaxHeightLength.isNegative())) {
LayoutUnit computedMaxLogicalHeight = convertStyleLogicalHeightToComputedHeight(logicalMaxHeightLength);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes