-
bjonesbe@adobe.com authored
https://bugs.webkit.org/show_bug.cgi?id=124619 Reviewed by Dirk Schulze. Source/WebCore: Implement support for doing layout with the new circle shape syntax, inclduing basic animation support. Tests: fast/shapes/shape-outside-floats/shape-outside-floats-circle-000.html fast/shapes/shape-outside-floats/shape-outside-floats-circle-001.html fast/shapes/shape-outside-floats/shape-outside-floats-circle-002.html fast/shapes/shape-outside-floats/shape-outside-floats-circle-003.html fast/shapes/shape-outside-floats/shape-outside-floats-circle-004.html fast/shapes/shape-outside-floats/shape-outside-floats-circle-005.html * css/BasicShapeFunctions.cpp: (WebCore::floatValueForCenterCoordinate): Used by both the CSS Shapes layout code and the clip path code. * css/BasicShapeFunctions.h: * css/CSSBasicShapes.cpp: (WebCore::buildCircleString): Update to use appendLiteral, and remove call to reserveCapacity - if we find that it's actually slow when doing performance tests, we can hopefully do something smarter and less ugly than that. * css/CSSParser.cpp: (WebCore::CSSParser::parseShapeRadius): Fix a logic error that caused the radius keywords not to work properly. * rendering/shapes/Shape.cpp: (WebCore::Shape::createShape): Convert new circle to a layout shape. * rendering/style/BasicShapes.cpp: (WebCore::BasicShape::canBlend): Ignore circles with values that cannot be interpolated. (WebCore::BasicShapeCircle::floatValueForRadiusInBox): Convert circle radius keywords to a float value. (WebCore::BasicShapeCircle::path): (WebCore::BasicShapeCircle::blend): * rendering/style/BasicShapes.h: (WebCore::BasicShapeCenterCoordinate::canBlend): (WebCore::BasicShapeRadius::canBlend): LayoutTests: Add a few tests for the new circle syntax. The old tests in LayoutTests/csswg will be removed when the old syntax is removed. Also update existing shape-inside, animation, and clip-path tests to test the new syntax. * animations/resources/animation-test-helpers.js: (parseBasicShape): * LayoutTests/animations/resources/animation-test-helpers.js: * LayoutTests/css3/masking/clip-path-animation-expected.txt: * LayoutTests/css3/masking/clip-path-animation.html: * LayoutTests/css3/masking/clip-path-circle-filter.html: * LayoutTests/css3/masking/clip-path-circle-overflow-hidden.html: * LayoutTests/css3/masking/clip-path-circle-overflow.html: * LayoutTests/css3/masking/clip-path-circle-relative-overflow.html: * LayoutTests/css3/masking/clip-path-circle.html: * LayoutTests/css3/masking/clip-path-restore.html: * 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: * LayoutTests/fast/shapes/shape-inside/shape-inside-animation-expected.txt: * LayoutTests/fast/shapes/shape-inside/shape-inside-animation.html: * LayoutTests/fast/shapes/shape-inside/shape-inside-calc-crash-expected.txt: * LayoutTests/fast/shapes/shape-inside/shape-inside-calc-crash.html: * LayoutTests/fast/shapes/shape-inside/shape-inside-circle-padding.html: * LayoutTests/fast/shapes/shape-inside/shape-inside-circle.html: * LayoutTests/fast/shapes/shape-inside/shape-inside-dynamic-nested.html: * LayoutTests/fast/shapes/shape-inside/shape-inside-empty-expected.html: * LayoutTests/fast/shapes/shape-inside/shape-inside-empty.html: * fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt: * fast/shapes/shape-outside-floats/shape-outside-animation.html: * fast/shapes/shape-outside-floats/shape-outside-floats-circle-000-expected.html: Added. * fast/shapes/shape-outside-floats/shape-outside-floats-circle-000.html: Added. * fast/shapes/shape-outside-floats/shape-outside-floats-circle-001-expected.html: Added. * fast/shapes/shape-outside-floats/shape-outside-floats-circle-001.html: Added. * fast/shapes/shape-outside-floats/shape-outside-floats-circle-002-expected.html: Added. * fast/shapes/shape-outside-floats/shape-outside-floats-circle-002.html: Added. * fast/shapes/shape-outside-floats/shape-outside-floats-circle-003-expected.html: Added. * fast/shapes/shape-outside-floats/shape-outside-floats-circle-003.html: Added. * fast/shapes/shape-outside-floats/shape-outside-floats-circle-004-expected.html: Added. * fast/shapes/shape-outside-floats/shape-outside-floats-circle-004.html: Added. * fast/shapes/shape-outside-floats/shape-outside-floats-circle-005-expected.html: Added. * fast/shapes/shape-outside-floats/shape-outside-floats-circle-005.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fa49c82a