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

Issue 2808453002: [css-grid] Use Optional to represent indefinite lengths (Closed)

Created:
3 years, 8 months ago by svillar
Modified:
3 years, 8 months ago
Reviewers:
jfernandez, Manuel Rego
CC:
chromium-reviews, jfernandez, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, Manuel Rego, leviw+renderwatch, jchaffraix+rendering, blink-reviews, eae+blinkwatch
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[css-grid] Use Optional to represent indefinite lengths Blink has been using LayoutUnit(-1) to represent indefinite sizes or more in general, sizes that cannot be resolved. That's unfortunate because it forces us to use that magic number and also because negative LayoutUnits are valid outcomes of some operations. In our particular case, that was forcing us to check the SizingOperation argument in the GridTrackSizingAlgorithm to know whether the passed available and free sizes where actually indefinite or not. Actually that was not totally correct as this was based on the assumption that we were doing intrinsic size computations (preferred widths) whenever the sizes where indefinite which is not correct for all the cases (it's true for widths but a height:auto grid container would have indefinite height and require indefinite size computations). This does not require any additional tests as we are not changing any behaviour. It's a step forward in the process of decoupling the concepts of definite/indefinite sizes and intrinsicSize/layout operations. Review-Url: https://codereview.chromium.org/2808453002 Cr-Commit-Position: refs/heads/master@{#462881} Committed: https://chromium.googlesource.com/chromium/src/+/55b4817a2d8e7d13f51fd30b461c946671361d76

Patch Set 1 #

Total comments: 16

Patch Set 2 : Changes after review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -55 lines) Patch
M third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.h View 5 chunks +14 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp View 1 19 chunks +57 lines, -35 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.cpp View 5 chunks +9 lines, -9 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
svillar
3 years, 8 months ago (2017-04-07 10:01:38 UTC) #2
jfernandez
https://codereview.chromium.org/2808453002/diff/1/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp File third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp (right): https://codereview.chromium.org/2808453002/diff/1/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp#newcode1334 third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp:1334: if (this->freeSpace(m_direction)) { Is possible that freeSpace(m_direction) is null ...
3 years, 8 months ago (2017-04-07 11:48:57 UTC) #3
svillar
Thanks for the review. I'll upload a modified version. https://codereview.chromium.org/2808453002/diff/1/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp File third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp (right): https://codereview.chromium.org/2808453002/diff/1/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp#newcode1334 third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp:1334: ...
3 years, 8 months ago (2017-04-07 13:55:23 UTC) #4
svillar
https://codereview.chromium.org/2808453002/diff/1/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp File third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp (right): https://codereview.chromium.org/2808453002/diff/1/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp#newcode1385 third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp:1385: if (availableSpace) { On 2017/04/07 11:48:57, jfernandez wrote: > ...
3 years, 8 months ago (2017-04-07 14:03:16 UTC) #5
jfernandez
lgtm https://codereview.chromium.org/2808453002/diff/1/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp File third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp (right): https://codereview.chromium.org/2808453002/diff/1/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp#newcode1385 third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp:1385: if (availableSpace) { On 2017/04/07 14:03:16, svillar wrote: ...
3 years, 8 months ago (2017-04-07 14:13:31 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2808453002/20001
3 years, 8 months ago (2017-04-07 14:49:35 UTC) #9
svillar
On 2017/04/07 14:13:31, jfernandez wrote: > lgtm > > https://codereview.chromium.org/2808453002/diff/1/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp > File third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp (right): > ...
3 years, 8 months ago (2017-04-07 14:49:58 UTC) #10
commit-bot: I haz the power
3 years, 8 months ago (2017-04-07 16:16:01 UTC) #13
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/55b4817a2d8e7d13f51fd30b461c...

Powered by Google App Engine
This is Rietveld 408576698