Chromium Code Reviews| Index: Source/core/css/parser/CSSPropertyParser.cpp |
| diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp |
| index 4158e67cdb5ee513c33fafc6c0a2d5a04107d372..fd950743a6f3596f7f2396bc48f457585ddef978 100644 |
| --- a/Source/core/css/parser/CSSPropertyParser.cpp |
| +++ b/Source/core/css/parser/CSSPropertyParser.cpp |
| @@ -3639,6 +3639,16 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseGridBreadth(CS |
| return createPrimitiveNumericValue(currentValue); |
| } |
| +static bool containsOnlyDots(const String& string) |
| +{ |
| + ASSERT(!string.isEmpty()); |
| + for (unsigned i = 0; i < string.length(); ++i) { |
| + if (string.characterAt(i) != '.') |
| + return false; |
| + } |
| + return true; |
|
svillar
2015/06/05 10:38:09
I think it's better to do like LayoutText::contain
Manuel Rego
2015/06/05 11:20:10
Thanks for the pointer, I've followed a similar ap
|
| +} |
| + |
| bool CSSPropertyParser::parseGridTemplateAreasRow(NamedGridAreaMap& gridAreaMap, const size_t rowCount, size_t& columnCount) |
| { |
| CSSParserValue* currentValue = m_valueList->current(); |
| @@ -3664,7 +3674,7 @@ bool CSSPropertyParser::parseGridTemplateAreasRow(NamedGridAreaMap& gridAreaMap, |
| const String& gridAreaName = columnNames[currentCol]; |
| // Unamed areas are always valid (we consider them to be 1x1). |
| - if (gridAreaName == ".") |
| + if (containsOnlyDots(gridAreaName)) |
| continue; |
| // We handle several grid areas with the same name at once to simplify the validation code. |