CSS Exclusions polygon shape arguments should be comma separated
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Apr 2012 01:18:10 +0000 (01:18 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Apr 2012 01:18:10 +0000 (01:18 +0000)
commit1eec2c9881ab45591bf77194d2ec51a23dcd132e
treefb9c90f7b44651820afe507327a7c8d13df0a716
parent4ffa6730ed5e80cf4b5a6b6ffa89bc6be51e9738
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
LayoutTests/ChangeLog
LayoutTests/fast/exclusions/parsing-wrap-shape-inside-expected.txt
LayoutTests/fast/exclusions/parsing-wrap-shape-outside-expected.txt
LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js
LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-outside.js
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSWrapShapes.cpp