[css-grid] Use a reference to sort the actual named grid lines vector

When using the grid-template-{columns,rows} properties we create
internally 2 hashmaps; 'NamedGridLines' associates a named line with the
different grid lines such name is used, and 'OrderedNamedGridLines' that
associates a grid line with the different names it has.

When using the grid-template-areas we use the 'OrderedNamedGridLines' to
extract the information about which names are associated to each grid
line.

The spec states that when using the same name for different lines, an
item located a such name will be placed in the first line associated to
that name. Because of this, we need to internally create an index vector
from the 'OrderedNamedGridLines' and we need to sort it ascendantly.

We were wrongly using a copy of the index vector, so we weren't actually
sorting the actual indexes. This patch solves the issue by using a
reference type for the indexes variable, hence, sorting the actual data
of the hashmap.

Bug: 733577
Change-Id: I4af516420c04565ba4f5b9fc0d267e7c63a2b7aa
Reviewed-on: https://chromium-review.googlesource.com/553777
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483679}
4 files changed