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

Issue 396263003: flex shorthand incorrectly accepting 1 0% 1 (i.e. flex-basis in the middle) (Closed)

Created:
6 years, 5 months ago by harpreet.sk
Modified:
6 years, 5 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, dglazkov+blink, ed+blinkwatch_opera.com, rwlbuis, rune+blink
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

flex shorthand incorrectly accepting 1 0% 1 (i.e. flex-basis in the middle) On flex items, specifying a flex shorthand with a flex basis in the middle of two flex factors, e.g. flex: 1 0% 1 is getting accepted in blink. According to http://www.w3.org/TR/css3-flexbox/#flex-property, the grammar of the flex shorthand is as follows: Value: none | [ <‘flex-grow’> <‘flex-shrink’>? || <‘flex-basis’> ] It means that flex-grow and flex-shrink must appear together. Therefore flex basis in the middle of two flex factors is invalid. Currently blink consider flex: 1 0% 1 as valid, mapping the values as <flex-grow> <flex-basis> <flex-shrink>, i.e. flex: 1 0% 1 is equivalent to flex: 1 1 0%. This patch fixes this bug by adding an additional condition checking if flex-basis is in the middle or not in flex argument list while setting values for flex basis. BUG=380984 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178479

Patch Set 1 #

Patch Set 2 : WIP Patch 2 #

Total comments: 4

Patch Set 3 : Addressing comments of patch set 2 #

Patch Set 4 : Removing extra style tag from layout test #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -10 lines) Patch
M LayoutTests/css3/flexbox/flex-property-parsing.html View 1 2 chunks +6 lines, -6 lines 0 comments Download
M LayoutTests/css3/flexbox/flex-property-parsing-expected.txt View 1 2 chunks +4 lines, -4 lines 0 comments Download
A LayoutTests/css3/flexbox/flex-shorthand-flex-basis-middle.html View 1 2 3 1 chunk +25 lines, -0 lines 0 comments Download
A + LayoutTests/css3/flexbox/flex-shorthand-flex-basis-middle-expected.txt View 1 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/core/css/parser/CSSPropertyParser.cpp View 1 2 3 4 2 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
harpreet.sk
ptal....
6 years, 5 months ago (2014-07-16 16:42:14 UTC) #1
tony
https://codereview.chromium.org/396263003/diff/20001/LayoutTests/css3/flexbox/flex-shorthand-flex-basis-middle.html File LayoutTests/css3/flexbox/flex-shorthand-flex-basis-middle.html (right): https://codereview.chromium.org/396263003/diff/20001/LayoutTests/css3/flexbox/flex-shorthand-flex-basis-middle.html#newcode6 LayoutTests/css3/flexbox/flex-shorthand-flex-basis-middle.html:6: background: green; Nit: Style in our test html files ...
6 years, 5 months ago (2014-07-16 17:12:38 UTC) #2
harpreet.sk
uploaded new patch... ptal... https://codereview.chromium.org/396263003/diff/20001/LayoutTests/css3/flexbox/flex-shorthand-flex-basis-middle.html File LayoutTests/css3/flexbox/flex-shorthand-flex-basis-middle.html (right): https://codereview.chromium.org/396263003/diff/20001/LayoutTests/css3/flexbox/flex-shorthand-flex-basis-middle.html#newcode6 LayoutTests/css3/flexbox/flex-shorthand-flex-basis-middle.html:6: background: green; On 2014/07/16 17:12:38, ...
6 years, 5 months ago (2014-07-17 08:03:25 UTC) #3
tony
LGTM
6 years, 5 months ago (2014-07-17 14:47:43 UTC) #4
harpreet.sk
@leviw: Require owners lgtm
6 years, 5 months ago (2014-07-17 15:04:46 UTC) #5
harpreet.sk
+tkent, eseidel - Requires owners LGTM
6 years, 5 months ago (2014-07-18 03:47:25 UTC) #6
leviw_travelin_and_unemployed
Okay. LGTM.
6 years, 5 months ago (2014-07-18 18:16:15 UTC) #7
harpreet.sk
The CQ bit was checked by harpreet.sk@samsung.com
6 years, 5 months ago (2014-07-18 18:30:04 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/harpreet.sk@samsung.com/396263003/80001
6 years, 5 months ago (2014-07-18 18:30:40 UTC) #9
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_gpu_retina_triggered_tests on tryserver.chromium.gpu ...
6 years, 5 months ago (2014-07-18 19:28:24 UTC) #10
commit-bot: I haz the power
6 years, 5 months ago (2014-07-18 19:53:37 UTC) #11
Message was sent while issue was closed.
Change committed as 178479

Powered by Google App Engine
This is Rietveld 408576698