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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp

Issue 2762623002: [css-align] Adapt the place-content shorthand to the new baseline syntax (Closed)
Patch Set: Keep utility functions private and make consumeSimplifiedXXX public Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..569fa147dc32d8fdf0c7ba771673be6df0f87a12 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -3299,41 +3299,20 @@ bool CSSPropertyParser::consumeGridShorthand(bool important) {
return true;
}
-static CSSValue* consumeSimplifiedContentPosition(CSSParserTokenRange& range) {
- CSSValueID id = range.peek().id();
- if (identMatches<CSSValueNormal, CSSValueBaseline, CSSValueLastBaseline>(
- id)) {
- return CSSContentDistributionValue::create(
- CSSValueInvalid, range.consumeIncludingWhitespace().id(),
- CSSValueInvalid);
- }
- if (identMatches<CSSValueSpaceBetween, CSSValueSpaceAround,
- CSSValueSpaceEvenly, CSSValueStretch>(id)) {
- return CSSContentDistributionValue::create(
- range.consumeIncludingWhitespace().id(), CSSValueInvalid,
- CSSValueInvalid);
- }
- if (identMatches<CSSValueStart, CSSValueEnd, CSSValueCenter,
- CSSValueFlexStart, CSSValueFlexEnd, CSSValueLeft,
- CSSValueRight>(id)) {
- return CSSContentDistributionValue::create(
- CSSValueInvalid, range.consumeIncludingWhitespace().id(),
- CSSValueInvalid);
- }
- return nullptr;
-}
-
bool CSSPropertyParser::consumePlaceContentShorthand(bool important) {
DCHECK(RuntimeEnabledFeatures::cssGridLayoutEnabled());
DCHECK_EQ(shorthandForProperty(CSSPropertyPlaceContent).length(),
static_cast<unsigned>(2));
- CSSValue* alignContentValue = consumeSimplifiedContentPosition(m_range);
+ CSSValue* alignContentValue =
+ CSSPropertyAlignmentUtils::consumeSimplifiedContentPosition(m_range);
if (!alignContentValue)
return false;
CSSValue* justifyContentValue =
- m_range.atEnd() ? alignContentValue
- : consumeSimplifiedContentPosition(m_range);
+ m_range.atEnd()
+ ? alignContentValue
+ : CSSPropertyAlignmentUtils::consumeSimplifiedContentPosition(
+ m_range);
if (!justifyContentValue)
return false;
if (!m_range.atEnd())

Powered by Google App Engine
This is Rietveld 408576698