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

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

Issue 1777483008: Move the grid-gap shorthand into CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 76d2b2e12478df10c3c2f422c9d1573a7ee38b43..8e09fb9eb4cbcd981eadb3519362be1faa25a83e 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -4874,6 +4874,18 @@ bool CSSPropertyParser::parseShorthand(CSSPropertyID unresolvedProperty, bool im
return consumeBackgroundShorthand(backgroundShorthand(), important);
case CSSPropertyWebkitMask:
return consumeBackgroundShorthand(webkitMaskShorthand(), important);
+ case CSSPropertyGridGap: {
+ ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled() && shorthandForProperty(CSSPropertyGridGap).length() == 2);
+ RefPtrWillBeRawPtr<CSSValue> rowGap = consumeLength(m_range, m_context.mode(), ValueRangeNonNegative);
+ RefPtrWillBeRawPtr<CSSValue> columnGap = consumeLength(m_range, m_context.mode(), ValueRangeNonNegative);
+ if (!rowGap || !m_range.atEnd())
+ return false;
+ if (!columnGap)
+ columnGap = rowGap;
+ addProperty(CSSPropertyGridRowGap, rowGap.release(), important);
+ addProperty(CSSPropertyGridColumnGap, columnGap.release(), important);
+ return true;
+ }
default:
m_currentShorthand = oldShorthand;
CSSParserValueList valueList(m_range);

Powered by Google App Engine
This is Rietveld 408576698