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

Issue 1309513008: [css-grid] Implement grid gutters (Closed)

Created:
5 years, 3 months ago by svillar
Modified:
5 years, 2 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-rendering, blink-reviews-style_chromium.org, dglazkov+blink, eae+blinkwatch, jchaffraix+rendering, jfernandez, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, Manuel Rego, rwlbuis, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[css-grid] Implement grid gutters Authors can now specify the gutters between grid lines, i.e., the space between two consecutive grid lines. This can be done using the new 'grid-column-gap 'and 'grid-row-gap' properties (or the 'grid-gap' shorthand). From the track sizing algorithm POV, gutters are treated as fixed size columns. The primary consequence is that grids are enlarged (depending on the number of tracks). Gutters also affect the sizing of content-sized tracks and fr tracks as long as the grid have spanning items. Those tracks will become smaller as gutters will consume part of the item's size, so the tracks won't need to grow as much as they used to. Added several new test cases to verify that gutters are properly considered when sizing and also to check that they do not modify the current behavior. As many existing tests were reused I took the chance to refactor some testing code related to alignment so that it could be reused by many different tests. Committed: https://crrev.com/ad570a7dcd24b813e0dc2400c0bf080caf30a0ce Cr-Commit-Position: refs/heads/master@{#352839}

Patch Set 1 #

Patch Set 2 : Removed two tests which were not testing gutters code #

Total comments: 28

Patch Set 3 : Fixed test cases #

Total comments: 5

Patch Set 4 : Patch for landing after rebase #

Patch Set 5 : Patch for landing v2 #

Patch Set 6 : Patch for landing v3 #

Total comments: 17

Patch Set 7 : Rebased patch with parsing fixes #

Patch Set 8 : Changes after rune's review #

Total comments: 1

