[css-grid] Use firstInFlowChildBox API for iterate over the grid items

We are using the nextInFlowSiblingBox API for iterating over the grid
items in an inefficient way, because we are checking for every box
whether it's out-of-flow or not. This operation is redundant, since it's
already done internally in nextInFlowSiblingBox.

The only reason why we implemented it that way is that we needed to
check out the nature of the first child. This patch adds a new API for
getting the first in-flow child box, so we can implement the loops
without the redundant operations.

Review-Url: https://codereview.chromium.org/2430663002
Cr-Commit-Position: refs/heads/master@{#425962}
2 files changed