[CSS Grid Layout] Improve content-sized track layout
https://bugs.webkit.org/show_bug.cgi?id=124408

Reviewed by Dean Jackson.

PerformanceTests:

From Blink r156122 by <jchaffraix@chromium.org>

New test to check the performance of layouting grids with content sized tracks.

* Layout/auto-grid-lots-of-data.html: Added.

Source/WebCore:

Test: fast/css-grid-layout/grid-item-with-percent-min-max-height-dynamic.html

From Blink r156122 & r157633 by <jchaffraix@chromium.org>

Added a couple of optimizations to speed up the layout of content
based tracks. The idea is to narrow down the conditions for
relayouting when the height of a grid area changes. We basically
just need to layout tracks with percentage heights as they're the
only ones that change.

A new performance test is attached to demonstrate the effect of
these optimizations. We get a ~1000% improvement on a i7 M620
going from 14.5 runs/s to 165 runs/s.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::logicalContentHeightForChild):
(WebCore::RenderGrid::layoutGridItems):

LayoutTests:

From Blink r157633 by <jchaffraix@chromium.org>

New test to verify that grid items with percentage logical
{min|max}-height resolve their sizes properly.

* fast/css-grid-layout/grid-item-with-percent-min-max-height-dynamic-expected.txt: Added.
* fast/css-grid-layout/grid-item-with-percent-min-max-height-dynamic.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159685 268f45cc-cd09-0410-ab3c-d52691b4dbfc