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

Issue 1583433002: [css-align] New CSS Value 'normal' for Content Alignment (Closed)

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

Description

[css-align] New CSS Value 'normal' for Content Alignment The Box Alignment specification defines a new value 'normal' to be used as default for the different layout models, which will define the specific behavior for each case. This patch adds a new CSS value in the parsing logic and adapts the Content Alignment properties to the new value. The 'auto' value is no longer valid and the Computed Value will be always the specified value. Hence, I removed the StyleResolver logic because is not required now; the specific behavior of the 'normal' value will be resolved at layout time. Computed value of both align-content and justify-content is the specified value, we don't have to resolve any 'auto' value now. Additionally, this patch updates the layout logic as well, for both Flexbox and Grid layout models. BUG=565883 Committed: https://crrev.com/8e62cf6142a2e1d917eb64a7ead637bd020b39cc Cr-Commit-Position: refs/heads/master@{#375556}

Patch Set 1 #

Patch Set 2 : Improvements on the resolved values logic. #

Patch Set 3 : Using a static variable as const value for normalBehavior. #

Patch Set 4 : Patch rebased. #

Patch Set 5 : Normal behaves always as 'stretch'. Rebased tests accordingly. #

Patch Set 6 : Fixed layout tests failing. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+392 lines, -355 lines) Patch
M third_party/WebKit/LayoutTests/css3/flexbox/css-properties.html View 4 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/css3/flexbox/css-properties-expected.txt View 4 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/alignment/ensure-flexbox-compatibility-with-initial-values-expected.txt View 1 chunk +8 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/alignment/parse-align-content.html View 5 chunks +17 lines, -16 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/alignment/parse-align-content-expected.txt View 3 chunks +39 lines, -37 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/alignment/parse-justify-content.html View 5 chunks +17 lines, -16 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/alignment/parse-justify-content-expected.txt View 3 chunks +39 lines, -37 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/alignment/resources/alignment-parsing-utils.js View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/auto-content-resolution-columns.html View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/floating-not-effect-on-grid-items.html View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-auto-columns-rows-update.html View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-auto-flow-resolution.html View 1 2 3 4 9 chunks +12 lines, -11 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set.html View 1 2 3 4 3 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-multiple.html View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution.html View 1 2 3 4 7 chunks +15 lines, -11 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-dynamic-updates-relayout.html View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-element-min-max-width.html View 1 2 3 4 3 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-element-repeat-get-set.html View 1 2 3 4 2 chunks +8 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-initialize-span-one-items.html View 1 2 3 4 3 chunks +7 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-addition-auto-placement-update.html View 1 2 3 4 3 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-addition-track-breadth-update.html View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-multiple-minmax-content-resolution.html View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-named-grid-area-resolution.html View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-negative-indexes.html View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-removal-auto-placement-update.html View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-removal-track-breadth-update.html View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-update-sizes-after-distributing-all.html View 1 2 3 4 3 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/implicit-columns-auto-resolution.html View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/implicit-position-dynamic-change.html View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/implicit-tracks-before-explicit.html View 1 2 3 4 5 chunks +25 lines, -24 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/mark-as-infinitely-growable.html View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/maximize-tracks-definite-indefinite-width.html View 1 2 3 4 8 chunks +12 lines, -11 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/minmax-spanning-resolution-columns.html View 1 2 3 4 4 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/named-grid-line-get-set.html View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html View 1 2 3 4 2 chunks +9 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html View 1 2 3 4 4 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/percent-track-breadths-regarding-container-size.html View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/resources/grid-template-shorthand-parsing-utils.js View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-listing-expected.txt View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/svg/css/getComputedStyle-listing-expected.txt View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h View 1 2 3 3 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 2 3 3 chunks +3 lines, -33 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp View 1 2 3 4 1 chunk +0 lines, -26 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp View 1 2 3 4 8 chunks +27 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.cpp View 1 2 3 4 7 chunks +19 lines, -25 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.cpp View 1 2 3 1 chunk +30 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyleConstants.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 30 (16 generated)
jfernandez
4 years, 11 months ago (2016-01-12 11:37:39 UTC) #3
cbiesinger
lgtm
4 years, 11 months ago (2016-01-14 06:38:12 UTC) #6
Timothy Loh
ok lgtm
4 years, 11 months ago (2016-01-15 04:35:09 UTC) #8
Timothy Loh
Any update here? (BTW, you'll have to rebase over https://codereview.chromium.org/1523803002/ once that lands)
4 years, 10 months ago (2016-02-01 00:27:46 UTC) #10
jfernandez
On 2016/02/01 00:27:46, Timothy Loh wrote: > Any update here? > I'm waiting for https://codereview.chromium.org/1625993004/ ...
4 years, 10 months ago (2016-02-01 08:59:13 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1583433002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1583433002/60001
4 years, 10 months ago (2016-02-02 11:38:21 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/174863)
4 years, 10 months ago (2016-02-02 12:42:44 UTC) #16
jfernandez
Now that 'normal' behaves like 'stretch', instead of 'start', for both content alignment properties we ...
4 years, 10 months ago (2016-02-05 09:40:55 UTC) #17
jfernandez
@svillar could you review the changes in the tests ? I had to explicitly set ...
4 years, 10 months ago (2016-02-15 22:59:39 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1583433002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1583433002/100001
4 years, 10 months ago (2016-02-16 11:28:52 UTC) #21
commit-bot: I haz the power
Failed to request the patch to try. Please note that binary files are still unsupported ...
4 years, 10 months ago (2016-02-16 12:35:52 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1583433002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1583433002/100001
4 years, 10 months ago (2016-02-16 13:01:32 UTC) #26
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 10 months ago (2016-02-16 13:11:56 UTC) #28
commit-bot: I haz the power
4 years, 10 months ago (2016-02-16 22:52:22 UTC) #30
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/8e62cf6142a2e1d917eb64a7ead637bd020b39cc
Cr-Commit-Position: refs/heads/master@{#375556}

Powered by Google App Engine
This is Rietveld 408576698