[css-grid] Fix painting in RTL
Due to the optimization we've in GridPainter that only paints
the grid items in the cells affected by the paint invalidation rect,
we've an issue using direction RTL, as the cells to be painted
were wrongly detected.
The problem is that LayoutGrid::columnPositions() is not returning
physical positions in the case of RTL, so we need to translate that
vector before calling dirtiedGridAreas().
As we're changing the order of the tracks in the new translated Vector
we need to change the GridSpan we get as result from dirtiedGridAreas().
Created a helper function LayoutGrid::translateRTLCoordinate()
and used it in the different parts of the code where we need to do
Review URL: https://codereview.chromium.org/1873163002
5 files changed