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

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

Issue 2057113002: [css-grid] Allow percentage values for column and row gutters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Grid gaps don't support unitless quirk. Created 4 years, 6 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 248e6348211de4b237d18a57cf198ffb8ae325a8..dd6510f694edcb1dfcc2b35e7eaca28fd8fef601 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -3362,6 +3362,7 @@ static CSSPrimitiveValue* consumeGridBreadth(CSSParserTokenRange& range, CSSPars
return nullptr;
return CSSPrimitiveValue::create(range.consumeIncludingWhitespace().numericValue(), CSSPrimitiveValue::UnitType::Fraction);
}
+ // TODO (lajava): Does <track-breadth> support unitless quirk ?
return consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative, UnitlessQuirk::Allow);
}
@@ -3698,7 +3699,7 @@ CSSValue* CSSPropertyParser::parseSingleValue(CSSPropertyID unresolvedProperty,
return consumeAnimationPropertyList(property, m_range, m_context, unresolvedProperty == CSSPropertyAliasWebkitAnimationName);
case CSSPropertyGridColumnGap:
case CSSPropertyGridRowGap:
- return consumeLength(m_range, m_context.mode(), ValueRangeNonNegative);
+ return consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeNonNegative);
case CSSPropertyShapeMargin:
return consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeNonNegative);
case CSSPropertyShapeImageThreshold:
@@ -5137,8 +5138,8 @@ bool CSSPropertyParser::parseShorthand(CSSPropertyID unresolvedProperty, bool im
return consumeBackgroundShorthand(webkitMaskShorthand(), important);
case CSSPropertyGridGap: {
ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled() && shorthandForProperty(CSSPropertyGridGap).length() == 2);
- CSSValue* rowGap = consumeLength(m_range, m_context.mode(), ValueRangeNonNegative);
- CSSValue* columnGap = consumeLength(m_range, m_context.mode(), ValueRangeNonNegative);
+ CSSValue* rowGap = consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeNonNegative);
+ CSSValue* columnGap = consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeNonNegative);
if (!rowGap || !m_range.atEnd())
return false;
if (!columnGap)

Powered by Google App Engine
This is Rietveld 408576698