Title: [272308] trunk
- Revision
- 272308
- Author
- [email protected]
- Date
- 2021-02-03 06:03:54 -0800 (Wed, 03 Feb 2021)
Log Message
[css-grid][css-flex] <table> grid item should fill the grid area for 'stretch'/'normal' self alignment
https://bugs.webkit.org/show_bug.cgi?id=191463
Patch by Ziran Sun <[email protected]> on 2021-02-03
Reviewed by Sergio Villar Senin.
Source/WebCore:
Avoid table sizing peculiarities for grid items. Let the grid render algorithm determine
the size of tables that are grid items. Don't let the intrinsic width of table columns
affect the width of the item. This change only deals with widths.
This is an import of Chromium changes at
https://chromium-review.googlesource.com/c/chromium/src/+/781859/
This issue seems only affect grid-items and not flexbox any more hence only changes from
grid are imported.
Test for this change has already been imported from WPT
* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
LayoutTests:
* TestExpectations: Unskip a tests that is not failing anymore.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (272307 => 272308)
--- trunk/LayoutTests/ChangeLog 2021-02-03 13:05:51 UTC (rev 272307)
+++ trunk/LayoutTests/ChangeLog 2021-02-03 14:03:54 UTC (rev 272308)
@@ -1,3 +1,12 @@
+2021-02-03 Ziran Sun <[email protected]>
+
+ [css-grid][css-flex] <table> grid item should fill the grid area for 'stretch'/'normal' self alignment
+ https://bugs.webkit.org/show_bug.cgi?id=191463
+
+ Reviewed by Sergio Villar Senin.
+
+ * TestExpectations: Unskip a tests that is not failing anymore.
+
2021-02-03 Rob Buis <[email protected]>
Support aspect-ratio on grid items
Modified: trunk/LayoutTests/TestExpectations (272307 => 272308)
--- trunk/LayoutTests/TestExpectations 2021-02-03 13:05:51 UTC (rev 272307)
+++ trunk/LayoutTests/TestExpectations 2021-02-03 14:03:54 UTC (rev 272308)
@@ -1206,7 +1206,6 @@
webkit.org/b/216145 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8.html [ ImageOnlyFailure ]
webkit.org/b/216145 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-9.html [ ImageOnlyFailure ]
webkit.org/b/216145 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10.html [ ImageOnlyFailure ]
-webkit.org/b/191463 imported/w3c/web-platform-tests/css/css-grid/grid-items/explicitly-sized-grid-item-as-table.html [ ImageOnlyFailure ]
webkit.org/b/191627 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001.html [ Failure ]
webkit.org/b/149890 fast/css-grid-layout/grid-shorthands-style-format.html [ Failure ]
webkit.org/b/191507 fast/css-grid-layout/positioned-grid-container-percentage-tracks.html [ Failure ]
Modified: trunk/Source/WebCore/ChangeLog (272307 => 272308)
--- trunk/Source/WebCore/ChangeLog 2021-02-03 13:05:51 UTC (rev 272307)
+++ trunk/Source/WebCore/ChangeLog 2021-02-03 14:03:54 UTC (rev 272308)
@@ -1,3 +1,24 @@
+2021-02-03 Ziran Sun <[email protected]>
+
+ [css-grid][css-flex] <table> grid item should fill the grid area for 'stretch'/'normal' self alignment
+ https://bugs.webkit.org/show_bug.cgi?id=191463
+
+ Reviewed by Sergio Villar Senin.
+
+ Avoid table sizing peculiarities for grid items. Let the grid render algorithm determine
+ the size of tables that are grid items. Don't let the intrinsic width of table columns
+ affect the width of the item. This change only deals with widths.
+
+ This is an import of Chromium changes at
+ https://chromium-review.googlesource.com/c/chromium/src/+/781859/
+ This issue seems only affect grid-items and not flexbox any more hence only changes from
+ grid are imported.
+
+ Test for this change has already been imported from WPT
+
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::updateLogicalWidth):
+
2021-02-03 Rob Buis <[email protected]>
Support aspect-ratio on grid items
Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (272307 => 272308)
--- trunk/Source/WebCore/rendering/RenderTable.cpp 2021-02-03 13:05:51 UTC (rev 272307)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp 2021-02-03 14:03:54 UTC (rev 272308)
@@ -238,6 +238,13 @@
{
recalcSectionsIfNeeded();
+ if (isGridItem()) {
+ // FIXME: Investigate whether the grid layout algorithm provides all the logic
+ // needed and that we're not skipping anything essential due to the early return here.
+ RenderBlock::updateLogicalWidth();
+ return;
+ }
+
if (isOutOfFlowPositioned()) {
LogicalExtentComputedValues computedValues;
computePositionedLogicalWidth(computedValues);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes