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

Issue 2037383002: [css-grid] Fix definite/indefinite size detection on block axis (Closed)

Created:
4 years, 6 months ago by Manuel Rego
Modified:
4 years, 6 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@fix-percentage-widths
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[css-grid] Fix definite/indefinite size detection on block axis LayoutBox::hasDefiniteLogicalHeight() was wrong as it was not taking into account several cases where the height is definite/indefinite. E.g. it was not checking the special situations for flex items, that despite of having height "auto" can definite sometimes. As the method was buggy, this patch is directly removing it and using LayoutBox::percentageLogicalHeightIsResolvable() instead. Add new test to check that the flexbox case works as expected. BUG=617876 TEST=fast/css-grid-layout/flex-item-grid-container-percentage-rows.html Committed: https://crrev.com/f8393437ca2c05d3334011444260adac7e82530c Cr-Commit-Position: refs/heads/master@{#398680}

Patch Set 1 #

Total comments: 2

Patch Set 2 : New version getting rid of hasDefiniteLogicalHeight() #

Total comments: 1

Patch Set 3 : Use firstInFlowChildBox() #

Total comments: 4

Patch Set 4 : Patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -20 lines) Patch
A third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-item-grid-container-percentage-rows.html View 1 1 chunk +36 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-item-grid-container-percentage-rows-expected.html View 1 1 chunk +29 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.h View 1 2 3 3 chunks +9 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 1 chunk +0 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 25 (10 generated)
Manuel Rego
4 years, 6 months ago (2016-06-06 11:08:48 UTC) #2
jfernandez
non-owner LGTM.
4 years, 6 months ago (2016-06-06 14:07:52 UTC) #3
cbiesinger1
The necessity for this function makes me sad; it duplicates some logic from computePercentageLogicalHeight :( ...
4 years, 6 months ago (2016-06-06 16:46:02 UTC) #5
Manuel Rego
On 2016/06/06 16:46:02, cbiesinger1 wrote: > The necessity for this function makes me sad; it ...
4 years, 6 months ago (2016-06-07 09:05:56 UTC) #9
cbiesinger
On 2016/06/07 09:05:56, Manuel Rego wrote: > Yes, this is wrong for those cases. > ...
4 years, 6 months ago (2016-06-07 18:03:13 UTC) #10
cbiesinger
https://codereview.chromium.org/2037383002/diff/20001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp File third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp (right): https://codereview.chromium.org/2037383002/diff/20001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp#newcode237 third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:237: if (!firstChildBox() || firstChildBox()->percentageLogicalHeightIsResolvable() || isLayoutView()) { Actually, wait, ...
4 years, 6 months ago (2016-06-07 18:05:56 UTC) #11
cbiesinger
On 2016/06/07 18:05:56, cbiesinger wrote: > https://codereview.chromium.org/2037383002/diff/20001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp > File third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp (right): > > https://codereview.chromium.org/2037383002/diff/20001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp#newcode237 > ...
4 years, 6 months ago (2016-06-07 18:08:58 UTC) #12
Manuel Rego
On 2016/06/07 18:08:58, cbiesinger wrote: > On 2016/06/07 18:05:56, cbiesinger wrote: > > > https://codereview.chromium.org/2037383002/diff/20001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp ...
4 years, 6 months ago (2016-06-07 20:13:01 UTC) #13
cbiesinger
lgtm with some nits. I don't think this part of the description is still correct: ...
4 years, 6 months ago (2016-06-07 20:21:12 UTC) #14
Manuel Rego
Thanks for the review. https://codereview.chromium.org/2037383002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp File third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp (right): https://codereview.chromium.org/2037383002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp#newcode237 third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:237: if (!firstInFlowChildBox() || firstInFlowChildBox()->percentageLogicalHeightIsResolvable() || ...
4 years, 6 months ago (2016-06-08 12:10:25 UTC) #15
cbiesinger
On 2016/06/08 12:10:25, Manuel Rego wrote: > https://codereview.chromium.org/2037383002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBox.cpp > File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): > > https://codereview.chromium.org/2037383002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode2734 ...
4 years, 6 months ago (2016-06-08 15:51:01 UTC) #16
Manuel Rego
On 2016/06/08 15:51:01, cbiesinger wrote: > On 2016/06/08 12:10:25, Manuel Rego wrote: > > > ...
4 years, 6 months ago (2016-06-08 20:02:48 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2037383002/60001
4 years, 6 months ago (2016-06-08 20:17:05 UTC) #21
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 6 months ago (2016-06-08 21:25:38 UTC) #23
commit-bot: I haz the power
4 years, 6 months ago (2016-06-08 21:28:00 UTC) #25
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/f8393437ca2c05d3334011444260adac7e82530c
Cr-Commit-Position: refs/heads/master@{#398680}

Powered by Google App Engine
This is Rietveld 408576698