CSS Exclusions polygon shape arguments should be comma separated
https://bugs.webkit.org/show_bug.cgi?id=82368
Patch by Hans Muller <hmuller@adobe.com> on 2012-04-05
Reviewed by Ryosuke Niwa.
Source/WebCore:
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):
LayoutTests:
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:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113400
268f45cc-cd09-0410-ab3c-
d52691b4dbfc