[css-grid] Avoid the HashMap for the override containing block size

The change made in r406557 caused a 12% regression on the grid layout
performance tests. The root cause is that as part of the changes
required to implement the orthogonal flows support we decided to use
physical directions to determine whether a grid item overflows its
grid area or not. Since we store the logical sizes in a HashMap, we
implemented some utility methods that, based on the grid container's
writing mode, retrieve the stored width or height from the HashMap.

Since the previous logic was reusing the already computed logical
value, the change introduced a considerable performance regression.

This patch address the issue by removing the utility methods and
determine the physical sizes directly inside the layout logic.

BUG=630448

Committed: https://crrev.com/2cf9f05031414616d3d1eb1e5ffa5013e396d61b
Review-Url: https://codereview.chromium.org/2176633002
Cr-Original-Commit-Position: refs/heads/master@{#407762}
Cr-Commit-Position: refs/heads/master@{#408203}
4 files changed