Title: [185499] trunk
Revision
185499
Author
[email protected]
Date
2015-06-12 05:54:26 -0700 (Fri, 12 Jun 2015)

Log Message

Unreviewed, rolling out r185492.
https://bugs.webkit.org/show_bug.cgi?id=145927

Causes crashes on debug (Requested by rego on #webkit).

Reverted changeset:

"[CSS Grid Layout] Fix grid-template-areas parsing to avoid
spaces"
https://bugs.webkit.org/show_bug.cgi?id=145860
http://trac.webkit.org/changeset/185492

Patch by Commit Queue <[email protected]> on 2015-06-12

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (185498 => 185499)


--- trunk/LayoutTests/ChangeLog	2015-06-12 12:47:22 UTC (rev 185498)
+++ trunk/LayoutTests/ChangeLog	2015-06-12 12:54:26 UTC (rev 185499)
@@ -1,3 +1,17 @@
+2015-06-12  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r185492.
+        https://bugs.webkit.org/show_bug.cgi?id=145927
+
+        Causes crashes on debug (Requested by rego on #webkit).
+
+        Reverted changeset:
+
+        "[CSS Grid Layout] Fix grid-template-areas parsing to avoid
+        spaces"
+        https://bugs.webkit.org/show_bug.cgi?id=145860
+        http://trac.webkit.org/changeset/185492
+
 2015-06-12  Manuel Rego Casasnovas  <[email protected]>
 
         [CSS Grid Layout] Fix grid-template-areas parsing to avoid spaces

Modified: trunk/LayoutTests/fast/css-grid-layout/grid-template-areas-get-set-expected.txt (185498 => 185499)


--- trunk/LayoutTests/fast/css-grid-layout/grid-template-areas-get-set-expected.txt	2015-06-12 12:47:22 UTC (rev 185498)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-template-areas-get-set-expected.txt	2015-06-12 12:54:26 UTC (rev 185499)
@@ -18,10 +18,6 @@
 PASS getComputedStyle(gridWithComplexDotAreas).getPropertyValue('-webkit-grid-template-areas') is "\". header header .\" \". . . .\" \"nav main main aside\" \"nav main main aside\" \". . . aside\" \". footer footer aside\""
 PASS getComputedStyle(gridWithComplexDotsAreas).getPropertyValue('-webkit-grid-template-areas') is "\". header header .\" \". . . .\" \"nav main main aside\" \"nav main main aside\" \". . . aside\" \". footer footer aside\""
 PASS getComputedStyle(gridWithMixedDotAndDotsAreas).getPropertyValue('-webkit-grid-template-areas') is "\". title .\" \". main main\" \"nav . aside\" \". footer .\""
-PASS getComputedStyle(gridWithDotsNoSpaceTwoColumns).getPropertyValue('-webkit-grid-template-areas') is "\". A\" \". A\" \"B .\" \"B .\""
-PASS getComputedStyle(gridWithDotsNoSpaceThreeColumns).getPropertyValue('-webkit-grid-template-areas') is "\". A .\" \". A .\" \"B . C\" \"B . C\""
-PASS getComputedStyle(gridWithDotsNoSpaceFourColumns).getPropertyValue('-webkit-grid-template-areas') is "\". A . B\" \". A . B\" \". A . B\" \". A . B\" \"C . D .\" \"C . D .\" \"C . D .\" \"C . D .\""
-PASS getComputedStyle(gridWithDotsNoSpaceComplex).getPropertyValue('-webkit-grid-template-areas') is "\". title . nav . . main test\" \". title . nav . . main test\" \". title . nav . . main test\" \". title . nav . . main test\""
 PASS getComputedStyle(gridWithHorizontalRectangle).getPropertyValue('-webkit-grid-template-areas') is "\"a a a\" \"a a a\""
 PASS getComputedStyle(gridWithVerticalRectangle).getPropertyValue('-webkit-grid-template-areas') is "\"a a\" \"a a\" \"a a\""
 Test grid-template-areas: initial

Modified: trunk/LayoutTests/fast/css-grid-layout/grid-template-areas-get-set.html (185498 => 185499)


--- trunk/LayoutTests/fast/css-grid-layout/grid-template-areas-get-set.html	2015-06-12 12:47:22 UTC (rev 185498)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-template-areas-get-set.html	2015-06-12 12:54:26 UTC (rev 185499)
@@ -75,39 +75,6 @@
                                  ". footer ......";
 }
 
-#gridWithDotsNoSpaceTwoColumns {
-    -webkit-grid-template-areas: "...A"
-                                 ".A"
-                                 "B.."
-                                 "B.";
-}
-
-#gridWithDotsNoSpaceThreeColumns {
-    -webkit-grid-template-areas: "...A.."
-                                 ".A."
-                                 "B..C"
-                                 "B.C";
-}
-
-#gridWithDotsNoSpaceFourColumns {
-    -webkit-grid-template-areas: "...A..B"
-                                 ".A.B"
-                                 "..A.B"
-                                 ".A...B"
-                                 "C....D....."
-                                 "C.D."
-                                 "C...D."
-                                 "C.D....";
-}
-
-#gridWithDotsNoSpaceComplex {
-    -webkit-grid-template-areas: ".title...nav. ..main test"
-                                 "... title.nav... .main test"
-                                 "..title .. nav . .. main test"
-                                 ". title .nav... . main test";
-                                 ".... title ...nav ... ...main test";
-}
-
 #gridWithHorizontalRectangle {
     -webkit-grid-template-areas: "a a a"
                                  "a a a";
