⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 271436 in webkit


Ignore:
Timestamp:
Jan 13, 2021, 3:54:00 AM (6 years ago)
Author:
svillar@igalia.com
Message:

REGRESSION(r268666) Incorrect vertical position inside grid items with padding
https://bugs.webkit.org/show_bug.cgi?id=220524

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

In r268666 we sanitized and renamed the old overrideLogicalXXX sizes so that they store what they say.
There was a mistake in one of those renames, in availableLogicalHeightForPercentageComputation() we were
returning the border box size for the case of grid items. That's clearly wrong as we should return the
content box size. That's why adding a padding to a grid item was causing their children to wrongly
evaluate the available logical height.

This fixes a WPT that was marked as failure.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const): Return the
overridingContentLogicalHeight instead of the overridingLogicalHeight.

LayoutTests:

  • TestExpectations: remove web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-001.html

from the list of image failures.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r271435 r271436  
     12021-01-13  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        REGRESSION(r268666) Incorrect vertical position inside grid items with padding
     4        https://bugs.webkit.org/show_bug.cgi?id=220524
     5
     6        Reviewed by Manuel Rego Casasnovas.
     7
     8        * TestExpectations: remove web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-001.html
     9        from the list of image failures.
     10
    1112021-01-12  Antoine Quint  <graouts@webkit.org>
    212
  • trunk/LayoutTests/TestExpectations

    r271395 r271436  
    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/191461 imported/w3c/web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-001.html [ ImageOnlyFailure ]
    12101209webkit.org/b/191463 imported/w3c/web-platform-tests/css/css-grid/grid-items/explicitly-sized-grid-item-as-table.html [ ImageOnlyFailure ]
    12111210webkit.org/b/191627 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001.html [ Failure ]
  • trunk/Source/WebCore/ChangeLog

    r271435 r271436  
     12021-01-13  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        REGRESSION(r268666) Incorrect vertical position inside grid items with padding
     4        https://bugs.webkit.org/show_bug.cgi?id=220524
     5
     6        Reviewed by Manuel Rego Casasnovas.
     7
     8        In r268666 we sanitized and renamed the old overrideLogicalXXX sizes so that they store what they say.
     9        There was a mistake in one of those renames, in availableLogicalHeightForPercentageComputation() we were
     10        returning the border box size for the case of grid items. That's clearly wrong as we should return the
     11        content box size. That's why adding a padding to a grid item was causing their children to wrongly
     12        evaluate the available logical height.
     13
     14        This fixes a WPT that was marked as failure.
     15
     16        * rendering/RenderBlock.cpp:
     17        (WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const): Return the
     18        overridingContentLogicalHeight instead of the overridingLogicalHeight.
     19
    1202021-01-12  Antoine Quint  <graouts@webkit.org>
    221
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r271375 r271436  
    32043204        availableHeight = stretchedFlexHeight;
    32053205    else if (isGridItem() && hasOverridingLogicalHeight())
    3206         availableHeight = overridingLogicalHeight();
     3206        availableHeight = overridingContentLogicalHeight();
    32073207    else if (styleToUse.logicalHeight().isFixed()) {
    32083208        LayoutUnit contentBoxHeight = adjustContentBoxLogicalHeightForBoxSizing((LayoutUnit)styleToUse.logicalHeight().value());
Note: See TracChangeset for help on using the changeset viewer.