Changeset 272308 in webkit


Ignore:
Timestamp:
Feb 3, 2021 6:03:54 AM (18 months ago)
Author:
commit-queue@webkit.org
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 <Ziran Sun> 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:

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r272307 r272308  
     12021-02-03  Ziran Sun  <zsun@igalia.com>
     2
     3        [css-grid][css-flex] <table> grid item should fill the grid area for 'stretch'/'normal' self alignment
     4        https://bugs.webkit.org/show_bug.cgi?id=191463
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        * TestExpectations: Unskip a tests that is not failing anymore.
     9
    1102021-02-03  Rob Buis  <rbuis@igalia.com>
    211
  • trunk/LayoutTests/TestExpectations

    r272307 r272308  
    12071207webkit.org/b/216145 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-9.html [ ImageOnlyFailure ]
    12081208webkit.org/b/216145 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10.html [ ImageOnlyFailure ]
    1209 webkit.org/b/191463 imported/w3c/web-platform-tests/css/css-grid/grid-items/explicitly-sized-grid-item-as-table.html [ ImageOnlyFailure ]
    12101209webkit.org/b/191627 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001.html [ Failure ]
    12111210webkit.org/b/149890 fast/css-grid-layout/grid-shorthands-style-format.html [ Failure ]
  • trunk/Source/WebCore/ChangeLog

    r272307 r272308  
     12021-02-03  Ziran Sun  <zsun@igalia.com>
     2
     3        [css-grid][css-flex] <table> grid item should fill the grid area for 'stretch'/'normal' self alignment
     4        https://bugs.webkit.org/show_bug.cgi?id=191463
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        Avoid table sizing peculiarities for grid items. Let the grid render algorithm determine
     9        the size of tables that are grid items. Don't let the intrinsic width of table columns
     10        affect the width of the item. This change only deals with widths.
     11
     12        This is an import of Chromium changes at
     13        https://chromium-review.googlesource.com/c/chromium/src/+/781859/
     14        This issue seems only affect grid-items and not flexbox any more hence only changes from
     15        grid are imported.
     16
     17        Test for this change has already been imported from WPT
     18
     19        * rendering/RenderTable.cpp:
     20        (WebCore::RenderTable::updateLogicalWidth):
     21
    1222021-02-03  Rob Buis  <rbuis@igalia.com>
    223
  • trunk/Source/WebCore/rendering/RenderTable.cpp

    r271003 r272308  
    238238{
    239239    recalcSectionsIfNeeded();
     240
     241    if (isGridItem()) {
     242        // FIXME: Investigate whether the grid layout algorithm provides all the logic
     243        // needed and that we're not skipping anything essential due to the early return here.
     244        RenderBlock::updateLogicalWidth();
     245        return;
     246    }
    240247
    241248    if (isOutOfFlowPositioned()) {
Note: See TracChangeset for help on using the changeset viewer.