[CSS Grid Layout] Crash at CSSParser::parseGridTemplateRowsAndAreas
authorsvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Sep 2014 09:12:18 +0000 (09:12 +0000)
committersvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Sep 2014 09:12:18 +0000 (09:12 +0000)
commit97d18141167430bc17fef31ec838f8e484d71904
tree4d3d20dbda6eddf0e21d41ea266fefcc295e31df
parent0dc45fef0c80f9b8671367a817d4d5e35c5336d6
[CSS Grid Layout] Crash at CSSParser::parseGridTemplateRowsAndAreas
https://bugs.webkit.org/show_bug.cgi?id=136778

Reviewed by Darin Adler.

Source/WebCore:

An empty list of grid line names (represented by "()") does not
add anything to the list of parsed values. That's why trying to
concatenate an adjacent list of grid line names was failing,
because we were trying to concatenate a list with the last parsed
CSSValue which was not the expected grid line names list.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTemplateRowsAndAreas):
(WebCore::CSSParser::parseGridLineNames):
* css/CSSParser.h:

LayoutTests:

Added some new test cases to verify that we properly handle empty
lists of grid line names.

* fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt:
* fast/css-grid-layout/grid-template-shorthand-get-set.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt
LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h