Title: [277777] trunk
- Revision
- 277777
- Author
- [email protected]
- Date
- 2021-05-20 01:00:20 -0700 (Thu, 20 May 2021)
Log Message
[css-flexbox] Wrong height of an empty table inside an orthogonal flex parent
https://bugs.webkit.org/show_bug.cgi?id=225339
Patch by Felipe Erias <[email protected]> on 2021-05-20
Reviewed by Sergio Villar Senin.
LayoutTests/imported/w3c:
Add a test for an empty table inside a flexbox container, where the logical heights of both elements
are orthogonal to each other (the table has vertical writing mode and the flexbox uses row direction).
This is a flipped version of table-as-item-specified-height.html.
* web-platform-tests/css/css-flexbox/table-as-item-specified-width-vertical-expected.html: Added.
* web-platform-tests/css/css-flexbox/table-as-item-specified-width-vertical.html: Added.
Source/WebCore:
When setting the height of an empty table, give precedence to the overriding value if it has been set.
Do not cache the height of that empty table as the intrinsic content height, because doing so may cause
layout problems (the table is actually empty and may be assigned a different height by its parent).
Test: imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-height.html
imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-width-vertical.html
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
LayoutTests:
* TestExpectations: Remove one WPT test that now passes.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (277776 => 277777)
--- trunk/LayoutTests/ChangeLog 2021-05-20 06:46:43 UTC (rev 277776)
+++ trunk/LayoutTests/ChangeLog 2021-05-20 08:00:20 UTC (rev 277777)
@@ -1,3 +1,12 @@
+2021-05-20 Felipe Erias <[email protected]>
+
+ [css-flexbox] Wrong height of an empty table inside an orthogonal flex parent
+ https://bugs.webkit.org/show_bug.cgi?id=225339
+
+ Reviewed by Sergio Villar Senin.
+
+ * TestExpectations: Remove one WPT test that now passes.
+
2021-05-19 Tomoki Imai <[email protected]>
Scrolling must be done after the layout when doing full page zoom
Modified: trunk/LayoutTests/TestExpectations (277776 => 277777)
--- trunk/LayoutTests/TestExpectations 2021-05-20 06:46:43 UTC (rev 277776)
+++ trunk/LayoutTests/TestExpectations 2021-05-20 08:00:20 UTC (rev 277777)
@@ -3911,7 +3911,6 @@
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-specified-height.html [ ImageOnlyFailure ]
webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-min-height-1.html [ ImageOnlyFailure ]
# SVGs as flex items.
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (277776 => 277777)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-05-20 06:46:43 UTC (rev 277776)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-05-20 08:00:20 UTC (rev 277777)
@@ -1,3 +1,18 @@
+2021-05-20 Felipe Erias <[email protected]>
+
+ [css-flexbox] Wrong height of an empty table inside an orthogonal flex parent
+ https://bugs.webkit.org/show_bug.cgi?id=225339
+
+ Reviewed by Sergio Villar Senin.
+
+ Add a test for an empty table inside a flexbox container, where the logical heights of both elements
+ are orthogonal to each other (the table has vertical writing mode and the flexbox uses row direction).
+
+ This is a flipped version of table-as-item-specified-height.html.
+
+ * web-platform-tests/css/css-flexbox/table-as-item-specified-width-vertical-expected.html: Added.
+ * web-platform-tests/css/css-flexbox/table-as-item-specified-width-vertical.html: Added.
+
2021-05-19 Alex Christensen <[email protected]>
Add support for Navigation Timing Level 2
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-width-vertical-expected.html (0 => 277777)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-width-vertical-expected.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-width-vertical-expected.html 2021-05-20 08:00:20 UTC (rev 277777)
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href=""
+<p>Test passes if there is a filled green square.</p>
+<div style="width:100px; height:100px; background:green;"></div>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-width-vertical.html (0 => 277777)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-width-vertical.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-width-vertical.html 2021-05-20 08:00:20 UTC (rev 277777)
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<title>Table with vertical writing mode inside a row flexbox container</title>
+<link rel="author" title="Felipe Erias Morandeira" href="" />
+<link rel="help" href="" title="9. Flex Layout Algorithm">
+<link rel="match" href=""
+<meta name="assert" content="The width of an empty table (vertical direction) inside a flexbox container (row direction) is computed correctly.">
+
+<p>Test passes if there is a filled green square.</p>
+
+<div style="display: flex; flex-direction: row; height: 100px;">
+ <div style="display: table; writing-mode: vertical-lr; width: 500px; background: green; flex: 0 0 100px;"></div>
+</div>
Modified: trunk/Source/WebCore/ChangeLog (277776 => 277777)
--- trunk/Source/WebCore/ChangeLog 2021-05-20 06:46:43 UTC (rev 277776)
+++ trunk/Source/WebCore/ChangeLog 2021-05-20 08:00:20 UTC (rev 277777)
@@ -1,3 +1,20 @@
+2021-05-20 Felipe Erias <[email protected]>
+
+ [css-flexbox] Wrong height of an empty table inside an orthogonal flex parent
+ https://bugs.webkit.org/show_bug.cgi?id=225339
+
+ Reviewed by Sergio Villar Senin.
+
+ When setting the height of an empty table, give precedence to the overriding value if it has been set.
+ Do not cache the height of that empty table as the intrinsic content height, because doing so may cause
+ layout problems (the table is actually empty and may be assigned a different height by its parent).
+
+ Test: imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-height.html
+ imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-width-vertical.html
+
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::layout):
+
2021-05-19 Jean-Yves Avenard <[email protected]>
VP9 powerEfficient detection is broken in STP124
Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (277776 => 277777)
--- trunk/Source/WebCore/rendering/RenderTable.cpp 2021-05-20 06:46:43 UTC (rev 277776)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp 2021-05-20 08:00:20 UTC (rev 277777)
@@ -433,6 +433,7 @@
bool sectionMoved = false;
LayoutUnit movedSectionLogicalTop;
unsigned sectionCount = 0;
+ bool shouldCacheIntrinsicContentLogicalHeightForFlexItem = true;
LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
{
@@ -528,9 +529,10 @@
section->layoutRows();
if (!topSection() && computedLogicalHeight > totalSectionLogicalHeight && !document().inQuirksMode()) {
- // Completely empty tables (with no sections or anything) should at least honor specified height
- // in strict mode.
- setLogicalHeight(logicalHeight() + computedLogicalHeight);
+ // Completely empty tables (with no sections or anything) should at least honor their
+ // overriding or specified height in strict mode, but this value will not be cached.
+ shouldCacheIntrinsicContentLogicalHeightForFlexItem = false;
+ setLogicalHeight(hasOverridingLogicalHeight() ? overridingLogicalHeight() : logicalHeight() + computedLogicalHeight);
}
LayoutUnit sectionLogicalLeft = style().isLeftToRightDirection() ? borderStart() : borderEnd();
@@ -599,8 +601,9 @@
// FIXME: This value isn't the intrinsic content logical height, but we need
// to update the value as its used by flexbox layout. crbug.com/367324
- cacheIntrinsicContentLogicalHeightForFlexItem(contentLogicalHeight());
-
+ if (shouldCacheIntrinsicContentLogicalHeightForFlexItem)
+ cacheIntrinsicContentLogicalHeightForFlexItem(contentLogicalHeight());
+
m_columnLogicalWidthChanged = false;
clearNeedsLayout();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes