Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
index 6fe47f228470057c49d82480d02fdb3d9e35ff00..a74e71a1f3c502bd2b36c779cdbc3948500e91ff 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
@@ -3301,21 +3301,29 @@ bool CSSPropertyParser::consumeGridShorthand(bool important) { |
static CSSValue* consumeSimplifiedContentPosition(CSSParserTokenRange& range) { |
CSSValueID id = range.peek().id(); |
- if (identMatches<CSSValueNormal, CSSValueBaseline, CSSValueLastBaseline>( |
Bugs Nash
2017/03/29 02:01:01
should CSSValueLastBaseline be removed? it's not c
jfernandez
2017/03/29 10:43:10
Actually not. It's debatable whether we need a dif
|
- id)) { |
+ if (identMatches<CSSValueNormal>(id)) { |
return CSSContentDistributionValue::create( |
CSSValueInvalid, range.consumeIncludingWhitespace().id(), |
CSSValueInvalid); |
} |
- if (identMatches<CSSValueSpaceBetween, CSSValueSpaceAround, |
- CSSValueSpaceEvenly, CSSValueStretch>(id)) { |
+ |
+ if (CSSPropertyAlignmentUtils::isBaselineKeyword(id)) { |
+ CSSValue* baseline = |
+ CSSPropertyAlignmentUtils::consumeBaselineKeyword(range); |
Bugs Nash
2017/03/29 02:01:01
consumeBaselineKeyword doesn't consume whitespace,
jfernandez
2017/03/29 10:43:10
I'm not sure I understand this comment. consumeBas
Bugs Nash
2017/03/29 21:52:11
cool np
|
+ if (!baseline) |
+ return nullptr; |
+ return CSSContentDistributionValue::create( |
+ CSSValueInvalid, |
+ CSSPropertyAlignmentUtils::getBaselineKeyword(*baseline), |
+ CSSValueInvalid); |
+ } |
+ |
+ if (CSSPropertyAlignmentUtils::isContentDistributionKeyword(id)) { |
return CSSContentDistributionValue::create( |
range.consumeIncludingWhitespace().id(), CSSValueInvalid, |
CSSValueInvalid); |
} |
- if (identMatches<CSSValueStart, CSSValueEnd, CSSValueCenter, |
- CSSValueFlexStart, CSSValueFlexEnd, CSSValueLeft, |
- CSSValueRight>(id)) { |
+ if (CSSPropertyAlignmentUtils::isContentPositionKeyword(id)) { |
Bugs Nash
2017/03/29 02:01:01
this should be combined with the if block above th
jfernandez
2017/03/29 10:43:10
Done.
|
return CSSContentDistributionValue::create( |
CSSValueInvalid, range.consumeIncludingWhitespace().id(), |
CSSValueInvalid); |