@@ -137,10 +104,6 @@
 <div class="grid" id="gridWithComplexDotAreas"></div>
 <div class="grid" id="gridWithComplexDotsAreas"></div>
 <div class="grid" id="gridWithMixedDotAndDotsAreas"></div>
-<div class="grid" id="gridWithDotsNoSpaceTwoColumns"></div>
-<div class="grid" id="gridWithDotsNoSpaceThreeColumns"></div>
-<div class="grid" id="gridWithDotsNoSpaceFourColumns"></div>
-<div class="grid" id="gridWithDotsNoSpaceComplex"></div>
 <div class="grid" id="gridWithHorizontalRectangle"></div>
 <div class="grid" id="gridWithVerticalRectangle"></div>
 <script>
@@ -170,10 +133,6 @@
     testGridTemplateAreas("gridWithComplexDotAreas", '". header header ." ". . . ." "nav main main aside" "nav main main aside" ". . . aside" ". footer footer aside"');
     testGridTemplateAreas("gridWithComplexDotsAreas", '". header header ." ". . . ." "nav main main aside" "nav main main aside" ". . . aside" ". footer footer aside"');
     testGridTemplateAreas("gridWithMixedDotAndDotsAreas", '". title ." ". main main" "nav . aside" ". footer ."');
-    testGridTemplateAreas("gridWithDotsNoSpaceTwoColumns", '". A" ". A" "B ." "B ."');
-    testGridTemplateAreas("gridWithDotsNoSpaceThreeColumns", '". A ." ". A ." "B . C" "B . C"');
-    testGridTemplateAreas("gridWithDotsNoSpaceFourColumns", '". A . B" ". A . B" ". A . B" ". A . B" "C . D ." "C . D ." "C . D ." "C . D ."');
-    testGridTemplateAreas("gridWithDotsNoSpaceComplex", '". title . nav . . main test" ". title . nav . . main test" ". title . nav . . main test" ". title . nav . . main test"');
     testGridTemplateAreas("gridWithHorizontalRectangle", '"a a a" "a a a"');
     testGridTemplateAreas("gridWithVerticalRectangle", '"a a" "a a" "a a"');
 

Modified: trunk/Source/WebCore/ChangeLog (185498 => 185499)


--- trunk/Source/WebCore/ChangeLog	2015-06-12 12:47:22 UTC (rev 185498)
+++ trunk/Source/WebCore/ChangeLog	2015-06-12 12:54:26 UTC (rev 185499)
@@ -1,3 +1,17 @@
+2015-06-12  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r185492.
+        https://bugs.webkit.org/show_bug.cgi?id=145927
+
+        Causes crashes on debug (Requested by rego on #webkit).
+
+        Reverted changeset:
+
+        "[CSS Grid Layout] Fix grid-template-areas parsing to avoid
+        spaces"
+        https://bugs.webkit.org/show_bug.cgi?id=145860
+        http://trac.webkit.org/changeset/185492
+
 2015-06-12  Youenn Fablet  <[email protected]>
 
         Bindings generator should generate code for Promise-based APIs

Modified: trunk/Source/WebCore/css/CSSParser.cpp (185498 => 185499)


--- trunk/Source/WebCore/css/CSSParser.cpp	2015-06-12 12:47:22 UTC (rev 185498)
+++ trunk/Source/WebCore/css/CSSParser.cpp	2015-06-12 12:54:26 UTC (rev 185499)
@@ -5961,34 +5961,15 @@
 #endif /* ENABLE(DASHBOARD_SUPPORT) */
 
 #if ENABLE(CSS_GRID_LAYOUT)
-static Vector<String> parseGridTemplateAreasColumnNames(const String& gridRowNames)
+static bool containsOnlyDots(const String& string)
 {
-    ASSERT(!gridRowNames.isEmpty());
-    Vector<String> columnNames;
-    // Using StringImpl to avoid checks and indirection in every call to String::operator[].
-    StringImpl& text = *gridRowNames.impl();
-    unsigned length = text.length();
-    unsigned index = 0;
-    while (index < length) {
-        if (text[index] != ' ' && text[index] != '.') {
-            unsigned gridAreaStart = index;
-            while (text[index] != ' ' && text[index] != '.' && index < length)
-                index++;
-            columnNames.append(text.substring(gridAreaStart, index - gridAreaStart));
-            continue;
-        }
-
-        if (text[index] == '.') {
-            while (text[index] == '.' && index < length)
-                index++;
-            columnNames.append(".");
-            continue;
-        }
-
-        index++;
+    ASSERT(!string.isEmpty());
+    StringImpl& text = *string.impl();
+    for (unsigned i = 0; i < text.length(); ++i) {
+        if (text[i] != '.')
+            return false;
     }
-
-    return columnNames;
+    return true;
 }
 
 bool CSSParser::parseGridTemplateAreasRow(NamedGridAreaMap& gridAreaMap, const unsigned rowCount, unsigned& columnCount)
@@ -6001,7 +5982,9 @@
     if (gridRowNames.containsOnlyWhitespace())
         return false;
 
-    Vector<String> columnNames = parseGridTemplateAreasColumnNames(gridRowNames);
+    Vector<String> columnNames;
+    gridRowNames.split(' ', columnNames);
+
     if (!columnCount) {
         columnCount = columnNames.size();
         ASSERT(columnCount);
@@ -6014,7 +5997,7 @@
         const String& gridAreaName = columnNames[currentColumn];
 
         // 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.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to