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

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: Patch rebased. New positioned test cases and related bug fixes. 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 cdfe75ff20c5f27efd7768bba1cde486d66d1067..5d7195a883e6576d73cad0d5e35931019f8ab062 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -3698,7 +3698,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, UnitlessQuirk::Allow);
cbiesinger 2016/06/22 18:46:13 Why do you want to allow unitless numbers, particu
jfernandez 2016/06/27 23:56:47 I did allow unitless numbers that for consistency
Timothy Loh 2016/06/28 00:04:45 <track-breadth> doesn't support the unitless quirk
jfernandez 2016/06/28 00:15:19 Done. I'll add a TODO to change the track-breadth
case CSSPropertyShapeMargin:
return consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeNonNegative);
case CSSPropertyShapeImageThreshold:
@@ -5138,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, UnitlessQuirk::Allow);
+ CSSValue* columnGap = consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeNonNegative, UnitlessQuirk::Allow);
if (!rowGap || !m_range.atEnd())
return false;
if (!columnGap)

Powered by Google App Engine
This is Rietveld 408576698