Skip to content

Commit

Permalink
Merge r173965 - ASSERTION FAILED: columnCount in WebCore::CSSParser::…
Browse files Browse the repository at this point in the history
…parseGridTemplateAreasRow

https://bugs.webkit.org/show_bug.cgi?id=136945

Reviewed by Sergio Villar Senin.

Source/WebCore:

Checking out whether the grid-template-areas value contains a white-space only
string, which is not valid as it does not produce a cell token.

Test: fast/css-grid-layout/grid-template-areas-empty-string-crash.html

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

LayoutTests:

Testing the different types of white-space only strings for the grid-template-areas
property, which is not valid as it does not produce a cell token.

* fast/css-grid-layout/grid-template-areas-empty-string-crash-expected.txt: Added.
* fast/css-grid-layout/grid-template-areas-empty-string-crash.html: Added.

Canonical link: https://commits.webkit.org/154760.51@webkitgtk/2.6
git-svn-id: https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.6@174438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
javifernandez authored and carlosgcampos committed Oct 8, 2014
1 parent 1ef4f6d commit f300ba6
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 1 deletion.
13 changes: 13 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
2014-09-25 Javier Fernandez <jfernandez@igalia.com>

ASSERTION FAILED: columnCount in WebCore::CSSParser::parseGridTemplateAreasRow
https://bugs.webkit.org/show_bug.cgi?id=136945

Reviewed by Sergio Villar Senin.

Testing the different types of white-space only strings for the grid-template-areas
property, which is not valid as it does not produce a cell token.

* fast/css-grid-layout/grid-template-areas-empty-string-crash-expected.txt: Added.
* fast/css-grid-layout/grid-template-areas-empty-string-crash.html: Added.

2014-09-24 Darin Adler <darin@apple.com>

Old Turkic characters behave as left-to-right instead of right-to-left, because they are encoded as surrogate pairs.
Expand Down
@@ -0,0 +1,5 @@
webkit.org/b/136945 - ASSERTION FAILED: columnCount in WebCore::CSSParser::parseGridTemplateAreasRow

This test has PASSED if it doesn't CRASH.


@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html
<head>
<link href="resources/grid.css" rel="stylesheet">
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
<style>
.space {
-webkit-grid-template-areas: "\0020";
}
.tab {
-webkit-grid-template-areas: "\0009";
}
.lineFeed {
-webkit-grid-template-areas: "\000A";
}
.carriageReturn {
-webkit-grid-template-areas: "\000D";
}
.formFeed {
-webkit-grid-template-areas: "\000C";
}
.multipleSpace {
-webkit-grid-template-areas: " ";
}
</style>
</head>
<p>webkit.org/b/136945 - ASSERTION FAILED: columnCount in WebCore::CSSParser::parseGridTemplateAreasRow</p>
<p>This test has PASSED if it doesn't CRASH.</p>
<div class="grid space"></div>
<div class="grid tab"></div>
<div class="grid lineFeed"></div>
<div class="grid carriageReturn"></div>
<div class="grid formFeed"></div>
<div class="grid multipleSpace"></div>
15 changes: 15 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,18 @@
2014-09-25 Javier Fernandez <jfernandez@igalia.com>

ASSERTION FAILED: columnCount in WebCore::CSSParser::parseGridTemplateAreasRow
https://bugs.webkit.org/show_bug.cgi?id=136945

Reviewed by Sergio Villar Senin.

Checking out whether the grid-template-areas value contains a white-space only
string, which is not valid as it does not produce a cell token.

Test: fast/css-grid-layout/grid-template-areas-empty-string-crash.html

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

2014-09-24 Christophe Dumez <cdumez@apple.com>

Use tighter typing for render objects in RenderGeometryMap
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/css/CSSParser.cpp
Expand Up @@ -5568,7 +5568,7 @@ bool CSSParser::parseGridTemplateAreasRow(NamedGridAreaMap& gridAreaMap, const u
return false;

String gridRowNames = currentValue->string;
if (gridRowNames.isEmpty())
if (gridRowNames.isEmpty() || gridRowNames.containsOnlyWhitespace())
return false;

Vector<String> columnNames;
Expand Down

0 comments on commit f300ba6

Please sign in to comment.