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

Issue 2834473003: [css-grid] Preemptively store intrinsic sizes during layout (Closed)

Created:
3 years, 8 months ago by svillar
Modified:
3 years, 8 months ago
Reviewers:
jfernandez, Manuel Rego, eae
CC:
chromium-reviews, jfernandez, szager+layoutwatch_chromium.org, zoltan1, svillar, 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] Preemptively store intrinsic sizes during layout Computing intrinsic sizes after the layout process (as it happens in Mac with the calls to content::RenderViewImpl::didUpdateLayout()) or when using the grid as a flex item in some cases, is very problematic, because the intrinsic size computation did change the override sizes of the items. One potential solution would be to mark the grid as needs layout after the preferred widths computation but that is forbidden by the engine (also it would require an additional layout). There is a better way to do this based on the fact that the preferred widths computation is actually part of the track sizing algorithm. We could store the intrinsic sizes of the grid returned by the track sizing algorithm after computing the column sizes in the event of the intrinsic sizes being dirty. Note that this does not affect the other cases where preferred widths are required as we already execute computeIntrinsicLogicalWidths() as part of updateLogicalWidths() if required. BUG=708159 Review-Url: https://codereview.chromium.org/2834473003 Cr-Commit-Position: refs/heads/master@{#466668} Committed: https://chromium.googlesource.com/chromium/src/+/41d53a7316548ae2147de1fbb0cb9d1fda4ed3fa

Patch Set 1 #

Patch Set 2 : Patch+Test #

Total comments: 6

Patch Set 3 : Patch for landing #

Patch Set 4 : More tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -19 lines) Patch
A third_party/WebKit/LayoutTests/fast/css-grid-layout/preferred-width-computed-after-layout.html View 1 2 3 1 chunk +62 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp View 1 7 chunks +5 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.cpp View 1 2 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (5 generated)
svillar
Sending out for review
3 years, 8 months ago (2017-04-21 14:37:25 UTC) #2
jfernandez
https://codereview.chromium.org/2834473003/diff/20001/third_party/WebKit/Source/core/layout/LayoutGrid.cpp File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/2834473003/diff/20001/third_party/WebKit/Source/core/layout/LayoutGrid.cpp#newcode284 third_party/WebKit/Source/core/layout/LayoutGrid.cpp:284: // algorithm always compute them as part of its ...
3 years, 8 months ago (2017-04-21 14:48:03 UTC) #3
svillar
https://codereview.chromium.org/2834473003/diff/20001/third_party/WebKit/Source/core/layout/LayoutGrid.cpp File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/2834473003/diff/20001/third_party/WebKit/Source/core/layout/LayoutGrid.cpp#newcode284 third_party/WebKit/Source/core/layout/LayoutGrid.cpp:284: // algorithm always compute them as part of its ...
3 years, 8 months ago (2017-04-21 14:51:24 UTC) #4
jfernandez
lgtm
3 years, 8 months ago (2017-04-24 08:33:17 UTC) #5
Manuel Rego
Really nice idea to solve this complex issue. LGTM! https://codereview.chromium.org/2834473003/diff/20001/third_party/WebKit/LayoutTests/fast/css-grid-layout/preferred-width-computed-after-layout.html File third_party/WebKit/LayoutTests/fast/css-grid-layout/preferred-width-computed-after-layout.html (right): https://codereview.chromium.org/2834473003/diff/20001/third_party/WebKit/LayoutTests/fast/css-grid-layout/preferred-width-computed-after-layout.html#newcode21 third_party/WebKit/LayoutTests/fast/css-grid-layout/preferred-width-computed-after-layout.html:21: ...
3 years, 8 months ago (2017-04-24 09:08:23 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/2834473003/60001
3 years, 8 months ago (2017-04-24 16:19:04 UTC) #9
commit-bot: I haz the power
3 years, 8 months ago (2017-04-24 17:21:18 UTC) #12
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/41d53a7316548ae2147de1fbb0cb...

Powered by Google App Engine
This is Rietveld 408576698