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

Issue 1838173002: [css-grid] Refactor positioned children code (Closed)

Created:
4 years, 8 months ago by Manuel Rego
Modified:
4 years, 8 months ago
CC:
chromium-reviews, jfernandez, szager+layoutwatch_chromium.org, zoltan1, svillar, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, leviw+renderwatch, jchaffraix+rendering, blink-reviews, eae+blinkwatch
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[css-grid] Refactor positioned children code This is a refactoring of LayoutGrid::offsetAndBreadthForPositionedChild() in order to calculate offset and breadth in a more clean way. Hopefully making the code easier to follow. Thanks to the refactoring, now positioned children in RTL are working fine if they use the static inline position (when "left" and "right" properties are both "auto"). The other case (not having a static inline position) will be fixed in a separated patch. Added RTL cases for most of the positioned tests, which are now passing with this patch. Pending to add RTL tests when "left" and "right" are not "auto" (the item doesn't use the static inline position), but that will be done in the other patch. BUG=568882 Committed: https://crrev.com/4c3299ff93c072a4c0b10947ab3f79622709f44f Cr-Commit-Position: refs/heads/master@{#383708}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+254 lines, -60 lines) Patch
M third_party/WebKit/LayoutTests/fast/css-grid-layout/absolute-positioning-grid-container-containing-block.html View 2 chunks +70 lines, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/fast/css-grid-layout/absolute-positioning-grid-container-containing-block-expected.txt View 1 chunk +0 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/absolute-positioning-grid-container-parent.html View 2 chunks +39 lines, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/fast/css-grid-layout/absolute-positioning-grid-container-parent-expected.txt View 1 chunk +0 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-background.html View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-background-expected.html View 1 chunk +1 line, -2 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-background-rtl-expected.html View 2 chunks +6 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-implicit-grid.html View 2 chunks +28 lines, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-implicit-grid-expected.txt View 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-implicit-grid-line.html View 2 chunks +22 lines, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-implicit-grid-line-expected.txt View 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-unknown-named-grid-line.html View 2 chunks +16 lines, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-unknown-named-grid-line-expected.txt View 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-sizing-positioned-items.html View 2 chunks +55 lines, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-sizing-positioned-items-expected.txt View 1 chunk +0 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.cpp View 1 chunk +15 lines, -12 lines 2 comments Download

Messages

Total messages: 12 (5 generated)
Manuel Rego
This is the first patch (refactoring) of the patch to fix RTL issues in positioned ...
4 years, 8 months ago (2016-03-29 10:58:42 UTC) #2
svillar
lgtm. Much better code indeed
4 years, 8 months ago (2016-03-29 11:46:20 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1838173002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1838173002/1
4 years, 8 months ago (2016-03-29 11:55:58 UTC) #6
jfernandez
https://codereview.chromium.org/1838173002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1838173002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp#newcode1528 third_party/WebKit/Source/core/layout/LayoutGrid.cpp:1528: if (isForColumns) I think we must use an isXXAxis ...
4 years, 8 months ago (2016-03-29 12:24:35 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 8 months ago (2016-03-29 13:05:22 UTC) #9
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/4c3299ff93c072a4c0b10947ab3f79622709f44f Cr-Commit-Position: refs/heads/master@{#383708}
4 years, 8 months ago (2016-03-29 13:06:21 UTC) #11
Manuel Rego
4 years, 8 months ago (2016-03-29 13:43:15 UTC) #12
Message was sent while issue was closed.
On 2016/03/29 12:24:35, jfernandez wrote:
>
https://codereview.chromium.org/1838173002/diff/1/third_party/WebKit/Source/c...
> File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right):
> 
>
https://codereview.chromium.org/1838173002/diff/1/third_party/WebKit/Source/c...
> third_party/WebKit/Source/core/layout/LayoutGrid.cpp:1528: if (isForColumns)
> I think we must use an isXXAxis terminologym, instead this isForColumns/Rows
> one.
> 
>
https://codereview.chromium.org/1838173002/diff/1/third_party/WebKit/Source/c...
> third_party/WebKit/Source/core/layout/LayoutGrid.cpp:1536: if (isForColumns)
> Ditto

Yes, probably we should do a different patch changing this all over the place.

I'm not sure what's the best name though, my preference would be:
"isInlineAxis"

Powered by Google App Engine
This is Rietveld 408576698