[css-grid] Painting issue in RTL |
||
Issue descriptionWe've an optimization in the grid painting code (GridPainter::paintChildren()). So we don't paint all the children always, but only the ones that are in the visible area (localPaintInvalidationRect). For this we use the info stored in LayoutGrid::m_column|rowPositions, but the problem is that the information we're storing in RTL causes that some items that should be actually painted are not. If you check the attached example and you play with the scroll in the <iframe> you'll see the issues. If we avoid the optimization and paint all the children the issue disappears.
,
Apr 13 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/53cea4d18b15b735c4ab6cd85cfcb3cc07593452 commit 53cea4d18b15b735c4ab6cd85cfcb3cc07593452 Author: rego <rego@igalia.com> Date: Wed Apr 13 21:15:18 2016 [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 this conversion. TEST=fast/css-grid-layout/grid-painting-rtl.html BUG= 600680 Review URL: https://codereview.chromium.org/1873163002 Cr-Commit-Position: refs/heads/master@{#387090} [add] https://crrev.com/53cea4d18b15b735c4ab6cd85cfcb3cc07593452/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-painting-rtl-expected.html [add] https://crrev.com/53cea4d18b15b735c4ab6cd85cfcb3cc07593452/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-painting-rtl.html [modify] https://crrev.com/53cea4d18b15b735c4ab6cd85cfcb3cc07593452/third_party/WebKit/Source/core/layout/LayoutGrid.cpp [modify] https://crrev.com/53cea4d18b15b735c4ab6cd85cfcb3cc07593452/third_party/WebKit/Source/core/layout/LayoutGrid.h [modify] https://crrev.com/53cea4d18b15b735c4ab6cd85cfcb3cc07593452/third_party/WebKit/Source/core/paint/GridPainter.cpp
,
Apr 13 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by r...@igalia.com
, Apr 11 2016Status: Assigned (was: Available)