- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Thu, 28 May 2020 00:32:50 +0000
- To: public-css-archive@w3.org
<details><summary>Supporting this in Chromium would be simple (just removing some checks).</summary>
```diff
diff --git a/third_party/blink/renderer/core/css/css_grid_template_areas_value.cc b/third_party/blink/renderer/core/css/css_grid_template_areas_value.cc
index 57a7d1e672d..a9b7b2f7393 100644
--- a/third_party/blink/renderer/core/css/css_grid_template_areas_value.cc
+++ b/third_party/blink/renderer/core/css/css_grid_template_areas_value.cc
@@ -44,7 +44,6 @@ CSSGridTemplateAreasValue::CSSGridTemplateAreasValue(
row_count_(row_count),
column_count_(column_count) {
DCHECK(row_count_);
- DCHECK(column_count_);
}
static String StringForPosition(const NamedGridAreaMap& grid_area_map,
diff --git a/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc b/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
index 7e66f00f7f8..501e222ae75 100644
--- a/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
+++ b/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
@@ -1638,7 +1638,6 @@ CSSIdentifierValue* ConsumeFontVariantCSS21(CSSParserTokenRange& range) {
}
Vector<String> ParseGridTemplateAreasColumnNames(const String& grid_row_names) {
- DCHECK(!grid_row_names.IsEmpty());
Vector<String> column_names;
// Using StringImpl to avoid checks and indirection in every call to
// String::operator[].
@@ -2053,15 +2052,10 @@ bool ParseGridTemplateAreasRow(const String& grid_row_names,
NamedGridAreaMap& grid_area_map,
const size_t row_count,
size_t& column_count) {
- if (grid_row_names.ContainsOnlyWhitespaceOrEmpty())
- return false;
-
Vector<String> column_names =
ParseGridTemplateAreasColumnNames(grid_row_names);
if (row_count == 0) {
column_count = column_names.size();
- if (column_count == 0)
- return false;
} else if (column_count != column_names.size()) {
// The declaration is invalid if all the rows don't have the number of
// columns.
diff --git a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
index 39164982348..80a5a649fca 100644
--- a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
+++ b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
@@ -3082,7 +3082,6 @@ const CSSValue* GridTemplateAreas::ParseSingleValue(
if (row_count == 0)
return nullptr;
- DCHECK(column_count);
return MakeGarbageCollected<cssvalue::CSSGridTemplateAreasValue>(
grid_area_map, row_count, column_count);
}
```
</details>
I'd be fine with that, though not a big fan of its asymmetry.
--
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5110#issuecomment-635018376 using your GitHub account
Received on Thursday, 28 May 2020 00:32:51 UTC