[css-grid] Grid containers reporting wrong preferred widths
authorsvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Aug 2015 10:54:07 +0000 (10:54 +0000)
committersvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Aug 2015 10:54:07 +0000 (10:54 +0000)
commitd26bdda239bfc6982306b3036f63388814fb8b06
treebef14cf1b11200b29eb464fbe4e9d3c7be88cac4
parentaa805887b65d4212d13d5f4460b89833a752f3dd
[css-grid] Grid containers reporting wrong preferred widths
https://bugs.webkit.org/show_bug.cgi?id=147486

Reviewed by Darin Adler.

Source/WebCore:

RenderGrid used to have its own overwritten version of
computePreferredLogicalWidths() because we didn't have an
implementation of computeIntrinsicLogicalWidths(). That
implementation was not as complete as RenderBlock's because it
was not taking into account min/max-width restrictions.

Provided that computeIntrinsicLogicalWidths() has been there
for some time we can safelly kill our overwrite and use
RenderBlock's version which addresses all the FIXMEs we had in
our code.

* rendering/RenderGrid.cpp:
* rendering/RenderGrid.h:

LayoutTests:

Added new test cases to check the preferred widths reported by
grid containers when they are sized under min/max-width
constraints.

* fast/css-grid-layout/grid-preferred-logical-widths-expected.txt:
* fast/css-grid-layout/grid-preferred-logical-widths.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths-expected.txt
LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderGrid.cpp
Source/WebCore/rendering/RenderGrid.h