[CSS Grid Layout] Improve content-sized track layout
authorsvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Nov 2013 11:03:32 +0000 (11:03 +0000)
committersvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Nov 2013 11:03:32 +0000 (11:03 +0000)
commit1f552f6ffb1136e9e629a4eb9575bc8cdc5ab214
tree8f6c5e43db7c5f9c9fb2b5541a6566aecb67e075
parentcfbd19527098d55482b246a085dc054c8bdb7fe6
[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: https://svn.webkit.org/repository/webkit/trunk@159685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/grid-item-with-percent-min-max-height-dynamic-expected.txt [new file with mode: 0644]
LayoutTests/fast/css-grid-layout/grid-item-with-percent-min-max-height-dynamic.html [new file with mode: 0644]
PerformanceTests/ChangeLog
PerformanceTests/Layout/auto-grid-lots-of-data.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderGrid.cpp