[CSS Grid Layout] Empty string case already covered by containesOnlyWhiteSpace.
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Sep 2014 14:27:52 +0000 (14:27 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Sep 2014 14:27:52 +0000 (14:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=137146

Reviewed by Sergio Villar Senin.

When checking out for white-space only strings in the grid-template-areas
property values, it's not neccessary to check out for empty strings as
such case is already covered.

No new tests, already covered by fast/css-grid-layout/grid-template-areas-empty-string-crash.html.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTemplateAreasRow):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174007 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp

index 0edcee2..210fb96 100644 (file)
@@ -1,3 +1,19 @@
+2014-09-26  Javier Fernandez  <jfernandez@igalia.com>
+
+        [CSS Grid Layout] Empty string case already covered by containesOnlyWhiteSpace.
+        https://bugs.webkit.org/show_bug.cgi?id=137146
+
+        Reviewed by Sergio Villar Senin.
+
+        When checking out for white-space only strings in the grid-template-areas
+        property values, it's not neccessary to check out for empty strings as
+        such case is already covered.
+
+        No new tests, already covered by fast/css-grid-layout/grid-template-areas-empty-string-crash.html.
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseGridTemplateAreasRow):
+
 2014-09-23  Sergio Villar Senin  <svillar@igalia.com>
 
         [CSS Grid Layout] Fix the handling of infinity in track growth limits
index d0dd99d..3d92213 100644 (file)
@@ -5569,7 +5569,7 @@ bool CSSParser::parseGridTemplateAreasRow(NamedGridAreaMap& gridAreaMap, const u
         return false;
 
     String gridRowNames = currentValue->string;
-    if (gridRowNames.isEmpty() || gridRowNames.containsOnlyWhitespace())
+    if (gridRowNames.containsOnlyWhitespace())
         return false;
 
     Vector<String> columnNames;