[css shapes] Parse new ellipse shape syntax
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Dec 2013 20:52:11 +0000 (20:52 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Dec 2013 20:52:11 +0000 (20:52 +0000)
commit21c04ea9eb090a59b776a516448ef0ea408e2733
tree7d77786893d2d51836065c76b111b316e943cba4
parent4d56bcb97e677fa7f7fdab3c4674263a8bc4bbea
[css shapes] Parse new ellipse shape syntax
https://bugs.webkit.org/show_bug.cgi?id=124620

Patch by Rob Buis <rob.buis@samsung.com> on 2013-12-02
Reviewed by Dirk Schulze.

Source/WebCore:

Implement parsing of the new ellipse shape syntax. This closely follows the patch
for the new circle syntax (https://bugs.webkit.org/show_bug.cgi?id=124618), with
some refactoring of functionality shared by both.

Updated existing parsing tests to cover this.

* css/BasicShapeFunctions.cpp:
(WebCore::BasicShapeRadiusToCSSValue):
(WebCore::valueForBasicShape):
(WebCore::CSSValueToBasicShapeRadius):
(WebCore::basicShapeForValue):
* css/CSSBasicShapes.cpp:
(WebCore::buildEllipseString):
(WebCore::CSSBasicShapeEllipse::cssText):
(WebCore::CSSBasicShapeEllipse::equals):
(WebCore::buildDeprecatedEllipseString):
(WebCore::CSSDeprecatedBasicShapeEllipse::cssText):
(WebCore::CSSDeprecatedBasicShapeEllipse::equals):
* css/CSSBasicShapes.h:
(WebCore::CSSDeprecatedBasicShapeEllipse::create):
(WebCore::CSSDeprecatedBasicShapeEllipse::centerX):
(WebCore::CSSDeprecatedBasicShapeEllipse::centerY):
(WebCore::CSSDeprecatedBasicShapeEllipse::radiusX):
(WebCore::CSSDeprecatedBasicShapeEllipse::radiusY):
(WebCore::CSSDeprecatedBasicShapeEllipse::setCenterX):
(WebCore::CSSDeprecatedBasicShapeEllipse::setCenterY):
(WebCore::CSSDeprecatedBasicShapeEllipse::setRadiusX):
(WebCore::CSSDeprecatedBasicShapeEllipse::setRadiusY):
(WebCore::CSSDeprecatedBasicShapeEllipse::CSSDeprecatedBasicShapeEllipse):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseBasicShapeEllipse):
(WebCore::CSSParser::parseDeprecatedBasicShapeEllipse):
(WebCore::CSSParser::parseBasicShape):
* css/CSSParser.h:
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape):
* rendering/style/BasicShapes.cpp:
(WebCore::DeprecatedBasicShapeEllipse::path):
(WebCore::DeprecatedBasicShapeEllipse::blend):
(WebCore::BasicShapeEllipse::path):
(WebCore::BasicShapeEllipse::blend):
* rendering/style/BasicShapes.h:
(WebCore::BasicShapeEllipse::centerX):
(WebCore::BasicShapeEllipse::centerY):
(WebCore::BasicShapeEllipse::radiusX):
(WebCore::BasicShapeEllipse::radiusY):
(WebCore::BasicShapeEllipse::setCenterX):
(WebCore::BasicShapeEllipse::setCenterY):
(WebCore::BasicShapeEllipse::setRadiusX):
(WebCore::BasicShapeEllipse::setRadiusY):
(WebCore::BasicShapeEllipse::BasicShapeEllipse):
(WebCore::DeprecatedBasicShapeEllipse::create):
(WebCore::DeprecatedBasicShapeEllipse::DeprecatedBasicShapeEllipse):

LayoutTests:

Test that the new ellipse syntax is properly parsed.

* fast/shapes/parsing/parsing-shape-inside-expected.txt:
* fast/shapes/parsing/parsing-shape-outside-expected.txt:
* fast/shapes/parsing/parsing-test-utils.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt
LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt
LayoutTests/fast/shapes/parsing/parsing-test-utils.js
Source/WebCore/ChangeLog
Source/WebCore/css/BasicShapeFunctions.cpp
Source/WebCore/css/CSSBasicShapes.cpp
Source/WebCore/css/CSSBasicShapes.h
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/rendering/shapes/Shape.cpp
Source/WebCore/rendering/style/BasicShapes.cpp
Source/WebCore/rendering/style/BasicShapes.h