[css-grid] Fix percentage height resolution for replaced elements

The percentage heights for replaced elements were not working
as expected in grid items.
The patch fixes the different issues to make it work as expected.

If a replaced item is a grid item, it needs to resolve
the percentage height against its grid area.
When the replaced item is a child of a grid item,
and the grid item is stretched,
it needs to use that size to resolve the percentage height too.

BUG=624716
TEST=fast/css-grid-layout/grid-item-with-percent-height-replaced-element.html

Review-Url: https://codereview.chromium.org/2121173002
Cr-Commit-Position: refs/heads/master@{#404896}
4 files changed