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

Issue 1854623002: [css-grid] Use the margin box for non auto minimum sizes (Closed)

Created:
4 years, 8 months ago by svillar
Modified:
4 years, 8 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@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[css-grid] Use the margin box for non auto minimum sizes When computing the min-size of items with non-auto minimum height/width we are incorrectly returning the size of the border box, and thus incorrectly ignoring the margins of the item. This is a follow up patch of refs/heads/master@{#383944} were we added the missing border and paddings for heights. Contrary to that, we were not including margins for both axis. This CL requires 3 different interrelated changes: * Add the margins to the min-size returned by minSizeForChild (might require a layout) * Refactor and extract width computations from logicalHeightForChild(); not totally mandatory but pretty logical and helpful * Use a new update function to isolate the computation of the override width Committed: https://crrev.com/6838c4a3bbe2ab48aeb84f54d1ca388425f83f82 Cr-Commit-Position: refs/heads/master@{#385697}

Patch Set 1 #

Total comments: 9

Patch Set 2 : Javi's review changes #

Patch Set 3 : Patch for landing #

Patch Set 4 : Patch for landing v2 #

Patch Set 5 : Fix for mac trybot #

Patch Set 6 : New approach #

Total comments: 7

Patch Set 7 : Patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+206 lines, -29 lines) Patch
M third_party/WebKit/LayoutTests/fast/css-grid-layout/min-height-border-box.html View 8 chunks +14 lines, -13 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/min-width-margin-box.html View 1 chunk +147 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.h View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.cpp View 1 2 3 4 5 6 11 chunks +43 lines, -15 lines 0 comments Download

Messages

Total messages: 28 (9 generated)
svillar
4 years, 8 months ago (2016-04-01 09:57:32 UTC) #2
jfernandez
https://codereview.chromium.org/1854623002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1854623002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp#newcode757 third_party/WebKit/Source/core/layout/LayoutGrid.cpp:757: bool overrideWidthHasChanged = updateOverrideContainingBlockContentLogicalWidthForChild(child, sizingData); Why we can't call ...
4 years, 8 months ago (2016-04-01 11:00:46 UTC) #3
jfernandez
After discussing privately all the issues I can give my non-owner LGTM.
4 years, 8 months ago (2016-04-01 12:16:58 UTC) #4
jfernandez
https://codereview.chromium.org/1854623002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.h File third_party/WebKit/Source/core/layout/LayoutGrid.h (right): https://codereview.chromium.org/1854623002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.h#newcode151 third_party/WebKit/Source/core/layout/LayoutGrid.h:151: bool updateOverrideContainingBlockContentLogicalWidthForChild(LayoutBox&, GridSizingData&); Shouldn't we use const for the ...
4 years, 8 months ago (2016-04-01 13:40:31 UTC) #5
jfernandez
https://codereview.chromium.org/1854623002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1854623002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp#newcode683 third_party/WebKit/Source/core/layout/LayoutGrid.cpp:683: LayoutUnit LayoutGrid::logicalHeightForChild(LayoutBox& child, GridSizingData& sizingData, bool overrideWidthHasChanged) We shouldn't ...
4 years, 8 months ago (2016-04-04 15:23:24 UTC) #6
svillar
Thanks for the review. https://codereview.chromium.org/1854623002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1854623002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp#newcode683 third_party/WebKit/Source/core/layout/LayoutGrid.cpp:683: LayoutUnit LayoutGrid::logicalHeightForChild(LayoutBox& child, GridSizingData& sizingData, ...
4 years, 8 months ago (2016-04-05 08:34:30 UTC) #7
svillar
https://codereview.chromium.org/1854623002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1854623002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp#newcode1588 third_party/WebKit/Source/core/layout/LayoutGrid.cpp:1588: return LayoutUnit(infinity); On 2016/04/01 11:00:46, jfernandez wrote: > Could ...
4 years, 8 months ago (2016-04-05 08:42:34 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1854623002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1854623002/20001
4 years, 8 months ago (2016-04-05 09:00:53 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/205576)
4 years, 8 months ago (2016-04-05 10:49:37 UTC) #13
Manuel Rego
I guess you should update the description before landing. At least this part seems inaccurate ...
4 years, 8 months ago (2016-04-05 12:41:23 UTC) #14
svillar
Although the bots are happy, we should be using marginIntrinsicLogicalWidthForChild() when computing intrinsic sizes. I ...
4 years, 8 months ago (2016-04-06 11:08:28 UTC) #16
jfernandez
As agreed, we will need a new approach for this, so not lgtm.
4 years, 8 months ago (2016-04-06 11:10:27 UTC) #17
jfernandez
The new approach is definitively better, much clearer and I think is the way to ...
4 years, 8 months ago (2016-04-06 12:22:23 UTC) #18
svillar
Thanks for the review. https://codereview.chromium.org/1854623002/diff/100001/third_party/WebKit/Source/core/layout/LayoutGrid.cpp File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1854623002/diff/100001/third_party/WebKit/Source/core/layout/LayoutGrid.cpp#newcode693 third_party/WebKit/Source/core/layout/LayoutGrid.cpp:693: if (shouldClearContainingBlockLogicalHeight) On 2016/04/06 12:22:23, ...
4 years, 8 months ago (2016-04-06 14:55:10 UTC) #19
jfernandez
LGTM, with the suggestions about the SubtreeLayoutSCope to be considered before landing. https://codereview.chromium.org/1854623002/diff/100001/third_party/WebKit/Source/core/layout/LayoutGrid.cpp File third_party/WebKit/Source/core/layout/LayoutGrid.cpp ...
4 years, 8 months ago (2016-04-07 07:49:39 UTC) #20
svillar
Ensure that layout() is called in min|maxContentForChild
4 years, 8 months ago (2016-04-07 08:18:53 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1854623002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1854623002/120001
4 years, 8 months ago (2016-04-07 08:21:10 UTC) #24
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 8 months ago (2016-04-07 09:24:58 UTC) #26
commit-bot: I haz the power
4 years, 8 months ago (2016-04-07 09:26:47 UTC) #28
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/6838c4a3bbe2ab48aeb84f54d1ca388425f83f82
Cr-Commit-Position: refs/heads/master@{#385697}

Powered by Google App Engine
This is Rietveld 408576698