Descriptionflex 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 : #
Messages
Total messages: 11 (0 generated)
|