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

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

Created:
3 years, 8 months ago by svillar
Modified:
3 years, 8 months ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/branch-heads/3071
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} (cherry picked from commit 41d53a7316548ae2147de1fbb0cb9d1fda4ed3fa) Review-Url: https://codereview.chromium.org/2839893002 . Cr-Commit-Position: refs/branch-heads/3071@{#196} Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641} Committed: https://chromium.googlesource.com/chromium/src/+/f83ac4838f56cb809ddf3bfef76336979a2d4b09

Patch Set 1 #

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 chunk +62 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.h View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp View 7 chunks +5 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.cpp View 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
svillar
3 years, 8 months ago (2017-04-25 08:40:09 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
f83ac4838f56cb809ddf3bfef76336979a2d4b09.

Powered by Google App Engine
This is Rietveld 408576698