Chromium Code Reviews| Index: Source/core/css/parser/CSSPropertyParser.cpp |
| diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp |
| index 4c3d25149345a119e48b66d79f01144bdcbaeba9..980291b196034b1f630b38b07da4947adf693141 100644 |
| --- a/Source/core/css/parser/CSSPropertyParser.cpp |
| +++ b/Source/core/css/parser/CSSPropertyParser.cpp |
| @@ -1199,6 +1199,13 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId, bool important) |
| return false; |
| return parseItemPositionOverflowPosition(propId, important); |
| + |
| + case CSSPropertyJustifyItems: |
| + if (!RuntimeEnabledFeatures::cssGridLayoutEnabled()) |
| + return false; |
| + |
| + return parseLegacyPosition(propId, important) || parseItemPositionOverflowPosition(propId, important); |
| + |
| case CSSPropertyGridAutoColumns: |
| case CSSPropertyGridAutoRows: |
| if (!RuntimeEnabledFeatures::cssGridLayoutEnabled()) |
| @@ -4133,6 +4140,21 @@ static bool isItemPositionKeyword(CSSValueID id) |
| || id == CSSValueFlexEnd || id == CSSValueLeft || id == CSSValueRight; |
| } |
| +bool CSSPropertyParser::parseLegacyPosition(CSSPropertyID propId, bool important) |
| +{ |
| + // [ legacy && [ left | right | center ] |
| + |
| + CSSParserValue* value = m_valueList->current(); |
| + if (value->id != CSSValueLegacy || !m_valueList->next()) |
| + return false; |
| + |
| + if (value->id == CSSValueCenter || value->id == CSSValueLeft || value->id == CSSValueRight) { |
|
cbiesinger
2014/06/17 22:53:33
Don't you need an m_valueList->current() call / ke
jfernandez
2014/06/19 15:19:14
Done.
|
| + addProperty(propId, cssValuePool().createIdentifierValue(value->id), important); |
| + } |
|
cbiesinger
2014/06/17 22:53:33
else return false?
jfernandez
2014/06/19 15:19:14
Done.
|
| + |
| + return true; |
|
cbiesinger
2014/06/17 22:53:33
Also, I'm not 100% sure but I think you need an "i
jfernandez
2014/06/19 15:19:14
Done.
|
| +} |
| + |
| bool CSSPropertyParser::parseItemPositionOverflowPosition(CSSPropertyID propId, bool important) |
| { |
| // auto | baseline | stretch | [<item-position> && <overflow-position>? ] |