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

More fixes on percentage heights for replaced elements.
The problem now was when you have a replaced element inside a grid item,
and both the replaced and the item have a percentage height.

The item has a definite height as its percentage can be resolved
against its grid area. So the replaced element percentage should be
resolved against the height of the item.

Current code was getting confused about this particular case,
now we reuse hasDefiniteLogicalHeight() to detect it properly.

Added new case to existent test.

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

Review-Url: https://codereview.chromium.org/2458023002
Cr-Commit-Position: refs/heads/master@{#428512}
3 files changed