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

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

Issue 1160273004: [CSS Grid Layout] Support dots sequences in grid-template-areas (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased patch Created 5 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
« no previous file with comments | « LayoutTests/fast/css-grid-layout/grid-template-areas-get-set-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index 119ea6bf959ffa64c81bf48d7c10d1bf913d9a73..bf84ef6f726aee064349217d260629b100ec4be2 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -3613,6 +3613,17 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseGridBreadth(CS
return createPrimitiveNumericValue(currentValue);
}
+static bool containsOnlyDots(const String& string)
+{
+ ASSERT(!string.isEmpty());
+ StringImpl& text = *string.impl();
+ for (unsigned i = 0; i < text.length(); ++i) {
+ if (text[i] != '.')
+ return false;
+ }
+ return true;
+}
+
bool CSSPropertyParser::parseGridTemplateAreasRow(NamedGridAreaMap& gridAreaMap, const size_t rowCount, size_t& columnCount)
{
CSSParserValue* currentValue = m_valueList->current();
@@ -3638,7 +3649,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.
« no previous file with comments | « LayoutTests/fast/css-grid-layout/grid-template-areas-get-set-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698