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

Issue 1317643005: [css-grid] Fix track sizing algo w/ size restrictions and intrinsic sizes (Closed)

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

Description

[css-grid] Fix track sizing algo w/ size restrictions and intrinsic sizes The current implementation does not comply with what specs say about the size available for the track sizing algorithm when the grid container is sized under min/max size restrictions and/or when it has intrinsic sizes. For the case of columns it was working fine as the intrinsic widths are properly calculated by computeIntrinsicLogicalWidths() before the layout of grid items is done. The problem is the rows as the heights depend on the widths in the CSS Box model. Apart from that we properly detect from now on when a grid container either has a definite or indefinite size. BUG=423743 Committed: https://crrev.com/889d2498a67a461393da302bf244bc35d507e268 Cr-Commit-Position: refs/heads/master@{#358816}

Patch Set 1 #

Total comments: 27

Patch Set 2 : Simplified code #

Total comments: 3

Patch Set 3 : New design #

Total comments: 9

Patch Set 4 : Improved patch #

Patch Set 5 : Improved path. Fixed a blunder after a variable rename #

Patch Set 6 : One more new test from original bug report #

Patch Set 7 : Rebased stuff. Added some more tests #

Total comments: 1

Patch Set 8 : Fixed contenteditable behavior #

Patch Set 9 : Patch for landing. Removed unused params #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1111 lines, -239 lines) Patch
A third_party/WebKit/LayoutTests/fast/css-grid-layout/absolute-positioning-definite-sizes.html View 1 2 3 4 5 1 chunk +38 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/absolute-positioning-definite-sizes-expected.txt View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-and-intrinsic-sizes.html View 1 2 3 4 5 6 1 chunk +77 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-and-intrinsic-sizes-expected.txt View 1 2 3 4 5 6 1 chunk +19 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-and-minmax-content-resolution-rows.html View 1 2 1 chunk +3 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-element-change-columns-repaint.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-change-column-repaint.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html View 1 2 2 chunks +91 lines, -157 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/maximize-tracks-definite-indefinite-height.html View 1 2 3 1 chunk +261 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/maximize-tracks-definite-indefinite-height-expected.txt View 1 2 3 1 chunk +109 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/maximize-tracks-definite-indefinite-width.html View 1 2 1 chunk +215 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/maximize-tracks-definite-indefinite-width-expected.txt View 1 2 1 chunk +97 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/percent-of-indefinite-track-size.html View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/relayout-indefinite-heights.html View 1 2 3 1 chunk +37 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/relayout-indefinite-heights-expected.txt View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/key-events-in-editable-gridbox.html View 1 2 3 4 5 6 7 2 chunks +17 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/key-events-in-editable-gridbox-expected.txt View 1 2 3 4 5 6 7 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.h View 1 2 3 4 5 6 7 8 5 chunks +12 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.cpp View 1 2 3 4 5 6 7 8 15 chunks +110 lines, -64 lines 0 comments Download

Messages

