Diff
Modified: trunk/LayoutTests/ChangeLog (113399 => 113400)
--- trunk/LayoutTests/ChangeLog 2012-04-06 01:14:05 UTC (rev 113399)
+++ trunk/LayoutTests/ChangeLog 2012-04-06 01:18:10 UTC (rev 113400)
@@ -1,3 +1,18 @@
+2012-04-05 Hans Muller <hmul...@adobe.com>
+
+ CSS Exclusions polygon shape arguments should be comma separated
+ https://bugs.webkit.org/show_bug.cgi?id=82368
+
+ Reviewed by Ryosuke Niwa.
+
+ Updated the tests to match the polygon syntax defined by the draft exclusions
+ spec - http://dev.w3.org/csswg/css3-exclusions.
+
+ * fast/exclusions/parsing-wrap-shape-inside-expected.txt:
+ * fast/exclusions/parsing-wrap-shape-outside-expected.txt:
+ * fast/exclusions/script-tests/parsing-wrap-shape-inside.js:
+ * fast/exclusions/script-tests/parsing-wrap-shape-outside.js:
+
2012-04-05 Ami Fischman <fisch...@chromium.org>
http/tests/media/media-can-load-when-hidden.html doesn't need to be an HTTP test, and is racy
Modified: trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-inside-expected.txt (113399 => 113400)
--- trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-inside-expected.txt 2012-04-06 01:14:05 UTC (rev 113399)
+++ trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-inside-expected.txt 2012-04-06 01:18:10 UTC (rev 113400)
@@ -15,12 +15,12 @@
PASS testComputedStyle("circle(10px, 20px, 30px)") is "circle(10px, 20px, 30px)"
PASS testCSSText("ellipse(10px, 20px, 30px, 40px)") is "ellipse(10px, 20px, 30px, 40px)"
PASS testComputedStyle("ellipse(10px, 20px, 30px, 40px)") is "ellipse(10px, 20px, 30px, 40px)"
-PASS testCSSText("polygon(10px, 20px 30px, 40px 40px, 50px)") is "polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)"
-PASS testComputedStyle("polygon(10px, 20px 30px, 40px 40px, 50px)") is "polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)"
-PASS testCSSText("polygon(evenodd, 10px, 20px 30px, 40px 40px, 50px)") is "polygon(evenodd, 10px, 20px 30px, 40px 40px, 50px)"
-PASS testComputedStyle("polygon(evenodd, 10px, 20px 30px, 40px 40px, 50px)") is "polygon(evenodd, 10px, 20px 30px, 40px 40px, 50px)"
-PASS testCSSText("polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)") is "polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)"
-PASS testComputedStyle("polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)") is "polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)"
+PASS testCSSText("polygon(10px 20px, 30px 40px, 40px 50px)") is "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)"
+PASS testComputedStyle("polygon(10px 20px, 30px 40px, 40px 50px)") is "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)"
+PASS testCSSText("polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)") is "polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)"
+PASS testComputedStyle("polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)") is "polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)"
+PASS testCSSText("polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)") is "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)"
+PASS testComputedStyle("polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)") is "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)"
PASS testNotInherited("auto", "rectangle(10px, 20px, 30px, 40px)") is "parent: auto, child: rectangle(10px, 20px, 30px, 40px)"
PASS testNotInherited("rectangle(10px, 20px, 30px, 40px)", "initial") is "parent: rectangle(10px, 20px, 30px, 40px), child: auto"
PASS testNotInherited("rectangle(10px, 20px, 30px, 40px)", "") is "parent: rectangle(10px, 20px, 30px, 40px), child: auto"
@@ -65,10 +65,10 @@
PASS testComputedStyle("ellipse(10px 20px 30px 40px)") is "auto"
PASS testCSSText("polygon()") is ""
PASS testComputedStyle("polygon()") is "auto"
-PASS testCSSText("polygon(evenodd 10px, 20px 30px, 40px 40px, 50px)") is ""
-PASS testComputedStyle("polygon(evenodd 10px, 20px 30px, 40px 40px, 50px)") is "auto"
-PASS testCSSText("polygon(nonzero 10px, 20px 30px, 40px 40px, 50px)") is ""
-PASS testComputedStyle("polygon(nonzero 10px, 20px 30px, 40px 40px, 50px)") is "auto"
+PASS testCSSText("polygon(evenodd 10px 20px, 30px 40px, 40px 50px)") is ""
+PASS testComputedStyle("polygon(evenodd 10px 20px, 30px 40px, 40px 50px)") is "auto"
+PASS testCSSText("polygon(nonzero 10px 20px, 30px 40px, 40px 50px)") is ""
+PASS testComputedStyle("polygon(nonzero 10px 20px, 30px 40px, 40px 50px)") is "auto"
PASS testCSSText("polygon(nonzero)") is ""
PASS testComputedStyle("polygon(nonzero)") is "auto"
PASS testCSSText("polygon(evenodd)") is ""
Modified: trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-outside-expected.txt (113399 => 113400)
--- trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-outside-expected.txt 2012-04-06 01:14:05 UTC (rev 113399)
+++ trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-outside-expected.txt 2012-04-06 01:18:10 UTC (rev 113400)
@@ -15,12 +15,12 @@
PASS testComputedStyle("circle(10px, 20px, 30px)") is "circle(10px, 20px, 30px)"
PASS testCSSText("ellipse(10px, 20px, 30px, 40px)") is "ellipse(10px, 20px, 30px, 40px)"
PASS testComputedStyle("ellipse(10px, 20px, 30px, 40px)") is "ellipse(10px, 20px, 30px, 40px)"
-PASS testCSSText("polygon(10px, 20px 30px, 40px 40px, 50px)") is "polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)"
-PASS testComputedStyle("polygon(10px, 20px 30px, 40px 40px, 50px)") is "polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)"
-PASS testCSSText("polygon(evenodd, 10px, 20px 30px, 40px 40px, 50px)") is "polygon(evenodd, 10px, 20px 30px, 40px 40px, 50px)"
-PASS testComputedStyle("polygon(evenodd, 10px, 20px 30px, 40px 40px, 50px)") is "polygon(evenodd, 10px, 20px 30px, 40px 40px, 50px)"
-PASS testCSSText("polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)") is "polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)"
-PASS testComputedStyle("polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)") is "polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)"
+PASS testCSSText("polygon(10px 20px, 30px 40px, 40px 50px)") is "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)"
+PASS testComputedStyle("polygon(10px 20px, 30px 40px, 40px 50px)") is "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)"
+PASS testCSSText("polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)") is "polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)"
+PASS testComputedStyle("polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)") is "polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)"
+PASS testCSSText("polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)") is "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)"
+PASS testComputedStyle("polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)") is "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)"
PASS testNotInherited("auto", "rectangle(10px, 20px, 30px, 40px)") is "parent: auto, child: rectangle(10px, 20px, 30px, 40px)"
PASS testNotInherited("rectangle(10px, 20px, 30px, 40px)", "initial") is "parent: rectangle(10px, 20px, 30px, 40px), child: auto"
PASS testNotInherited("rectangle(10px, 20px, 30px, 40px)", "") is "parent: rectangle(10px, 20px, 30px, 40px), child: auto"
@@ -65,10 +65,10 @@
PASS testComputedStyle("ellipse(10px 20px 30px 40px)") is "auto"
PASS testCSSText("polygon()") is ""
PASS testComputedStyle("polygon()") is "auto"
-PASS testCSSText("polygon(evenodd 10px, 20px 30px, 40px 40px, 50px)") is ""
-PASS testComputedStyle("polygon(evenodd 10px, 20px 30px, 40px 40px, 50px)") is "auto"
-PASS testCSSText("polygon(nonzero 10px, 20px 30px, 40px 40px, 50px)") is ""
-PASS testComputedStyle("polygon(nonzero 10px, 20px 30px, 40px 40px, 50px)") is "auto"
+PASS testCSSText("polygon(evenodd 10px 20px, 30px 40px, 40px 50px)") is ""
+PASS testComputedStyle("polygon(evenodd 10px 20px, 30px 40px, 40px 50px)") is "auto"
+PASS testCSSText("polygon(nonzero 10px 20px, 30px 40px, 40px 50px)") is ""
+PASS testComputedStyle("polygon(nonzero 10px 20px, 30px 40px, 40px 50px)") is "auto"
PASS testCSSText("polygon(nonzero)") is ""
PASS testComputedStyle("polygon(nonzero)") is "auto"
PASS testCSSText("polygon(evenodd)") is ""
Modified: trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js (113399 => 113400)
--- trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js 2012-04-06 01:14:05 UTC (rev 113399)
+++ trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js 2012-04-06 01:18:10 UTC (rev 113400)
@@ -63,9 +63,9 @@
test("ellipse(10px, 20px, 30px, 40px)", "ellipse(10px, 20px, 30px, 40px)");
-test("polygon(10px, 20px 30px, 40px 40px, 50px)", "polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)");
-test("polygon(evenodd, 10px, 20px 30px, 40px 40px, 50px)", "polygon(evenodd, 10px, 20px 30px, 40px 40px, 50px)");
-test("polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)", "polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)");
+test("polygon(10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)");
+test("polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)", "polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)");
+test("polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)");
shouldBeEqualToString('testNotInherited("auto", "rectangle(10px, 20px, 30px, 40px)")', "parent: auto, child: rectangle(10px, 20px, 30px, 40px)");
shouldBeEqualToString('testNotInherited("rectangle(10px, 20px, 30px, 40px)", "initial")', "parent: rectangle(10px, 20px, 30px, 40px), child: auto");
@@ -99,8 +99,8 @@
negative_test("ellipse(10px 20px 30px 40px)");
negative_test("polygon()");
-negative_test("polygon(evenodd 10px, 20px 30px, 40px 40px, 50px)");
-negative_test("polygon(nonzero 10px, 20px 30px, 40px 40px, 50px)");
+negative_test("polygon(evenodd 10px 20px, 30px 40px, 40px 50px)");
+negative_test("polygon(nonzero 10px 20px, 30px 40px, 40px 50px)");
negative_test("polygon(nonzero)");
negative_test("polygon(evenodd)");
negative_test("polygon(10px)");
Modified: trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-outside.js (113399 => 113400)
--- trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-outside.js 2012-04-06 01:14:05 UTC (rev 113399)
+++ trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-outside.js 2012-04-06 01:18:10 UTC (rev 113400)
@@ -63,9 +63,9 @@
test("ellipse(10px, 20px, 30px, 40px)", "ellipse(10px, 20px, 30px, 40px)");
-test("polygon(10px, 20px 30px, 40px 40px, 50px)", "polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)");
-test("polygon(evenodd, 10px, 20px 30px, 40px 40px, 50px)", "polygon(evenodd, 10px, 20px 30px, 40px 40px, 50px)");
-test("polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)", "polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)");
+test("polygon(10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)");
+test("polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)", "polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)");
+test("polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)");
shouldBeEqualToString('testNotInherited("auto", "rectangle(10px, 20px, 30px, 40px)")', "parent: auto, child: rectangle(10px, 20px, 30px, 40px)");
shouldBeEqualToString('testNotInherited("rectangle(10px, 20px, 30px, 40px)", "initial")', "parent: rectangle(10px, 20px, 30px, 40px), child: auto");
@@ -99,8 +99,8 @@
negative_test("ellipse(10px 20px 30px 40px)");
negative_test("polygon()");
-negative_test("polygon(evenodd 10px, 20px 30px, 40px 40px, 50px)");
-negative_test("polygon(nonzero 10px, 20px 30px, 40px 40px, 50px)");
+negative_test("polygon(evenodd 10px 20px, 30px 40px, 40px 50px)");
+negative_test("polygon(nonzero 10px 20px, 30px 40px, 40px 50px)");
negative_test("polygon(nonzero)");
negative_test("polygon(evenodd)");
negative_test("polygon(10px)");
Modified: trunk/Source/WebCore/ChangeLog (113399 => 113400)
--- trunk/Source/WebCore/ChangeLog 2012-04-06 01:14:05 UTC (rev 113399)
+++ trunk/Source/WebCore/ChangeLog 2012-04-06 01:18:10 UTC (rev 113400)
@@ -1,3 +1,41 @@
+2012-04-05 Hans Muller <hmul...@adobe.com>
+
+ CSS Exclusions polygon shape arguments should be comma separated
+ https://bugs.webkit.org/show_bug.cgi?id=82368
+
+ Reviewed by Ryosuke Niwa.
+
+ Changed the CSS Parser to accept a conventional comma separated argument list for the
+ polygon exclusion shape. The syntax had used spaces to separate x,y coordinates, like:
+ polygon(10px,20px 30px,40px). Now commas separate points: polygon(10px 20px, 30px 40px).
+ This change is per the draft exclusions spec, http://dev.w3.org/csswg/css3-exclusions.
+ Additional relevant information about CSS argument list syntax can be found
+ here: http://dev.w3.org/csswg/css3-values/#component-whitespace.
+
+ Factored comma recognition idiom in CSSParser.cpp into isComma() utility function.
+
+ The existing tests have been updated.
+
+ * css/CSSParser.cpp:
+ (WebCore::isComma)
+ (WebCore::CSSParser::parseFillPosition)
+ (WebCore::CSSParser::parseFillRepeat)
+ (WebCore::CSSParser::parseFillProperty)
+ (WebCore::CSSParser::parseCubicBezierTimingFunctionValue)
+ (WebCore::CSSParser::parseAnimationTimingFunction)
+ (WebCore::CSSParser::parseAnimationProperty)
+ (WebCore::CSSParser::parseExclusionShapePolygon)
+ (WebCore::CSSParser::parseDeprecatedGradient)
+ (WebCore::CSSParser::parseRadialGradient)
+ (WebCore::CSSParser::parseGradientColorStops)
+ (WebCore::CSSParser::parseImageSet)
+ (WebCore::filterInfoForName)
+ (WebCore::CSSParser::parseCustomFilter)
+ (WebCore::CSSParser::parseFontFeatureSettings)
+
+ * css/CSSWrapShapes.cpp:
+ (WebCore::CSSWrapShapePolygon::cssText):
+
2012-04-05 Joshua Bell <jsb...@chromium.org>
IndexedDB: Support string.length in keyPaths
Modified: trunk/Source/WebCore/css/CSSParser.cpp (113399 => 113400)
--- trunk/Source/WebCore/css/CSSParser.cpp 2012-04-06 01:14:05 UTC (rev 113399)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2012-04-06 01:18:10 UTC (rev 113400)
@@ -1307,6 +1307,12 @@
return 0;
}
+static inline bool isComma(CSSParserValue* value)
+{
+ return value && value->unit == CSSParserValue::Operator && value->iValue == ',';
+}
+
+
void CSSParser::checkForOrphanedUnits()
{
if (inStrictMode() || inShorthand())
@@ -3262,7 +3268,7 @@
value = valueList->next();
// First check for the comma. If so, we are finished parsing this value or value pair.
- if (value && value->unit == CSSParserValue::Operator && value->iValue == ',')
+ if (isComma(value))
value = 0;
if (value) {
@@ -3317,7 +3323,7 @@
value = m_valueList->next();
// First check for the comma. If so, we are finished parsing this value or value pair.
- if (value && value->unit == CSSParserValue::Operator && value->iValue == ',')
+ if (isComma(value))
value = 0;
if (value)
@@ -3405,7 +3411,7 @@
RefPtr<CSSValue> currValue2;
if (allowComma) {
- if (val->unit != CSSParserValue::Operator || val->iValue != ',')
+ if (!isComma(val))
return false;
m_valueList->next();
allowComma = false;
@@ -3644,7 +3650,7 @@
if (!v)
// The last number in the function has no comma after it, so we're done.
return true;
- if (v->unit != CSSParserValue::Operator && v->iValue != ',')
+ if (!isComma(v))
return false;
v = args->next();
return true;
@@ -3682,7 +3688,7 @@
if (v) {
// There is a comma so we need to parse the second value
- if (v->unit != CSSParserValue::Operator && v->iValue != ',')
+ if (!isComma(v))
return 0;
v = args->next();
if (v->id != CSSValueStart && v->id != CSSValueEnd)
@@ -3728,7 +3734,7 @@
while ((val = m_valueList->current())) {
RefPtr<CSSValue> currValue;
if (allowComma) {
- if (val->unit != CSSParserValue::Operator || val->iValue != ',')
+ if (!isComma(val))
return false;
m_valueList->next();
allowComma = false;
@@ -4249,16 +4255,15 @@
if (argument->id == CSSValueEvenodd || argument->id == CSSValueNonzero) {
shape->setWindRule(argument->id == CSSValueEvenodd ? RULE_EVENODD : RULE_NONZERO);
- CSSParserValue* comma = args->next();
- if (!comma || comma->unit != CSSParserValue::Operator || comma->iValue != ',')
+ if (!isComma(args->next()))
return 0;
argument = args->next();
size -= 2;
}
- // <length>, <length> ... <length>, <length> -> each pair has 3 elements
- if (!size || (size % 3))
+ // <length> <length>, ... <length> <length> -> each pair has 3 elements except the last one
+ if (!size || (size % 3) - 2)
return 0;
CSSParserValue* argumentX = argument;
@@ -4266,10 +4271,6 @@
if (!validUnit(argumentX, FLength))
return 0;
- CSSParserValue* comma = args->next();
- if (!comma || comma->unit != CSSParserValue::Operator || comma->iValue != ',')
- return 0;
-
CSSParserValue* argumentY = args->next();
if (!argumentY || !validUnit(argumentY, FLength))
return 0;
@@ -4279,7 +4280,13 @@
shape->appendPoint(xLength.release(), yLength.release());
- argumentX = args->next();
+ CSSParserValue* commaOrNull = args->next();
+ if (!commaOrNull)
+ argumentX = 0;
+ else if (!isComma(commaOrNull))
+ return 0;
+ else
+ argumentX = args->next();
}
return shape;
@@ -6266,7 +6273,7 @@
// Comma.
a = args->next();
- if (!a || a->unit != CSSParserValue::Operator || a->iValue != ',')
+ if (!isComma(a))
return false;
// Next comes the starting point for the gradient as an x y pair. There is no
@@ -6291,7 +6298,7 @@
// Comma after the first point.
a = args->next();
- if (!a || a->unit != CSSParserValue::Operator || a->iValue != ',')
+ if (!isComma(a))
return false;
// For radial gradients only, we now expect a numeric radius.
@@ -6303,7 +6310,7 @@
// Comma after the first radius.
a = args->next();
- if (!a || a->unit != CSSParserValue::Operator || a->iValue != ',')
+ if (!isComma(a))
return false;
}
@@ -6330,7 +6337,7 @@
if (gradientType == CSSRadialGradient) {
// Comma after the second point.
a = args->next();
- if (!a || a->unit != CSSParserValue::Operator || a->iValue != ',')
+ if (!isComma(a))
return false;
a = args->next();
@@ -6343,7 +6350,7 @@
a = args->next();
while (a) {
// Look for the comma before the next stop.
- if (a->unit != CSSParserValue::Operator || a->iValue != ',')
+ if (!isComma(a))
return false;
// Now examine the stop itself.
@@ -6490,7 +6497,7 @@
if (centerX || centerY) {
// Comma
- if (a->unit != CSSParserValue::Operator || a->iValue != ',')
+ if (!isComma(a))
return false;
a = args->next();
@@ -6591,7 +6598,7 @@
while (a) {
// Look for the comma before the next stop.
if (expectComma) {
- if (a->unit != CSSParserValue::Operator || a->iValue != ',')
+ if (!isComma(a))
return false;
a = valueList->next();
@@ -6684,7 +6691,7 @@
a = args->next();
// Skip a comma
- if (a->unit != CSSParserValue::Operator || a->iValue != ',')
+ if (!isComma(a))
return false;
a = args->next();
@@ -6694,7 +6701,7 @@
a = args->next();
// Skip a comma
- if (a->unit != CSSParserValue::Operator || a->iValue != ',')
+ if (!isComma(a))
return false;
a = args->next();
@@ -6774,7 +6781,7 @@
break;
// If there are more arguments, they should be after a comma.
- if (arg->unit != CSSParserValue::Operator || arg->iValue != ',')
+ if (!isComma(arg))
return 0;
// Skip the comma and move on to the next argument.
@@ -6986,7 +6993,7 @@
static bool acceptCommaOperator(CSSParserValueList* argsList)
{
if (CSSParserValue* arg = argsList->current()) {
- if (arg->unit != CSSParserValue::Operator || arg->iValue != ',')
+ if (!isComma(arg))
return false;
argsList->next();
}
@@ -7105,7 +7112,7 @@
RefPtr<CSSValueList> paramValueList = CSSValueList::createSpaceSeparated();
while ((arg = argsList->current())) {
// If we hit a comma it means we finished this parameter's values.
- if (arg->unit == CSSParserValue::Operator && arg->iValue == ',')
+ if (isComma(arg))
break;
if (!validUnit(arg, FNumber, CSSStrictMode))
return 0;
@@ -7607,7 +7614,7 @@
// If the list isn't parsed fully, the current value should be comma.
value = m_valueList->current();
- if (value && !(value->unit == CSSParserValue::Operator && value->iValue == ','))
+ if (value && !isComma(value))
return false;
}
if (settings->length()) {
Modified: trunk/Source/WebCore/css/CSSWrapShapes.cpp (113399 => 113400)
--- trunk/Source/WebCore/css/CSSWrapShapes.cpp 2012-04-06 01:14:05 UTC (rev 113399)
+++ trunk/Source/WebCore/css/CSSWrapShapes.cpp 2012-04-06 01:18:10 UTC (rev 113400)
@@ -122,6 +122,7 @@
DEFINE_STATIC_LOCAL(const String, polygonParenEvenOdd, ("polygon(evenodd, "));
DEFINE_STATIC_LOCAL(const String, polygonParenNonZero, ("polygon(nonzero, "));
DEFINE_STATIC_LOCAL(const String, comma, (", "));
+ DEFINE_STATIC_LOCAL(const String, space, (" "));
StringBuilder result;
result.reserveCapacity(32);
@@ -134,9 +135,9 @@
for (unsigned i = 0; i < m_values.size(); i += 2) {
if (i)
- result.append(' ');
+ result.append(comma);
result.append(m_values.at(i)->cssText());
- result.append(comma);
+ result.append(space);
result.append(m_values.at(i + 1)->cssText());
}