Changeset 202856 in webkit


Ignore:
Timestamp:
Jul 6, 2016 6:02:43 AM (8 years ago)
Author:
Manuel Rego Casasnovas
Message:

[css-grid] Height percentages are not properly resolved for item's children
https://bugs.webkit.org/show_bug.cgi?id=159258

Reviewed by Sergio Villar Senin.

Source/WebCore:

When grid items are vertically stretched (default behavior)
they store their height on RenderBox::overrideLogicalContentHeight().
In order to resolve the percentage height on the grid item's children
we need to use that size.

Test: fast/css-grid-layout/percent-resolution-grid-item-children.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computePercentageLogicalHeight):

LayoutTests:

  • fast/css-grid-layout/percent-resolution-grid-item-children-expected.txt: Added.
  • fast/css-grid-layout/percent-resolution-grid-item-children.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r202853 r202856  
     12016-07-06  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        [css-grid] Height percentages are not properly resolved for item's children
     4        https://bugs.webkit.org/show_bug.cgi?id=159258
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        * fast/css-grid-layout/percent-resolution-grid-item-children-expected.txt: Added.
     9        * fast/css-grid-layout/percent-resolution-grid-item-children.html: Added.
     10
    1112016-07-05  Youenn Fablet  <youenn@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r202854 r202856  
     12016-07-06  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        [css-grid] Height percentages are not properly resolved for item's children
     4        https://bugs.webkit.org/show_bug.cgi?id=159258
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        When grid items are vertically stretched (default behavior)
     9        they store their height on RenderBox::overrideLogicalContentHeight().
     10        In order to resolve the percentage height on the grid item's children
     11        we need to use that size.
     12
     13        Test: fast/css-grid-layout/percent-resolution-grid-item-children.html
     14
     15        * rendering/RenderBox.cpp:
     16        (WebCore::RenderBox::computePercentageLogicalHeight):
     17
    1182016-07-06  Zan Dobersek  <zdobersek@igalia.com>
    219
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r202536 r202856  
    29902990    else if (hasOverrideContainingBlockLogicalHeight())
    29912991        availableHeight = overrideContainingBlockContentLogicalHeight();
     2992    else if (cb->isGridItem() && cb->hasOverrideLogicalContentHeight())
     2993        availableHeight = cb->overrideLogicalContentHeight();
    29922994#endif
    29932995    else if (is<RenderTableCell>(*cb)) {
Note: See TracChangeset for help on using the changeset viewer.