Total messages: 31 (4 generated)
svillar
Adding reviewers
5 years, 3 months ago (2015-09-01 14:17:14 UTC) #2
jfernandez
https://codereview.chromium.org/1317643005/diff/1/LayoutTests/fast/css-grid-layout/grid-element-change-columns-repaint.html File LayoutTests/fast/css-grid-layout/grid-element-change-columns-repaint.html (right): https://codereview.chromium.org/1317643005/diff/1/LayoutTests/fast/css-grid-layout/grid-element-change-columns-repaint.html#newcode19 LayoutTests/fast/css-grid-layout/grid-element-change-columns-repaint.html:19: width: -webkit-min-content; Why this change ? Is it related ...
5 years, 3 months ago (2015-09-01 23:41:39 UTC) #3
svillar
Thanks for the review! https://codereview.chromium.org/1317643005/diff/1/LayoutTests/fast/css-grid-layout/grid-element-change-columns-repaint.html File LayoutTests/fast/css-grid-layout/grid-element-change-columns-repaint.html (right): https://codereview.chromium.org/1317643005/diff/1/LayoutTests/fast/css-grid-layout/grid-element-change-columns-repaint.html#newcode19 LayoutTests/fast/css-grid-layout/grid-element-change-columns-repaint.html:19: width: -webkit-min-content; On 2015/09/01 23:41:39, ...
5 years, 3 months ago (2015-09-02 13:25:48 UTC) #4
Manuel Rego
Just another informal review with some questions. https://codereview.chromium.org/1317643005/diff/1/LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html File LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html (left): https://codereview.chromium.org/1317643005/diff/1/LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html#oldcode46 LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html:46: .dummyContainer { ...
5 years, 3 months ago (2015-09-17 11:04:03 UTC) #5
svillar
Thanks for the reviews. I'll update the patch with some of the suggestions. https://codereview.chromium.org/1317643005/diff/1/LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html File ...
5 years, 3 months ago (2015-09-17 14:05:44 UTC) #6
svillar
https://codereview.chromium.org/1317643005/diff/1/LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html File LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html (left): https://codereview.chromium.org/1317643005/diff/1/LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html#oldcode46 LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html:46: .dummyContainer { } On 2015/09/17 14:05:44, svillar wrote: > ...
5 years, 3 months ago (2015-09-17 15:37:41 UTC) #7
svillar
I've moved the code to a new function which computes the space to distribute. maximizeTracks() ...
5 years, 3 months ago (2015-09-17 15:44:08 UTC) #8
jfernandez
lgtm The code is much clearer now.
5 years, 3 months ago (2015-09-17 15:57:23 UTC) #9
Manuel Rego
Great changes, the code looks much better now! https://codereview.chromium.org/1317643005/diff/1/Source/core/layout/LayoutGrid.cpp File Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1317643005/diff/1/Source/core/layout/LayoutGrid.cpp#newcode396 Source/core/layout/LayoutGrid.cpp:396: return ...
5 years, 3 months ago (2015-09-18 10:52:08 UTC) #10
svillar
https://codereview.chromium.org/1317643005/diff/1/Source/core/layout/LayoutGrid.cpp File Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1317643005/diff/1/Source/core/layout/LayoutGrid.cpp#newcode396 Source/core/layout/LayoutGrid.cpp:396: return style.logicalMinHeight().isMinContent() || style.logicalHeight().isMinContent() || style.logicalMaxHeight().isMinContent(); On 2015/09/18 10:52:07, ...
5 years, 3 months ago (2015-09-18 12:01:20 UTC) #11
Manuel Rego
https://codereview.chromium.org/1317643005/diff/1/Source/core/layout/LayoutGrid.cpp File Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1317643005/diff/1/Source/core/layout/LayoutGrid.cpp#newcode396 Source/core/layout/LayoutGrid.cpp:396: return style.logicalMinHeight().isMinContent() || style.logicalHeight().isMinContent() || style.logicalMaxHeight().isMinContent(); On 2015/09/18 12:01:20, ...
5 years, 3 months ago (2015-09-22 10:12:34 UTC) #12
cbiesinger
https://codereview.chromium.org/1317643005/diff/20001/Source/core/layout/LayoutGrid.cpp File Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1317643005/diff/20001/Source/core/layout/LayoutGrid.cpp#newcode394 Source/core/layout/LayoutGrid.cpp:394: static bool heightSizedUnderMinContentConstraint(const ComputedStyle& style) I'm somewhat skeptical about ...
5 years, 2 months ago (2015-09-30 15:49:35 UTC) #13
svillar
On 2015/09/30 15:49:35, cbiesinger wrote: > https://codereview.chromium.org/1317643005/diff/20001/Source/core/layout/LayoutGrid.cpp > File Source/core/layout/LayoutGrid.cpp (right): > > https://codereview.chromium.org/1317643005/diff/20001/Source/core/layout/LayoutGrid.cpp#newcode394 > ...
5 years, 2 months ago (2015-10-01 14:56:04 UTC) #14
svillar
Could you guys review the last patch which is a totally different approach?
5 years, 2 months ago (2015-10-08 09:34:08 UTC) #16
Manuel Rego
Just a couple of inline comments. Also, I've been testing this example: http://jsbin.com/kusore/1/edit?html,css,output And it ...
5 years, 2 months ago (2015-10-09 14:38:35 UTC) #17
jfernandez
Some additional comments on this new version of the patch. https://codereview.chromium.org/1317643005/diff/40001/third_party/WebKit/Source/core/layout/LayoutGrid.cpp File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1317643005/diff/40001/third_party/WebKit/Source/core/layout/LayoutGrid.cpp#newcode334 ...
5 years, 2 months ago (2015-10-19 10:46:22 UTC) #18
svillar
Thanks for both reviews. I'm uploading a new patch soon, which is an improved version ...
5 years, 2 months ago (2015-10-19 12:14:20 UTC) #19
svillar
@cbiesinger, @esprehn could you please take a look? The code changed quite a lot since ...
5 years, 1 month ago (2015-10-26 15:40:45 UTC) #20
cbiesinger
lgtm https://codereview.chromium.org/1317643005/diff/120001/third_party/WebKit/Source/core/layout/LayoutGrid.h File third_party/WebKit/Source/core/layout/LayoutGrid.h (right): https://codereview.chromium.org/1317643005/diff/120001/third_party/WebKit/Source/core/layout/LayoutGrid.h#newcode100 third_party/WebKit/Source/core/layout/LayoutGrid.h:100: LayoutUnit computeIntrinsicLogicalContentHeightUsing(const Length& logicalHeightLength, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPadding) ...
5 years, 1 month ago (2015-10-26 22:22:35 UTC) #21
esprehn
On 2015/10/26 at 15:40:45, svillar wrote: > @cbiesinger, @esprehn could you please take a look? ...
5 years, 1 month ago (2015-10-27 05:16:18 UTC) #22
svillar
On 2015/10/27 05:16:18, esprehn wrote: > On 2015/10/26 at 15:40:45, svillar wrote: > > @cbiesinger, ...
5 years, 1 month ago (2015-10-29 09:58:18 UTC) #23
esprehn
Yes I will, sorry for the delay! To unsubscribe from this group and stop receiving ...
5 years, 1 month ago (2015-10-29 10:50:23 UTC) #24
svillar
On 29/10/15 11:50, Elliott Sprehn wrote: > Yes I will, sorry for the delay! > ...
5 years, 1 month ago (2015-10-29 15:15:45 UTC) #25
svillar
The minimum size for contenteditable grids should not be part of the intrinsic size. Also ...
5 years, 1 month ago (2015-11-02 10:03:56 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1317643005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1317643005/160001
5 years, 1 month ago (2015-11-10 08:43:12 UTC) #29
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 1 month ago (2015-11-10 10:50:03 UTC) #30
commit-bot: I haz the power
5 years, 1 month ago (2015-11-10 10:51:09 UTC) #31
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/889d2498a67a461393da302bf244bc35d507e268
Cr-Commit-Position: refs/heads/master@{#358816}

Powered by Google App Engine
This is Rietveld 408576698