Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(848)

Issue 1873163002: [css-grid] Fix painting in RTL (Closed)

Created:
4 years, 8 months ago by Manuel Rego
Modified:
4 years, 8 months ago
CC:
chromium-reviews, jfernandez, svillar, dshwang, Manuel Rego, slimming-paint-reviews_chromium.org, blink-reviews-paint_chromium.org, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[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 Committed: https://crrev.com/53cea4d18b15b735c4ab6cd85cfcb3cc07593452 Cr-Commit-Position: refs/heads/master@{#387090}

Patch Set 1 #

Patch Set 2 : New version #

Total comments: 2

Patch Set 3 : Upload rebased version after r386952 has landed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+188 lines, -9 lines) Patch
A third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-painting-rtl.html View 1 chunk +83 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-painting-rtl-expected.html View 1 chunk +75 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.cpp View 1 2 2 chunks +12 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/paint/GridPainter.cpp View 1 1 chunk +16 lines, -1 line 0 comments Download

Messages

Total messages: 17 (8 generated)
Manuel Rego
I know this is mostly a change in /paint but it's 100% related to grid ...
4 years, 8 months ago (2016-04-12 10:52:56 UTC) #4
cbiesinger
https://codereview.chromium.org/1873163002/diff/20001/third_party/WebKit/Source/core/paint/GridPainter.cpp File third_party/WebKit/Source/core/paint/GridPainter.cpp (right): https://codereview.chromium.org/1873163002/diff/20001/third_party/WebKit/Source/core/paint/GridPainter.cpp#newcode53 third_party/WebKit/Source/core/paint/GridPainter.cpp:53: columnPositions[i] = m_layoutGrid.translateRTLCoordinate(columnPositions[i]); Why not make this translation inside ...
4 years, 8 months ago (2016-04-12 20:07:51 UTC) #5
Manuel Rego
https://codereview.chromium.org/1873163002/diff/20001/third_party/WebKit/Source/core/paint/GridPainter.cpp File third_party/WebKit/Source/core/paint/GridPainter.cpp (right): https://codereview.chromium.org/1873163002/diff/20001/third_party/WebKit/Source/core/paint/GridPainter.cpp#newcode53 third_party/WebKit/Source/core/paint/GridPainter.cpp:53: columnPositions[i] = m_layoutGrid.translateRTLCoordinate(columnPositions[i]); On 2016/04/12 20:07:51, cbiesinger wrote: > ...
4 years, 8 months ago (2016-04-13 08:42:56 UTC) #6
cbiesinger
On 2016/04/13 08:42:56, Manuel Rego wrote: > https://codereview.chromium.org/1873163002/diff/20001/third_party/WebKit/Source/core/paint/GridPainter.cpp > File third_party/WebKit/Source/core/paint/GridPainter.cpp (right): > > https://codereview.chromium.org/1873163002/diff/20001/third_party/WebKit/Source/core/paint/GridPainter.cpp#newcode53 ...
4 years, 8 months ago (2016-04-13 19:17:41 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1873163002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1873163002/40001
4 years, 8 months ago (2016-04-13 20:02:54 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_rel/builds/50387)
4 years, 8 months ago (2016-04-13 20:16:01 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1873163002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1873163002/40001
4 years, 8 months ago (2016-04-13 20:23:23 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-04-13 21:15:29 UTC) #15
commit-bot: I haz the power
4 years, 8 months ago (2016-04-13 21:17:10 UTC) #17
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/53cea4d18b15b735c4ab6cd85cfcb3cc07593452
Cr-Commit-Position: refs/heads/master@{#387090}

Powered by Google App Engine
This is Rietveld 408576698