Patch Set 9 : Rebased patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1060 lines, -295 lines) Patch
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-align.html View 1 2 3 2 chunks +1 line, -48 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-align-content.html View 1 2 3 2 chunks +1 line, -36 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-align-justify-margin-border-padding.html View 1 2 3 2 chunks +1 line, -29 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-lr.html View 1 2 3 2 chunks +1 line, -30 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-rl.html View 1 2 3 2 chunks +1 line, -30 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html View 1 2 3 1 chunk +297 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment-expected.txt View 1 2 3 1 chunk +58 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content.html View 1 2 3 1 chunk +91 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content-expected.txt View 1 2 3 1 chunk +20 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-gutters-and-tracks.html View 1 2 3 1 chunk +139 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-gutters-and-tracks-expected.txt View 1 2 3 1 chunk +58 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-gutters-get-set.html View 1 2 3 4 5 6 7 1 chunk +93 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-gutters-get-set-expected.txt View 1 2 3 4 5 6 7 1 chunk +44 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-justify-content.html View 1 2 3 2 chunks +1 line, -35 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-justify-content-distribution-vertical-lr.html View 1 2 3 2 chunks +1 line, -39 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-justify-content-distribution-vertical-rl.html View 1 2 3 2 chunks +1 line, -39 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/resources/grid.css View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/resources/grid-alignment.css View 1 2 3 1 chunk +74 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-grid-layout.html View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-grid-layout-expected.txt View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-listing-expected.txt View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/svg/css/getComputedStyle-listing-expected.txt View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/css-properties-as-js-properties-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSProperties.in View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/StylePropertySerializer.cpp View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp View 1 2 3 4 5 6 7 8 2 chunks +43 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.cpp View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.cpp View 1 2 3 4 5 6 7 8 11 chunks +42 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleGridData.h View 1 2 3 4 5 6 7 2 chunks +10 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/StyleGridData.cpp View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (13 generated)
svillar
Removed two tests which were not testing gutters code
5 years, 3 months ago (2015-09-08 10:11:23 UTC) #1
svillar
Adding reviewers
5 years, 3 months ago (2015-09-08 10:30:42 UTC) #3
jfernandez
https://codereview.chromium.org/1309513008/diff/20001/LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html File LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html (right): https://codereview.chromium.org/1309513008/diff/20001/LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html#newcode77 LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html:77: <div class="grid grid100And200 alignItemsCenter gridRowColumnGaps" data-expected-width="221" data-expected-height="417"> Nit: can ...
5 years, 3 months ago (2015-09-09 21:07:45 UTC) #4
svillar
Thanks for the review. I'll fix the spotted issues https://codereview.chromium.org/1309513008/diff/20001/LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html File LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html (right): https://codereview.chromium.org/1309513008/diff/20001/LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html#newcode77 LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html:77: ...
5 years, 3 months ago (2015-09-10 11:55:45 UTC) #5
svillar
https://codereview.chromium.org/1309513008/diff/20001/LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html File LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html (right): https://codereview.chromium.org/1309513008/diff/20001/LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html#newcode256 LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html:256: <div class="grid gridWithPaddingBorder directionLTR itemsSelfStart gridRowColumnGaps" data-expected-width="396" data-expected-height="467"> On ...
5 years, 3 months ago (2015-09-10 13:49:27 UTC) #6
jfernandez
lgtm https://codereview.chromium.org/1309513008/diff/20001/LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html File LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html (right): https://codereview.chromium.org/1309513008/diff/20001/LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html#newcode256 LayoutTests/fast/css-grid-layout/grid-gutters-and-alignment.html:256: <div class="grid gridWithPaddingBorder directionLTR itemsSelfStart gridRowColumnGaps" data-expected-width="396" data-expected-height="467"> ...
5 years, 3 months ago (2015-09-11 08:11:09 UTC) #7
svillar
@cbiesinger, @esprehn: anything to add?
5 years, 3 months ago (2015-09-16 09:47:10 UTC) #8
cbiesinger
lgtm https://codereview.chromium.org/1309513008/diff/40001/Source/core/layout/LayoutGrid.cpp File Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1309513008/diff/40001/Source/core/layout/LayoutGrid.cpp#newcode1797 Source/core/layout/LayoutGrid.cpp:1797: // // m_rowPositions include gutters so we need ...
5 years, 2 months ago (2015-09-30 15:22:42 UTC) #9
esprehn
https://codereview.chromium.org/1309513008/diff/40001/Source/core/layout/LayoutGrid.cpp File Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1309513008/diff/40001/Source/core/layout/LayoutGrid.cpp#newcode378 Source/core/layout/LayoutGrid.cpp:378: DEFINE_STATIC_LOCAL(LayoutUnit, zero, ()); LayoutUnit is basically just an int, ...
5 years, 2 months ago (2015-10-01 08:46:48 UTC) #10
svillar
https://codereview.chromium.org/1309513008/diff/40001/Source/core/layout/LayoutGrid.cpp File Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1309513008/diff/40001/Source/core/layout/LayoutGrid.cpp#newcode378 Source/core/layout/LayoutGrid.cpp:378: DEFINE_STATIC_LOCAL(LayoutUnit, zero, ()); On 2015/10/01 08:46:48, esprehn wrote: > ...
5 years, 2 months ago (2015-10-02 10:00:29 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1309513008/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1309513008/80001
5 years, 2 months ago (2015-10-02 10:12:35 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/106100)
5 years, 2 months ago (2015-10-02 10:22:03 UTC) #16
fs
https://codereview.chromium.org/1309513008/diff/100001/third_party/WebKit/Source/core/css/CSSProperties.in File third_party/WebKit/Source/core/css/CSSProperties.in (right): https://codereview.chromium.org/1309513008/diff/100001/third_party/WebKit/Source/core/css/CSSProperties.in#newcode191 third_party/WebKit/Source/core/css/CSSProperties.in:191: grid-column-gap runtime_flag=CSSGridLayout, converter=convertLengthSizing Why convertLengthSizing and not convertLength? (Ditto ...
5 years, 2 months ago (2015-10-05 10:53:28 UTC) #19
svillar
Thanks for the review https://codereview.chromium.org/1309513008/diff/100001/third_party/WebKit/Source/core/css/CSSProperties.in File third_party/WebKit/Source/core/css/CSSProperties.in (right): https://codereview.chromium.org/1309513008/diff/100001/third_party/WebKit/Source/core/css/CSSProperties.in#newcode191 third_party/WebKit/Source/core/css/CSSProperties.in:191: grid-column-gap runtime_flag=CSSGridLayout, converter=convertLengthSizing On 2015/10/05 ...
5 years, 2 months ago (2015-10-05 11:58:41 UTC) #20
fs
https://codereview.chromium.org/1309513008/diff/100001/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp (right): https://codereview.chromium.org/1309513008/diff/100001/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp#newcode3210 third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp:3210: bool CSSPropertyParser::parseGridGapShorthand(bool important) On 2015/10/05 at 11:58:40, svillar wrote: ...
5 years, 2 months ago (2015-10-05 12:01:55 UTC) #21
svillar
On 2015/10/05 12:01:55, fs wrote: > https://codereview.chromium.org/1309513008/diff/100001/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp > File third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp > (right): > > https://codereview.chromium.org/1309513008/diff/100001/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp#newcode3210 ...
5 years, 2 months ago (2015-10-05 12:16:49 UTC) #22
rune
https://codereview.chromium.org/1309513008/diff/100001/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp (right): https://codereview.chromium.org/1309513008/diff/100001/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp#newcode1178 third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp:1178: validPrimitive = validUnit(value, FLength | FNonNeg); The current spec ...
5 years, 2 months ago (2015-10-05 12:23:39 UTC) #23
svillar
Thanks for the review https://codereview.chromium.org/1309513008/diff/100001/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp (right): https://codereview.chromium.org/1309513008/diff/100001/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp#newcode1178 third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp:1178: validPrimitive = validUnit(value, FLength | ...
5 years, 2 months ago (2015-10-05 12:36:02 UTC) #24
rune
https://codereview.chromium.org/1309513008/diff/100001/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp (right): https://codereview.chromium.org/1309513008/diff/100001/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp#newcode1178 third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp:1178: validPrimitive = validUnit(value, FLength | FNonNeg); On 2015/10/05 12:36:01, ...
5 years, 2 months ago (2015-10-05 12:47:10 UTC) #25
fs
lgtm https://codereview.chromium.org/1309513008/diff/140001/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp (right): https://codereview.chromium.org/1309513008/diff/140001/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp#newcode3193 third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp:3193: RefPtrWillBeRawPtr<CSSPrimitiveValue> columnGap = nullptr; Nit: With this new ...
5 years, 2 months ago (2015-10-07 10:25:19 UTC) #26
rune
lgtm too
5 years, 2 months ago (2015-10-07 12:30:53 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1309513008/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1309513008/140001
5 years, 2 months ago (2015-10-07 12:46:17 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/63787) linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, ...
5 years, 2 months ago (2015-10-07 12:49:25 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1309513008/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1309513008/160001
5 years, 2 months ago (2015-10-07 13:28:48 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/50556)
5 years, 2 months ago (2015-10-07 13:39:04 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1309513008/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1309513008/160001
5 years, 2 months ago (2015-10-07 13:45:00 UTC) #39
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 2 months ago (2015-10-07 14:52:53 UTC) #40
commit-bot: I haz the power
5 years, 2 months ago (2015-10-07 14:53:38 UTC) #41
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/ad570a7dcd24b813e0dc2400c0bf080caf30a0ce
Cr-Commit-Position: refs/heads/master@{#352839}

Powered by Google App Engine
This is Rietveld 408576698