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

Issue 845313003: [CSS Grid Layout] Tracks growing beyond limits when they should not (Closed)

Created:
5 years, 11 months ago by svillar
Modified:
5 years, 11 months ago
CC:
blink-reviews, blink-reviews-rendering, Dominik Röttsches, eae+blinkwatch, jchaffraix+rendering, jfernandez, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, Manuel Rego, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

[CSS Grid Layout] Tracks growing beyond limits when they should not In particular it incorrectly grows some tracks beyond limits when handling min-content and max-content base sizes. In those cases we should only grow "any affected track that happens to also have an intrinsic max track sizing function" or all of them if there are none. The problem is that we're using a vector of indexes pointing to the vector with the list of affected tracks. Those indexes become easily incorrect because the first thing we do in distributeSpaceToTracks() is to sort the vector with the affected tracks by growth potential. Instead we now pass a vector with pointers to the list of tracks allowed to grow over the limits. The size changes are now directly stored in the GridTracks (it's called plannedIncrease) instead of in a separate vector, so we don't need to worry about tracks being rearranged (and we also get rid of the ugly vector of indexes pointing to another vector). Apart from that I took the chance to "modernize" some of our loops with the use of range-based loops and "auto". BUG=449130 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=188891

Patch Set 1 #

Total comments: 8

Patch Set 2 : Bring old-style loops back. Ensure that planned increases are applied. #

Total comments: 5

Patch Set 3 : Patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -31 lines) Patch
M LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution.html View 3 chunks +20 lines, -0 lines 0 comments Download
M LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution-expected.txt View 2 chunks +8 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderGrid.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderGrid.cpp View 1 2 8 chunks +43 lines, -29 lines 0 comments Download

Messages

Total messages: 12 (2 generated)
svillar
Adding reviewers...
5 years, 11 months ago (2015-01-15 13:52:02 UTC) #2
Julien - ping for review
https://codereview.chromium.org/845313003/diff/1/Source/core/rendering/RenderGrid.cpp File Source/core/rendering/RenderGrid.cpp (left): https://codereview.chromium.org/845313003/diff/1/Source/core/rendering/RenderGrid.cpp#oldcode800 Source/core/rendering/RenderGrid.cpp:800: ASSERT(availableLogicalSpace > 0); If you don't have any |availableLogicalSpace|, ...
5 years, 11 months ago (2015-01-19 16:36:25 UTC) #3
svillar
Thanks for the review. https://codereview.chromium.org/845313003/diff/1/Source/core/rendering/RenderGrid.cpp File Source/core/rendering/RenderGrid.cpp (left): https://codereview.chromium.org/845313003/diff/1/Source/core/rendering/RenderGrid.cpp#oldcode800 Source/core/rendering/RenderGrid.cpp:800: ASSERT(availableLogicalSpace > 0); On 2015/01/19 ...
5 years, 11 months ago (2015-01-20 08:23:24 UTC) #4
Julien - ping for review
https://codereview.chromium.org/845313003/diff/1/Source/core/rendering/RenderGrid.cpp File Source/core/rendering/RenderGrid.cpp (right): https://codereview.chromium.org/845313003/diff/1/Source/core/rendering/RenderGrid.cpp#newcode46 Source/core/rendering/RenderGrid.cpp:46: , m_plannedIncrease(0) On 2015/01/20 08:23:24, svillar wrote: > On ...
5 years, 11 months ago (2015-01-20 13:47:14 UTC) #5
svillar
On 2015/01/20 13:47:14, Julien Chaffraix - CET wrote: > https://codereview.chromium.org/845313003/diff/1/Source/core/rendering/RenderGrid.cpp > All in all, we ...
5 years, 11 months ago (2015-01-20 14:35:31 UTC) #6
Julien - ping for review
lgtm https://codereview.chromium.org/845313003/diff/20001/LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution.html File LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution.html (right): https://codereview.chromium.org/845313003/diff/20001/LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution.html#newcode371 LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution.html:371: testGridColumnsValues("gridMaxContentAndMaxContentFixedAndMaxContent", "70px 20px 50px"); This result doesn't seem ...
5 years, 11 months ago (2015-01-23 10:20:12 UTC) #7
svillar
https://codereview.chromium.org/845313003/diff/20001/LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution.html File LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution.html (right): https://codereview.chromium.org/845313003/diff/20001/LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution.html#newcode371 LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution.html:371: testGridColumnsValues("gridMaxContentAndMaxContentFixedAndMaxContent", "70px 20px 50px"); On 2015/01/23 10:20:12, Julien Chaffraix ...
5 years, 11 months ago (2015-01-23 10:39:47 UTC) #8
svillar
https://codereview.chromium.org/845313003/diff/20001/Source/core/rendering/RenderGrid.cpp File Source/core/rendering/RenderGrid.cpp (right): https://codereview.chromium.org/845313003/diff/20001/Source/core/rendering/RenderGrid.cpp#newcode824 Source/core/rendering/RenderGrid.cpp:824: for (size_t i = 0; i < tracksSize; ++i) ...
5 years, 11 months ago (2015-01-23 13:44:10 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/845313003/40001
5 years, 11 months ago (2015-01-23 14:01:50 UTC) #11
commit-bot: I haz the power
5 years, 11 months ago (2015-01-23 15:23:06 UTC) #12
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=188891

Powered by Google App Engine
This is Rietveld 408576698